I am creating a video capture application on a Windows Mobile device. MainFrame has a menu and a status window (custom window). Video width coefficient: the height ratio is 4: 3, so if some other elements appear on the screen, the video does not fill the entire area.
This is the function that organizes the screen elements:
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) { ToggleFullScreen(TRUE); CScreenOrientation::SetScreenOrientation(270); if (CFrameWnd::OnCreate(lpCreateStruct) == -1) return -1; RECT r; GetWindowRect(&r); if (!m_wndStatus.Create(NULL, NULL, WS_CHILD | WS_VISIBLE, CRect(0, 0, r.right, TOOLBAR_HEIGHT), this, AFX_IDW_PANE_FIRST + 1, NULL)) { TRACE0("Failed to create status view\n"); return -1; } // Create a camera view if (!m_wndCameraView.Create(NULL, NULL, AFX_WS_DEFAULT_VIEW, CRect(0, 0, 0, 0), this, AFX_IDW_PANE_FIRST, NULL)) { TRACE0("Failed to create camera view\n"); return -1; } m_wndCameraView.SetLogDirectory(m_Settings.m_LogDirectory); if (!m_wndCommandBar.Create(this) || !m_wndCommandBar.AddAdornments(dwAdornmentFlags) || !m_wndCommandBar.InsertMenuBar(IDR_MAINFRAME)) { TRACE0("Failed to create CommandBar\n"); return -1; // fail to create } m_wndCommandBar.SetBarStyle(m_wndCommandBar.GetBarStyle() | CBRS_SIZE_FIXED); m_QueueProgressData.SetHandle(this); // Update GUI state UpdateGUIState(); //VideoPreviewShow(); // TODO: check error m_SleepModeTimerID = SetTimer(1, (UINT)1000, (TIMERPROC)CMainFrame::SleepModeTimer); PostMessage(WM_CHECK_UPGRADE, 0, 0); return 0; }
Does anyone know if there is a way to fill in an empty area (an area not filled with the status window and menu bar) with previewing the video without changing the ratio of width and height (overwrite part of the preview of the video using the status bar and menu), possibly with a change Window Styles flags or any other approach?
c ++ windows-mobile size
Niko Gamulin
source share