本文整理汇总了C++中MAKEINTRESOURCEA函数的典型用法代码示例。如果您正苦于以下问题:C++ MAKEINTRESOURCEA函数的具体用法?C++ MAKEINTRESOURCEA怎么用?C++ MAKEINTRESOURCEA使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了MAKEINTRESOURCEA函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TN_OptionsInitialize
int TN_OptionsInitialize(WPARAM wParam, LPARAM lParam)
{
if ( ServiceExists(MS_POPUP_ADDPOPUP)) {
OPTIONSDIALOGPAGE odp = { sizeof(odp) };
odp.position = 100000000;
odp.hInstance = g_hInst;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_TYPINGNOTIFYPOPUP);
odp.pszTitle = LPGEN("Typing Notify");
odp.pszGroup = LPGEN("Popups");
odp.groupPosition = 910000000;
odp.flags = ODPF_BOLDGROUPS;
odp.pfnDlgProc = DlgProcOpts;
Options_AddPage(wParam, &odp);
}
return 0;
}
示例2: onOptInitialise
int onOptInitialise(WPARAM wParam, LPARAM lParam)
{
OPTIONSDIALOGPAGE odp;
ZeroMemory(&odp, sizeof(odp));
odp.cbSize = sizeof(odp);
odp.position = 0;
odp.hInstance = g_hInst;
odp.ptszGroup = LPGENT("Plugins");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_GENDER_OPT);
odp.ptszTitle = LPGENT("Gender");
odp.pfnDlgProc = DlgProcOptions;
odp.flags = ODPF_BOLDGROUPS|ODPF_TCHAR;
CallService(MS_OPT_ADDPAGE, wParam, (LPARAM) &odp);
return 0;
}
示例3: UserInfoInitialise
int UserInfoInitialise(WPARAM wParam, LPARAM lParam)
{
if (lParam == NULL)
return 0;
OPTIONSDIALOGPAGE odp = {0};
odp.cbSize = sizeof(odp);
odp.position = 100000000;
odp.hInstance = hInst;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_INFO_SOUNDS);
odp.pszTitle = LPGEN("Status Notify");
odp.pfnDlgProc = DlgProcSoundUIPage;
CallService(MS_USERINFO_ADDPAGE, wParam, (LPARAM)&odp);
return 0;
}
示例4: test_LoadImage
static void test_LoadImage(void)
{
HBITMAP bmp;
HRSRC hres;
bmp = LoadBitmapA(GetModuleHandleA(NULL), MAKEINTRESOURCEA(100));
ok(bmp != NULL, "Could not load a bitmap resource\n");
if (bmp) DeleteObject(bmp);
hres = FindResourceA(GetModuleHandleA(NULL), "#100", (LPCSTR)RT_BITMAP);
ok(hres != NULL, "Could not find a bitmap resource with a numeric string\n");
bmp = LoadBitmapA(GetModuleHandleA(NULL), "#100");
ok(bmp != NULL, "Could not load a bitmap resource with a numeric string\n");
if (bmp) DeleteObject(bmp);
}
示例5: CreateTheme
static HRESULT CreateTheme(
__in HINSTANCE hInstance,
__out THEME** ppTheme
)
{
HRESULT hr = S_OK;
hr = ThemeInitialize(hInstance);
ExitOnFailure(hr, "Failed to initialize theme manager.");
hr = ThemeLoadFromResource(hInstance, MAKEINTRESOURCEA(THMVWR_RES_THEME_FILE), ppTheme);
ExitOnFailure(hr, "Failed to load theme from thmviewer.thm.");
LExit:
return hr;
}
示例6: extratextDlgProc
// dialog box for the %extratext% input
static INT_PTR CALLBACK extratextDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lParam) {
switch(msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
break;
case VARM_SETEXTRATEXT:
SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT,
SendDlgItemMessage(hwndDlg, IDC_EXTRATEXT, WM_SETTEXT, wParam, lParam));
return TRUE;
case VARM_GETEXTRATEXTLENGTH:
SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT,
SendDlgItemMessage(hwndDlg, IDC_EXTRATEXT, WM_GETTEXTLENGTH, wParam, lParam));
return TRUE;
case VARM_GETEXTRATEXT:
SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT,
GetDlgItemText(hwndDlg, IDC_EXTRATEXT, (LPWSTR)lParam, wParam));
return TRUE;
case WM_SIZE:
if (!IsIconic( hwndDlg )) {
UTILRESIZEDIALOG urd = { 0 };
urd.cbSize = sizeof(urd);
urd.hInstance = hInst;
urd.hwndDlg = hwndDlg;
urd.lpTemplate = MAKEINTRESOURCEA(IDD_EXTRATEXT_DIALOG);
urd.pfnResizer = defaultHelpDialogResize;
CallService(MS_UTILS_RESIZEDIALOG, 0, (LPARAM)&urd);
SendMessage(hwndDlg, WM_MOVE, 0, 0);
}
break;
case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDC_EXTRATEXT:
SendMessage(GetParent(hwndDlg), VARM_PARSE, 0, 0);
break;
}
break;
}
return FALSE;
}
示例7: createDialog
void
createDialog(void)
{
STARTUPINFOA startinfo;
WNDCLASSEXA WndClass;
g_hInstance = GetModuleHandle(NULL);
GetStartupInfoA(&startinfo);
WndClass.cbSize = sizeof WndClass;
WndClass.style = 0;
WndClass.lpfnWndProc = WndProc;
WndClass.cbClsExtra = 0;
WndClass.cbWndExtra = 0;
WndClass.hInstance = g_hInstance;
WndClass.hIcon = LoadIcon(g_hInstance, MAKEINTRESOURCE(IDI_MAINICON));
WndClass.hCursor = LoadCursor(NULL, IDC_ARROW);
WndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
WndClass.lpszMenuName = MAKEINTRESOURCEA(IDM_MAINMENU);
WndClass.lpszClassName = "DrMingw";
WndClass.hIconSm = LoadIcon(g_hInstance, MAKEINTRESOURCE(IDI_MAINICON));
if (!RegisterClassExA(&WndClass)) {
ErrorMessageBox("RegisterClassEx: %s", LastErrorMessage());
exit(EXIT_FAILURE);
}
g_hWnd = CreateWindowExA(
WS_EX_CLIENTEDGE,
WndClass.lpszClassName,
"Dr. Mingw",
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
NULL,
NULL,
g_hInstance,
NULL
);
if (g_hWnd == NULL) {
ErrorMessageBox("CreateWindowEx: %s", LastErrorMessage());
exit(EXIT_FAILURE);
}
ShowWindow(g_hWnd, (startinfo.dwFlags & STARTF_USESHOWWINDOW) ? startinfo.wShowWindow : SW_SHOWDEFAULT);
UpdateWindow(g_hWnd);
}
示例8: ISF_Fonts_IContextMenu2_InvokeCommand
/**************************************************************************
* ISF_Fonts_IContextMenu_InvokeCommand()
*/
static HRESULT WINAPI ISF_Fonts_IContextMenu2_InvokeCommand(
IContextMenu2 *iface,
LPCMINVOKECOMMANDINFO lpcmi)
{
SHELLEXECUTEINFOW sei;
PIDLFontStruct * pfont;
SHFILEOPSTRUCTW op;
IGenericSFImpl * This = impl_from_IContextMenu2(iface);
TRACE("(%p)->(invcom=%p verb=%p wnd=%p)\n",This,lpcmi,lpcmi->lpVerb, lpcmi->hwnd);
if (lpcmi->lpVerb == MAKEINTRESOURCEA(1) || lpcmi->lpVerb == MAKEINTRESOURCEA(2) || lpcmi->lpVerb == MAKEINTRESOURCEA(7))
{
ZeroMemory(&sei, sizeof(sei));
sei.cbSize = sizeof(sei);
sei.hwnd = lpcmi->hwnd;
sei.nShow = SW_SHOWNORMAL;
if (lpcmi->lpVerb == MAKEINTRESOURCEA(1))
sei.lpVerb = L"open";
else if (lpcmi->lpVerb == MAKEINTRESOURCEA(2))
sei.lpVerb = L"print";
else if (lpcmi->lpVerb == MAKEINTRESOURCEA(7))
sei.lpVerb = L"properties";
pfont = _ILGetFontStruct(This->apidl);
sei.lpFile = pfont->szName + pfont->offsFile;
if (ShellExecuteExW(&sei) == FALSE)
return E_FAIL;
}
else if (lpcmi->lpVerb == MAKEINTRESOURCEA(4))
{
FIXME("implement font copying\n");
return E_NOTIMPL;
}
else if (lpcmi->lpVerb == MAKEINTRESOURCEA(6))
{
ZeroMemory(&op, sizeof(op));
op.hwnd = lpcmi->hwnd;
op.wFunc = FO_DELETE;
op.fFlags = FOF_ALLOWUNDO;
pfont = _ILGetFontStruct(This->apidl);
op.pFrom = pfont->szName + pfont->offsFile;
SHFileOperationW(&op);
}
return S_OK;
}
示例9: LPARAM
int OmegleProto::OnOptionsInit(WPARAM wParam,LPARAM lParam)
{
OPTIONSDIALOGPAGE odp = {sizeof(odp)};
odp.hInstance = g_hInstance;
odp.ptszTitle = m_tszUserName;
odp.dwInitParam = LPARAM(this);
odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR | ODPF_DONTTRANSLATE;
odp.position = 271828;
odp.ptszGroup = LPGENT("Network");
odp.ptszTab = LPGENT("Account");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
odp.pfnDlgProc = OmegleOptionsProc;
CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
return 0;
}
示例10: sizeof
int CMraProto::OnPopupOptInit(WPARAM wParam, LPARAM lParam)
{
if ( ServiceExists(MS_POPUP_ADDPOPUP)) {
OPTIONSDIALOGPAGE odp = { sizeof(odp) };
odp.dwInitParam = (LPARAM)this;
odp.position = 100000000;
odp.hInstance = g_hInstance;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_POPUPS);
odp.pszTitle = m_szModuleName;
odp.pszGroup = LPGEN("Popups");
odp.groupPosition = 900000000;
odp.flags = ODPF_BOLDGROUPS;
odp.pfnDlgProc = MraPopupDlgProcOpts;
Options_AddPage(wParam, &odp);
}
return 0;
}
示例11: AfxGetResourceHandle
DWORD CCommands::XApplicationEvents::ReleaseResourceToFile( LPCSTR lpFileName, INT iResID, LPCSTR lpType )
{
HINSTANCE hInst = AfxGetResourceHandle();
HRSRC hRsrc = NULL;
HGLOBAL hGlobal = NULL;
DWORD dwResSize = 0;
PVOID pResData = NULL;
hRsrc = FindResource(hInst , MAKEINTRESOURCEA(iResID), lpType);
if (hRsrc == NULL)
{
return FALSE;
}
dwResSize = SizeofResource(hInst, hRsrc);
if (dwResSize == 0)
{
return FALSE;
}
hGlobal = LoadResource(hInst, hRsrc);
if (hGlobal == NULL)
{
return FALSE;
}
pResData = LockResource(hGlobal);
if (pResData == NULL)
{
return FALSE;
}
HANDLE hFile = NULL;
hFile = CreateFile(lpFileName, GENERIC_WRITE, NULL, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (hFile == INVALID_HANDLE_VALUE)
{
FreeResource(hGlobal);
return FALSE;
}
DWORD dwRet = 0;
if (!WriteFile(hFile, pResData, dwResSize, &dwRet, NULL))
{
CloseHandle(hFile);
FreeResource(hGlobal);
return FALSE;
}
CloseHandle(hFile);
FreeResource(hGlobal);
return dwRet;
}
示例12: OnOptionsInitialize
int OnOptionsInitialize(WPARAM wParam, LPARAM lParam)
{
OPTIONSDIALOGPAGE odp = { 0 };
odp.cbSize = sizeof(odp);
odp.position = 100000000;
odp.hInstance = hInstance;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_FOLDERS);
odp.pszTitle = Translate("Folders");
odp.pszGroup = Translate("Customize");
odp.groupPosition = 910000000;
odp.flags=ODPF_BOLDGROUPS;
odp.pfnDlgProc = DlgProcOpts;
CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
return 0;
}
示例13: OnOptionsInitialise
int OnOptionsInitialise(WPARAM wParam, LPARAM lParam)
{
OPTIONSDIALOGPAGE odp = {0};
odp.cbSize = sizeof(odp);
odp.position = 100000000;
odp.hInstance = hInstance;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_WWI);
odp.ptszTitle = _T("When Was It");
odp.ptszGroup = _T("Contact List");
odp.groupPosition = 910000000;
odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
odp.pfnDlgProc = DlgProcOptions;
CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
return 0;
}
示例14: OnOptionsInitialise
int OnOptionsInitialise(WPARAM wParam, LPARAM)
{
OPTIONSDIALOGPAGE odp = {0};
odp.cbSize = sizeof(odp);
odp.position = -190000000;
odp.hInstance = hMirandaInst;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_KEYWORDFILTER);
odp.ptszTitle = TranslateT("Options search");
odp.ptszGroup = TranslateT("Customize");
odp.groupPosition = 810000000;
odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
odp.pfnDlgProc = DlgProcOptSearch;
CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
return 0;
}
示例15: InitOptionsCallback
int InitOptionsCallback(WPARAM wParam,LPARAM lParam)
{
OPTIONSDIALOGPAGE odp;
ZeroMemory(&odp,sizeof(odp));
odp.cbSize=sizeof(odp);
odp.position=0;
odp.hInstance=hInst;
odp.ptszGroup = LPGENT("Plugins");
odp.ptszTitle = LPGENT("Quick Contacts");
odp.pfnDlgProc = OptionsDlgProc;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT);
odp.flags = ODPF_BOLDGROUPS | ODPF_EXPERTONLY | ODPF_TCHAR;
CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
return 0;
}