Home > Software engineering >  MFC dialog box full screen problem
MFC dialog box full screen problem

Time:10-09

Is to modify a software, at present in a window on a static area of image display, I'm in the area after the zoom to full screen, did not receive the mouse message, window can be received,
 
If (m_bFullScreen)
{
M_staticRecordFileVideoArea. SetWindowPlacement (& amp; M_WndPlace);
M_staticRecordFileVideoArea. SetParent (this);

M_bFullScreen=FALSE;
This - & gt; ShowWindow (SW_SHOW);

If (m_iScreenPlayOrPause==0)
{
OnBnClickedButtonBackrecordplay ();
}
Else if (m_iScreenPlayOrPause==1)
{
OnBnClickedButtonBackrecordpause ();
}

M_pPlayFull - & gt; ShowWindow (SW_HIDE);
}
The else
{
M_bFullScreen=true;

M_staticRecordFileVideoArea. GetWindowPlacement (& amp; M_WndPlace);
M_staticRecordFileVideoArea. SetParent (this);
: : GetWindowRect (HWND, & amp; M_rect);
DwStyle=: : GetWindowLong (HWND, GWL_STYLE);
: : SetParent (HWND, NULL);
: : SetWindowPos (HWND HWND_TOPMOST, 0, 0, GetSystemMetrics (SM_CXSCREEN), GetSystemMetrics (SM_CYSCREEN),
SWP_SHOWWINDOW | SWP_FRAMECHANGED | SWP_DRAWFRAME);

M_bFullScreen=TRUE;
M_staticRecordFileVideoArea. SetFocus ();

If (m_iScreenPlayOrPause==0)
{
OnBnClickedButtonBackrecordpause ();
}
Else if (m_iScreenPlayOrPause==1)
{
OnBnClickedButtonBackrecordplay ();
}

This - & gt; ShowWindow (SW_HIDE);
}

CodePudding user response:

Modify the static attributes SS_NOTIFY to true so that it can receive messages

CodePudding user response:

Increase the notify attribute, is off by default,

CodePudding user response:

Upstairs are said two notify attributes

CodePudding user response:

WM_PARENTNOTIFY news, don't set the corresponding control WS_EX_NOPARENTNOTIFY extension style
By default, the dialog box controls set WS_EX_NOPARENTNOTIFY, neither send WM_PARENTNOTIFY

CodePudding user response:

CodePudding user response:

Try the full screen window of attribute WS_POPUP instead
  • Related