当前位置: 首页>>代码示例>>C++>>正文


C++ MAKEINTRESOURCEW函数代码示例

本文整理汇总了C++中MAKEINTRESOURCEW函数的典型用法代码示例。如果您正苦于以下问题:C++ MAKEINTRESOURCEW函数的具体用法?C++ MAKEINTRESOURCEW怎么用?C++ MAKEINTRESOURCEW使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了MAKEINTRESOURCEW函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: OnLogOff

static
INT
OnLogOff(
    IN HWND hwndDlg,
    IN PGINA_CONTEXT pgContext)
{
    return pgContext->pWlxFuncs->WlxDialogBoxParam(
               pgContext->hWlx,
               pgContext->hDllInstance,
               MAKEINTRESOURCEW(IDD_LOGOFF_DLG),
               hwndDlg,
               LogOffDialogProc,
               (LPARAM)pgContext);
}
开发者ID:Strongc,项目名称:reactos,代码行数:14,代码来源:gui.c

示例2: OnShutDown

static
INT
OnShutDown(
    IN HWND hwndDlg,
    IN PGINA_CONTEXT pgContext)
{
    return pgContext->pWlxFuncs->WlxDialogBoxParam(
               pgContext->hWlx,
               pgContext->hDllInstance,
               MAKEINTRESOURCEW(IDD_SHUTDOWN_DLG),
               hwndDlg,
               ShutDownDialogProc,
               (LPARAM)pgContext);
}
开发者ID:Strongc,项目名称:reactos,代码行数:14,代码来源:gui.c

示例3: GUIDisplayLockedNotice

static VOID
GUIDisplayLockedNotice(
    IN OUT PGINA_CONTEXT pgContext)
{
    TRACE("GUIdisplayLockedNotice()\n");

    pgContext->pWlxFuncs->WlxDialogBoxParam(
        pgContext->hWlx,
        pgContext->hDllInstance,
        MAKEINTRESOURCEW(IDD_LOCKED_DLG),
        GetDesktopWindow(),
        LockedWindowProc,
        (LPARAM)pgContext);
}
开发者ID:Strongc,项目名称:reactos,代码行数:14,代码来源:gui.c

示例4: GUIDisplaySASNotice

static VOID
GUIDisplaySASNotice(
    IN OUT PGINA_CONTEXT pgContext)
{
    TRACE("GUIDisplaySASNotice()\n");

    /* Display the notice window */
    pgContext->pWlxFuncs->WlxDialogBoxParam(pgContext->hWlx,
                                            pgContext->hDllInstance,
                                            MAKEINTRESOURCEW(IDD_NOTICE_DLG),
                                            GetDesktopWindow(),
                                            EmptyWindowProc,
                                            (LPARAM)pgContext);
}
开发者ID:Strongc,项目名称:reactos,代码行数:14,代码来源:gui.c

示例5: UT_ASSERT

void XAP_Win32Dialog_WindowMore::runModal(XAP_Frame * pFrame)
{
	UT_ASSERT(pFrame);
	UT_ASSERT(m_id == XAP_DIALOG_ID_WINDOWMORE);
	
	// NOTE: this work could be done in XP code
	m_ndxSelFrame = m_pApp->findFrame(pFrame);
	UT_ASSERT(m_ndxSelFrame >= 0);

	// raise the dialog
	setDialog(this);
	createModal(pFrame, MAKEINTRESOURCEW(XAP_RID_DIALOG_WINDOWMORE));

}
开发者ID:tchx84,项目名称:debian-abiword-packages,代码行数:14,代码来源:xap_Win32Dlg_WindowMore.cpp

示例6: create_native_window

/*****************************************************
 * Hack ahead !!!
 *
 * Problems here have to do with focus handling, i.e.
 * sharing and passing keyboard focus back and forth from
 * the gecko window to the rest of the app. The gecko
 * wants us to turn focus on and off when we receive the
 * WM_ACTIVATE message for our window; Gtk+ does not give
 * us an opportunity to act on this message (TODO: patch
 * gtk+ to do so and run tests).
 *
 * Also tried to turn on and off focus near when activate
 * messages come (i.e. focus in/out of the toplevel window)
 * with no luck (works to get started, but the gecko
 * will never relinquish focus afterwords).
 *
 * The current hack/workaround:
 *   We are using a native toplevel window, that we reposition
 * to follow the widget hierarchy on toplevel configure events,
 * this way we handle the WM_ACTIVATE messages and focus handleing
 * works, on the other hand accelerators keys tied into the higher
 * level window wont trigger when the gecko has focus (is that
 * already the case ?) and the apps toplevel will be painted as
 * an inactive window.
 */
static HWND
create_native_window(GtkWidget *widget)
{
    static ATOM klass = 0;
    HWND window_handle, parent_handle;
    DWORD dwStyle, dwExStyle;

    if (!klass) {
         static WNDCLASSEXW wcl;

         wcl.cbSize = sizeof(WNDCLASSEX);
         wcl.style = 0;

        /* DON'T set CS_<H,V>REDRAW. It causes total redraw
         * on WM_SIZE and WM_MOVE. Flicker, Performance!
         */
         wcl.lpfnWndProc = (WNDPROC)window_procedure;
         wcl.cbClsExtra = 0;
         wcl.cbWndExtra = 0;
         wcl.hInstance = GetModuleHandle(NULL);
         wcl.hIcon = 0;
         wcl.hIconSm = 0;
         wcl.lpszMenuName = NULL;
         wcl.hIcon = NULL;
         wcl.hIconSm = NULL;
         wcl.hbrBackground = NULL;
         wcl.hCursor = LoadCursor(NULL, IDC_ARROW);
         wcl.lpszClassName = L"MozWindow";

         klass = RegisterClassExW(&wcl);
    }

    dwExStyle = WS_EX_TOOLWINDOW; // for popup windows
    dwStyle = WS_POPUP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS; // popup window

    parent_handle = (HWND)GDK_WINDOW_HWND(gtk_widget_get_parent_window(widget));
    window_handle = CreateWindowExW(dwExStyle,
                                    MAKEINTRESOURCEW(klass),
                                    L"",
                                    dwStyle,
                                    0, 0, 1, 1,
                                    parent_handle,
                                    NULL,
                                    GetModuleHandle(NULL),
                                    NULL);

    SetProp(window_handle, "moz-view-widget", (HANDLE)widget);

    return window_handle;
}
开发者ID:gistinc,项目名称:Gecko,代码行数:75,代码来源:moz-web-view.cpp

示例7: ISvItemCm_fnQueryContextMenu

/**************************************************************************
* ISvItemCm_fnQueryContextMenu()
*/
static HRESULT WINAPI ISvItemCm_fnQueryContextMenu(
	IContextMenu2 *iface,
	HMENU hmenu,
	UINT indexMenu,
	UINT idCmdFirst,
	UINT idCmdLast,
	UINT uFlags)
{
    ItemCmImpl *This = impl_from_IContextMenu2(iface);
    INT uIDMax;

    TRACE("(%p)->(hmenu=%p indexmenu=%x cmdfirst=%x cmdlast=%x flags=%x )\n",This, hmenu, indexMenu, idCmdFirst, idCmdLast, uFlags);

    This->verb_offset=idCmdFirst;

    if(!(CMF_DEFAULTONLY & uFlags) && This->cidl>0)
    {
        HMENU hmenures = LoadMenuW(shell32_hInstance, MAKEINTRESOURCEW(MENU_SHV_FILE));

        if(uFlags & CMF_EXPLORE)
            RemoveMenu(hmenures, FCIDM_SHVIEW_OPEN, MF_BYCOMMAND);

        uIDMax = Shell_MergeMenus(hmenu, GetSubMenu(hmenures, 0), indexMenu, idCmdFirst, idCmdLast, MM_SUBMENUSHAVEIDS);

        DestroyMenu(hmenures);

        if(This->bAllValues)
        {
            MENUITEMINFOW mi;
            WCHAR str[255];
            mi.cbSize = sizeof(mi);
            mi.fMask = MIIM_ID | MIIM_STRING | MIIM_FTYPE;
            mi.dwTypeData = str;
            mi.cch = 255;
            GetMenuItemInfoW(hmenu, FCIDM_SHVIEW_EXPLORE, MF_BYCOMMAND, &mi);
            RemoveMenu(hmenu, FCIDM_SHVIEW_EXPLORE, MF_BYCOMMAND);
            _InsertMenuItemW(hmenu, (uFlags & CMF_EXPLORE) ? 1 : 2, MF_BYPOSITION, FCIDM_SHVIEW_EXPLORE, MFT_STRING, str, MFS_ENABLED);
        }

        SetMenuDefaultItem(hmenu, 0, MF_BYPOSITION);

        if(uFlags & ~CMF_CANRENAME)
            RemoveMenu(hmenu, FCIDM_SHVIEW_RENAME, MF_BYCOMMAND);
        else
            EnableMenuItem(hmenu, FCIDM_SHVIEW_RENAME, MF_BYCOMMAND | ISvItemCm_CanRenameItems(This) ? MFS_ENABLED : MFS_DISABLED);

        return MAKE_HRESULT(SEVERITY_SUCCESS, 0, uIDMax-idCmdFirst);
    }
    return MAKE_HRESULT(SEVERITY_SUCCESS, 0, 0);
}
开发者ID:Sunmonds,项目名称:wine,代码行数:53,代码来源:shv_item_cmenu.c

示例8: DIALOG_FileSaveAs

BOOL DIALOG_FileSaveAs(VOID)
{
    OPENFILENAMEW saveas;
    WCHAR szPath[MAX_PATH];
    WCHAR szDir[MAX_PATH];
    static const WCHAR szDefaultExt[] = { 't','x','t',0 };
    static const WCHAR txt_files[] = { '*','.','t','x','t',0 };

    ZeroMemory(&saveas, sizeof(saveas));

    GetCurrentDirectoryW(ARRAY_SIZE(szDir), szDir);
    lstrcpyW(szPath, txt_files);

    saveas.lStructSize       = sizeof(OPENFILENAMEW);
    saveas.hwndOwner         = Globals.hMainWnd;
    saveas.hInstance         = Globals.hInstance;
    saveas.lpstrFilter       = Globals.szFilter;
    saveas.lpstrFile         = szPath;
    saveas.nMaxFile          = ARRAY_SIZE(szPath);
    saveas.lpstrInitialDir   = szDir;
    saveas.Flags          = OFN_ENABLETEMPLATE | OFN_ENABLEHOOK | OFN_EXPLORER |
                            OFN_PATHMUSTEXIST | OFN_OVERWRITEPROMPT |
                            OFN_HIDEREADONLY | OFN_ENABLESIZING;
    saveas.lpfnHook          = OfnHookProc;
    saveas.lpTemplateName    = MAKEINTRESOURCEW(IDD_OFN_TEMPLATE);
    saveas.lpstrDefExt       = szDefaultExt;

    /* Preset encoding to what file was opened/saved last with. */
    Globals.encOfnCombo = Globals.encFile;
    Globals.bOfnIsOpenDialog = FALSE;

retry:
    if (!GetSaveFileNameW(&saveas))
        return FALSE;

    switch (DoSaveFile(szPath, Globals.encOfnCombo))
    {
        case SAVED_OK:
            SetFileNameAndEncoding(szPath, Globals.encOfnCombo);
            UpdateWindowCaption();
            return TRUE;

        case SHOW_SAVEAS_DIALOG:
            goto retry;

        default:
            return FALSE;
    }
}
开发者ID:bilboed,项目名称:wine,代码行数:49,代码来源:dialog.c

示例9: AddTool

BOOL CToolTipCtrl::AddTool(HWND hWnd,UINT nIDText,LPCRECT lpRectTool,UINT nIDTool,LPARAM lParam)
{
	if (IsUnicodeSystem())
	{
		TOOLINFOW ti;
		ti.cbSize=TTTOOLINFOW_V2_SIZE;
		ti.uFlags=TTF_SUBCLASS;
		ti.hwnd=hWnd;
		ti.uId=nIDTool;
		ti.hinst=GetLanguageSpecificResourceHandle();
		ti.lpszText=MAKEINTRESOURCEW(nIDText);
		ti.lParam=lParam;	
		if (lpRectTool!=NULL)
			ti.rect=*lpRectTool;
		else if (hWnd!=NULL)
			::GetClientRect(hWnd,&ti.rect);
		else
		{
			ti.rect.left=0;
			ti.rect.right=0;
			ti.rect.top=0;
			ti.rect.bottom=0;
		}
		return (BOOL)::SendMessageW(m_hWnd,TTM_ADDTOOLW,0,(LPARAM)&ti);
	}
	else
	{
		TOOLINFO ti;
		ti.cbSize=TTTOOLINFOA_V2_SIZE;
		ti.uFlags=TTF_SUBCLASS;
		ti.hwnd=hWnd;
		ti.uId=nIDTool;
		ti.hinst=GetLanguageSpecificResourceHandle();
		ti.lpszText=MAKEINTRESOURCE(nIDText);
		ti.lParam=lParam;	
		if (lpRectTool!=NULL)
			ti.rect=*lpRectTool;
		else if (hWnd!=NULL)
			::GetClientRect(hWnd,&ti.rect);
		else
		{
			ti.rect.left=0;
			ti.rect.right=0;
			ti.rect.top=0;
			ti.rect.bottom=0;
		}
		return (BOOL)::SendMessage(m_hWnd,TTM_ADDTOOL,0,(LPARAM)&ti);
	}
}
开发者ID:joshball,项目名称:locate32-cogit.net,代码行数:49,代码来源:CommonControls.cpp

示例10: DownloadDlgProc

static
INT_PTR CALLBACK
DownloadDlgProc(HWND Dlg, UINT Msg, WPARAM wParam, LPARAM lParam)
{
    HANDLE Thread;
    DWORD ThreadId;
    HWND Item;

    switch (Msg)
    {
        case WM_INITDIALOG:

            hIcon = LoadIconW(hInst, MAKEINTRESOURCEW(IDI_MAIN));
            if (hIcon)
            {
                SendMessageW(Dlg, WM_SETICON, ICON_BIG, (LPARAM) hIcon);
                SendMessageW(Dlg, WM_SETICON, ICON_SMALL, (LPARAM) hIcon);
            }

            SetWindowLongPtrW(Dlg, GWLP_USERDATA, 0);
            Item = GetDlgItem(Dlg, IDC_DOWNLOAD_PROGRESS);
            if (Item)
            {
                SendMessageW(Item, PBM_SETRANGE, 0, MAKELPARAM(0, 100));
                SendMessageW(Item, PBM_SETPOS, 0, 0);
            }

            Thread = CreateThread(NULL, 0, ThreadFunc, Dlg, 0, &ThreadId);
            if (!Thread) return FALSE;
            CloseHandle(Thread);
            return TRUE;

        case WM_COMMAND:
            if (wParam == IDCANCEL)
            {
                SetWindowLongPtrW(Dlg, GWLP_USERDATA, 1);
                PostMessageW(Dlg, WM_CLOSE, 0, 0);
            }
            return FALSE;

        case WM_CLOSE:
            if (hIcon) DestroyIcon(hIcon);
            EndDialog(Dlg, 0);
            return TRUE;

        default:
            return FALSE;
    }
}
开发者ID:Strongc,项目名称:reactos,代码行数:49,代码来源:loaddlg.cpp

示例11: WinMain

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
	FPS = 1/60;
	interval = 1000*FPS;
	HWND hwnd;
	MSG msg 		= {0};
	WNDCLASSEX wc	= {0};
	wc.cbSize 		= sizeof(WNDCLASSEX);
	wc.lpfnWndProc 	= WndProc;
	wc.hInstance 	= GetModuleHandle(NULL);
	wc.hbrBackground = (HBRUSH)(COLOR_BACKGROUND);
	wc.lpszClassName = "Hello,world";
	wc.style = CS_OWNDC;
	wc.cbClsExtra = 0;
	wc.cbWndExtra = 0;
	wc.hCursor		= LoadCursor(NULL,IDC_ARROW);
	wc.hIcon		= LoadIconW(NULL,MAKEINTRESOURCEW(IDI_APPLICATION));
	wc.hIconSm		= LoadIconW(NULL,MAKEINTRESOURCEW(IDI_APPLICATION));
	if(!RegisterClassEx(&wc))
		return 1;
	hwnd = CreateWindowW(L"Hello,World",L"Hello,World",WS_OVERLAPPEDWINDOW|WS_VISIBLE,0,0,640,480,0,0,hInstance,0);
	ShowWindow(hwnd, nCmdShow);              //display the window on the screen
	UpdateWindow(hwnd);
	while(GetMessage(&msg,NULL,0,0) > 0)
	{
		DispatchMessage(&msg);
		time_t elapse = time(NULL) - appTime;
		if(elapse >= interval)
		{
			appTime += elapse;
		}
	}
		
	
	return 0;
}
开发者ID:ECNU-ZR,项目名称:physwf-c-lab,代码行数:36,代码来源:main.cpp

示例12: slot1Dialog

void slot1Dialog(HWND hwnd)
{
	strcpy(tmp_fat_path, slot1_GetFatDir().c_str());
	strcpy(tmp_fs_path, path.getpath(path.SLOT1D).c_str());
	temp_type_slot1 = slot1_GetCurrentType();
	last_type_slot1 = temp_type_slot1;
	_OKbutton_slot1 = false;
	needReset_slot1 = true;
	u32 res=DialogBoxW(hAppInst, MAKEINTRESOURCEW(IDD_SLOT1CONFIG), hwnd, (DLGPROC)Slot1Box_Proc);
	if (res)
	{
		switch (temp_type_slot1)
		{
			case NDS_SLOT1_NONE:
				if (temp_type_slot1 != slot1_GetCurrentType())
					needReset_slot1 = true;
				else
					needReset_slot1 = false;
				break;
			case NDS_SLOT1_RETAIL_AUTO:
			case NDS_SLOT1_RETAIL_MCROM:
				break;
			case NDS_SLOT1_R4:
				if (strlen(tmp_fat_path))
				{
					slot1_SetFatDir(tmp_fat_path);
					WritePrivateProfileString("Slot1","FAT_path",tmp_fat_path,IniName);
				}
				break;
			case NDS_SLOT1_RETAIL_NAND:
				break;
			case NDS_SLOT1_RETAIL_DEBUG:
				if (strlen(tmp_fs_path))
				{
					path.setpath(path.SLOT1D, tmp_fs_path);
					WritePrivateProfileString(SECTION, SLOT1DKEY, path.pathToSlot1D, IniName);
				}
				break;
			default:
				return;
		}
		WritePrivateProfileInt("Slot1","type",temp_type_slot1,IniName);

		slot1_Change((NDS_SLOT1_TYPE)temp_type_slot1);
		
		return;
	}
}
开发者ID:rafaelmessias,项目名称:desmume,代码行数:48,代码来源:slot1_config.cpp

示例13: RecycleBinMenu_QueryContextMenu

static HRESULT WINAPI RecycleBinMenu_QueryContextMenu(IContextMenu2 *iface,
                                                      HMENU hmenu,
                                                      UINT indexMenu,
                                                      UINT idCmdFirst,
                                                      UINT idCmdLast,
                                                      UINT uFlags)
{
    HMENU menures = LoadMenuW(shell32_hInstance,MAKEINTRESOURCEW(MENU_RECYCLEBIN));
    if(uFlags & CMF_DEFAULTONLY)
        return E_NOTIMPL;
    else{
        UINT idMax = Shell_MergeMenus(hmenu,GetSubMenu(menures,0),indexMenu,idCmdFirst,idCmdLast,MM_SUBMENUSHAVEIDS);
        TRACE("Added %d id(s)\n",idMax-idCmdFirst);
        return MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_NULL, idMax-idCmdFirst+1);
    }
}
开发者ID:YokoZar,项目名称:wine,代码行数:16,代码来源:recyclebin.c

示例14: UT_return_if_fail

void AP_Win32Dialog_FormatFrame::runModeless(XAP_Frame * pFrame)
{
	UT_return_if_fail (pFrame);		

	UT_return_if_fail (m_id == AP_DIALOG_ID_FORMAT_FRAME);	

	 createModeless(pFrame, MAKEINTRESOURCEW(AP_RID_DIALOG_FORMATFRAME));

	// Save dialog the ID number and pointer to the widget
	UT_sint32 sid =(UT_sint32)  getDialogId();
	m_pApp->rememberModelessId( sid, (XAP_Dialog_Modeless *) m_pDialog);

	ShowWindow(m_hDlg, SW_SHOW);
	BringWindowToTop(m_hDlg);	
		
}
开发者ID:lokeshguddu,项目名称:AbiWord,代码行数:16,代码来源:ap_Win32Dialog_FormatFrame.cpp

示例15: FsExecuteFileW

int __stdcall FsExecuteFileW(HWND MainWin, WCHAR* RemoteName, WCHAR* Verb) {
    INT_PTR dlgResult = 0;
    if(wcscmp(Verb, L"open") == 0 && wcscmp(RemoteName, L"\\[²Ù×÷]ÐÂÔöÍøÅÌ") == 0) {
        if(!available_disk_entries_length) {
            RequestProcW(PluginNumber, RT_MsgOK, L"ÅäÖôíÎó", L"ÍøÅ̽ű¾´íÎó, ûÓÐÉèÖÃÈκÎÓÐЧµÄÍøÅÌÅäÖÃÎļþ. ", NULL, 0);
            return FS_EXEC_ERROR;
        }
        dlgResult = DialogBoxW((HINSTANCE)hInst, MAKEINTRESOURCEW(IDD_NEW), GetActiveWindow(), NewdiskProc);
        if(dlgResult == IDOK) {
            wcslcpy(RemoteName, L"\\", PATH_MAX);
            return FS_EXEC_SYMLINK;
        }
        return FS_EXEC_OK;
    }
    return FS_EXEC_ERROR;
}
开发者ID:kerneltravel,项目名称:netdisk4tc,代码行数:16,代码来源:ndpluginw.c


注:本文中的MAKEINTRESOURCEW函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。