|
@@ -281,7 +281,7 @@ int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
|
|
|
context.m_pCurrentDoc = m_pDoc;
|
|
|
context.m_pNewViewClass = RUNTIME_CLASS(CUB530View);
|
|
|
context.m_pNewDocTemplate = m_pDoc->GetDocTemplate();
|
|
|
- if (m_pUB530View->LoadFrame(DLG_UB530VIEW, WS_MAXIMIZE | WS_OVERLAPPEDWINDOW /*WS_CHILDWINDOW*/, this, &context))
|
|
|
+ if (m_pUB530View->LoadFrame(DLG_UB530VIEW, WS_MAXIMIZE | WS_CHILDWINDOW, this, &context))
|
|
|
{
|
|
|
//m_pUB530View->ShowWindow(SW_SHOWMAXIMIZED);
|
|
|
m_pUB530View->InitialUpdateFrame(context.m_pCurrentDoc, FALSE);
|
|
@@ -312,7 +312,7 @@ int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
|
|
|
context2.m_pNewViewClass = RUNTIME_CLASS(CDeviceView);
|
|
|
context2.m_pNewDocTemplate = m_pDoc->GetDocTemplate();
|
|
|
// 说明:DLG_DEVICEMANAGER对话框的Style属性必须设置成Child才能LoadFrame成功;
|
|
|
- if (m_pDeviceView->LoadFrame(DLG_DEVICEMANAGER, WS_MAXIMIZE | WS_CHILDWINDOW| WS_OVERLAPPEDWINDOW, this, &context2))
|
|
|
+ if (m_pDeviceView->LoadFrame(DLG_DEVICEMANAGER, WS_MAXIMIZE | WS_CHILDWINDOW, this, &context2))
|
|
|
{
|
|
|
//m_pDeviceView->ShowWindow(SW_SHOWMAXIMIZED);
|
|
|
m_pDeviceView->InitialUpdateFrame(NULL, FALSE);
|
|
@@ -686,9 +686,8 @@ BOOL CMainFrame::PreTranslateMessage(MSG* pMsg)
|
|
|
static BOOL bTopWnd = FALSE;
|
|
|
if (pMsg->message == WM_KEYDOWN)
|
|
|
{
|
|
|
- switch (pMsg->wParam)
|
|
|
+ if (pMsg->wParam == VK_F3)
|
|
|
{
|
|
|
- case VK_F3:
|
|
|
if (bTopWnd == FALSE)
|
|
|
{
|
|
|
SetWindowPos(&wndTopMost, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);//窗口置顶
|
|
@@ -699,10 +698,11 @@ BOOL CMainFrame::PreTranslateMessage(MSG* pMsg)
|
|
|
SetWindowPos(&wndNoTopMost, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);//取消窗口置顶
|
|
|
SetWindowText(_T("视频采集卡-取消前置(请按F3取消或开启前置)"));
|
|
|
}
|
|
|
+
|
|
|
bTopWnd = !bTopWnd;
|
|
|
- break;
|
|
|
- default:
|
|
|
- break;
|
|
|
+
|
|
|
+ // 必须退出,否则执行2次;
|
|
|
+ return TRUE;
|
|
|
}
|
|
|
}
|
|
|
|