Esempio n. 1
0
 void* CSysWindow::GetNativeWindowHandle(const WindowHandle& handle)
 {
     IZ_ASSERT(handle != IZ_NULL);
 
     CWindow* window = (CWindow*)handle;
     return window->GetHWND();
 }
Esempio n. 2
0
    // ループ実行.
    void CSysWindow::RunLoop(const WindowHandle& handle)
    {
        IZ_ASSERT(handle != IZ_NULL);
    
        CWindow* window = (CWindow*)handle;
        HWND hWnd = window->GetHWND();

        CMessageHandler* msgHandler = sMsgHandlerMgr.FindData((IZ_UINT64)hWnd);

        while (ProcMsg()) {
            if (msgHandler) {
                msgHandler->OnIdle();
            }
        }
    }
Esempio n. 3
0
    // ウインドウ破棄.
    void CSysWindow::Destroy(WindowHandle handle)
    {
        IZ_ASSERT(handle != IZ_NULL);

        CWindow* window = (CWindow*)handle;

        HDC hDC = window->GetHDC();
        HWND hWnd = window->GetHWND();
        HINSTANCE hInst = window->GetHINSTANCE();

        if (hDC) {
            ::ReleaseDC(hWnd, hDC);
        }

        if (hWnd) {
            DestroyWindow(hWnd);
        }

        if (hInst) {
            UnregisterClass(registerName, hInst);
        }

        CWindow::Destroy(window);
    }