Ejemplo n.º 1
0
int CreateWindows()
{ 
    if (!InitApplication(NULL)) 
        return FALSE; 
 
    if (!InitInstance(NULL, TRUE)) 
        return FALSE; 
 
    // register the video window class
    WNDCLASSEX wcx; 
 
    wcx.cbSize = sizeof(wcx);          // size of structure 
    wcx.style = 0;                     // redraw if size changes 
    wcx.lpfnWndProc = MainWndProc;     // points to window procedure 
    wcx.cbClsExtra = 0;                // no extra class memory 
    wcx.cbWndExtra = 0;                // no extra window memory 
    wcx.hInstance = NULL;              // handle to instance 
    wcx.hIcon = LoadIcon(NULL, 
        IDI_APPLICATION);              // predefined app. icon 
    wcx.hCursor = LoadCursor(NULL, 
        IDC_ARROW);                    // predefined arrow 
    wcx.hbrBackground = (HBRUSH)GetStockObject( 
        BLACK_BRUSH);                  // black background brush 
    wcx.lpszMenuName =  NULL;          // name of menu resource 
    wcx.lpszClassName = "PlaceCallVideoClass";  // name of window class 
    wcx.hIconSm = NULL;
    ATOM x = RegisterClassEx(&wcx);
    // create the Preview Window and the Video Window
    HWND hPreview = createPreviewWindow(hMain);
    HWND hVideo = createVideoWindow(hMain);
        
    return 0; 
} 
Ejemplo n.º 2
0
HWND CViewFinder::CreateViewerWindow(RECT& pos, eViewrWndMode eMode)
{	
    if(m_hwndPreview != NULL)
    {		
        DestroyViewerWindow();
    }
    m_PreviewWndParent = m_appMainWnd;
    if(eFullScreen == eMode)
    {
        //structure pos will be calculated in below call
        m_PreviewWndParent = createFullScreenWindow(m_appMainWnd, pos);
    }
    m_hwndPreview = createPreviewWindow(m_PreviewWndParent, pos);
    return m_hwndPreview;
}