这篇教程C++ CreateMainWindow函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中CreateMainWindow函数的典型用法代码示例。如果您正苦于以下问题:C++ CreateMainWindow函数的具体用法?C++ CreateMainWindow怎么用?C++ CreateMainWindow使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了CreateMainWindow函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: DTSTDMETHODIMP CUpgradrToolbar::SetSite(IUnknown *pUnknownSite){ DT(TRACE_I(FS(_T("Toolbar[%08X]: SetSite(%08X)"), this, pUnknownSite))); try { if (!!pUnknownSite) { // attach the window HWND hMyWindow; CComPtr<IUnknown> site(pUnknownSite); CComQIPtr<IOleWindow> window(site); window->GetWindow(&hMyWindow); if (!hMyWindow) { TRACE_E(FS(_T("Toolbar[%08X]: Cannot retrieve toolbar base window"), this)); return E_FAIL; } SubclassWindow(hMyWindow); // get a WebBrowser reference CComQIPtr<IServiceProvider> serviceProvider(site); serviceProvider->QueryService(IID_IWebBrowserApp, IID_IWebBrowser2, (void**)&m_spWebBrowser); site->QueryInterface(IID_IInputObjectSite, (void**)&m_spSite); // create main window CreateMainWindow(); } } catch (CUpgradrRuntimeError &ex) { HandleError(ex.ErrorMessage()); return E_FAIL; } return S_OK;}
开发者ID:cherry-wb,项目名称:upgradr,代码行数:35,
示例2: InitInstance//// FUNCTION: InitInstance(HINSTANCE, int)//// PURPOSE: Saves instance handle and creates main window//// COMMENTS://// In this function, we save the instance handle in a global variable and// create and display the main program window.//BOOL InitInstance(HINSTANCE hInstance, int nCmdShow){ INITCOMMONCONTROLSEX ics; ics.dwSize = sizeof(ics); ics.dwICC = ICC_WIN95_CLASSES; InitCommonControlsEx(&ics);#if !defined(PRODUCT) DebugLogClear();#endif Settings_Init(); //Joystick_Init(); //Joystick_SelectJoystick(Settings_GetJoystick()); if (!Emulator_Init()) return FALSE; int conf = Settings_GetConfiguration(); //if (conf == 0) //TODO if (!Emulator_InitConfiguration((NeonConfiguration)conf)) return FALSE; Emulator_SetSound(Settings_GetSound()); if (!CreateMainWindow()) return FALSE; return TRUE;}
开发者ID:VWarlock,项目名称:neonbtl,代码行数:37,
示例3: WinMainint WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow){ MSG msg = {0}; // Create the Main Window CreateMainWindow(hInstance, iCmdShow); // Initialize Everything! if(!Game::GetInstance()->Initialize(g_hwnd,hInstance)) return E_FAIL; while (WM_QUIT != msg.message) { if(PeekMessage(&msg, g_hwnd, 0, 0, PM_REMOVE)) { TranslateMessage (&msg); DispatchMessage (&msg); } else { Game::GetInstance()->Tick(); } } UnregisterClass( szAppName, wndclassex.hInstance ); return msg.wParam;}
开发者ID:TheOrestes,项目名称:D3D9,代码行数:28,
示例4: WinMainint WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow){ MSG msg; /* Application messages are saved here */ hInstance = hInst; hwndMain = CreateMainWindow(); if (!hwndMain) { MessageBox(NULL, "Unable to create window", "pTrans", MB_OK|MB_ICONSTOP); } /* Set the WS_EX_LAYERED style */ SetWindowLong(hwndMain, GWL_EXSTYLE, GetWindowLong(hwndMain, GWL_EXSTYLE) | WS_EX_LAYERED); /* Make the window 60% alpha */ SetLayeredWindowAttributes(hwndMain, 0, (255 * 60) / 100, LWA_ALPHA); /* Show the window */ ShowWindow(hwndMain, nCmdShow); /* Get message from the message queue */ while (GetMessage (&msg, NULL, 0, 0)) { /* Translates virtual key messages to character messages */ TranslateMessage(&msg); /* Sends message to the window proc */ DispatchMessage(&msg); } /* Return value, 0 if WM_QUIT message posted */ return msg.wParam;}
开发者ID:Investment89,项目名称:Public-Domain,代码行数:35,
示例5: WinMain//=============================================================================// Starting point for a Windows application//=============================================================================int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow){ MSG msg; // Create the main window if (!CreateMainWindow(hInstance, nCmdShow)) return false; for (int i = 0; i<256; i++) // initialize virtual key array vkKeys[i] = false; // main message loop int done = 0; while (!done) { if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { //look for quit message if (msg.message == WM_QUIT) done = 1; //decode and pass messages on to WinProc TranslateMessage(&msg); DispatchMessage(&msg); } } return msg.wParam;}
开发者ID:codebachi,项目名称:ProjectDX_Kelly,代码行数:35,
示例6: main/* fonction principale */int main(int argc,char *argv[]){ Window window; Display *display; Visual *visual; XEvent event; XImage *ximage; GC gc; int process_fils; int depth,done; long event_mask; char buffer; /* creation de la fenetre de l'application */ CreateMainWindow(SCREEN_WIDTH, SCREEN_HEIGHT, "Pong"); /* recuperation des variables */ window=GetAppWindow(); display=GetAppDisplay(); /* affichage de la fenetre */ XMapWindow(display,window); while(TRUE) Pong(); return 0;}
开发者ID:neriki,项目名称:old_c_exp,代码行数:30,
|