Hi,

I use a property sheet in which only the first page is in fullscreen
mode.
For that, I call SHFullScreen in the OnSetActive and the OnKillActive
of the first page.

Sometimes, I need to display a MessageBox, but when I click the
MessageBox off it makes my fullscreen off too.

I tried to use the OnActivate message to restore the fullscreen state
but I didn't succeed.
It seems messages don't arrive in the order I expect.
Does someone know what happens when we close a message box over a
property sheet?
In which order do the messages arrive?
What is the appropriate message to restore the fullscreen mode?

I made a lot of tests without success, I really need a clue.

Thanks.

PS : I use EVC++ 4 and PocketPC 2003 SDK

Re: Losing fullscreen in my property sheet by Karl

Karl
Wed Jan 21 08:26:17 CST 2004

I have been working with this problem as well. If the MessageBox is called
from the active property sheet, call your FullScreen method after the
MessageBox call. I am still looking for a way to do this with a modeless
dialog, when the MessageBox is called by a separate process. Anyone help
here?
Regards, Karl

"Goophyx" <guillaume.david@mensi.com> wrote in message
news:50adb3cc.0401190857.64c188a1@posting.google.com...
> Hi,
>
> I use a property sheet in which only the first page is in fullscreen
> mode.
> For that, I call SHFullScreen in the OnSetActive and the OnKillActive
> of the first page.
>
> Sometimes, I need to display a MessageBox, but when I click the
> MessageBox off it makes my fullscreen off too.
>
> I tried to use the OnActivate message to restore the fullscreen state
> but I didn't succeed.
> It seems messages don't arrive in the order I expect.
> Does someone know what happens when we close a message box over a
> property sheet?
> In which order do the messages arrive?
> What is the appropriate message to restore the fullscreen mode?
>
> I made a lot of tests without success, I really need a clue.
>
> Thanks.
>
> PS : I use EVC++ 4 and PocketPC 2003 SDK



Re: Losing fullscreen in my property sheet by guillaume

guillaume
Fri Jan 23 02:11:54 CST 2004

Thanks replying so fast. I followed your advice but it has a strange
behavior:
The fullscreen is restored but the bottom of the screen isn't
repainted as if the window size was still small...
Have you also seen that?

For your problem, maybe you can use the OnEraseBackground message of
the dialog that should be called at the MessageBox close.

Re: Losing fullscreen in my property sheet by guillaume

guillaume
Fri Jan 23 03:23:27 CST 2004

I realized I was using a modless dialog somewhere else in my prog.
I also have a MessageBox to display in, here is how I do:

I declared a USER message that I branched to the following method
void CMyDialog::OnFullScreenRefresh(WPARAM wParam, LPARAM lParam)
{
RefreshFullScreen(this, m_pWndEmptyCB->m_hWnd );
}

BOOL CMyDialog::RefreshFullScreen(CWnd *pWnd, HWND hCommandBar)
{
SHSipPreference(pWnd->m_hWnd, SIP_FORCEDOWN);
SetForegroundWindow();
::CommandBar_Show(hCommandBar, FALSE);
SHFullScreen(pWnd->m_hWnd, SHFS_HIDETASKBAR|SHFS_HIDESIPBUTTON);
return TRUE;
}

I use the OnActivate message that is automatically called after the MessageBox close

void CMyDialog::OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized)
{
CDialog::OnActivate(nState, pWndOther, bMinimized);
if (nState!=WA_INACTIVE)
{
PostMessage(WM_USER_REFRESH_FULLSCREEN);
}
}

Good luck

Re: Losing fullscreen in my property sheet by anonymous

anonymous
Fri Jan 23 05:36:05 CST 2004

If you do following in OnActivate It whould help, but screen will flic :((
What to do - it is not nice to see menu and status every time for fraction of a second

SHINITDLGINFO shidi
shidi.dwMask = SHIDIM_FLAGS
shidi.dwFlags = SHIDIF_FULLSCREENNOMENUBAR|SHIDIF_SIPDOWN
shidi.hDlg = m_hWnd
SHInitDialog(&shidi)

#define MENU_HEIGHT 2
RECT rect
GetWindowRect(&rect)
rect.top -= MENU_HEIGHT
MoveWindow(&rect, TRUE);

::CommandBar_Show(m_pWndEmptyCB->m_hWnd, FALSE)
SetForegroundWindow();
SHFullScreen(m_hWnd, SHFS_HIDETASKBAR | SHFS_HIDESIPBUTTON |SHFS_HIDESTARTICON)



Re: Losing fullscreen in my property sheet by anonymous

anonymous
Wed Feb 11 07:21:08 CST 2004

I'm an Idiot!!!!!!!!!!!!!!!!!!!!!!

I should not call "CDialog::OnActivate(nState, pWndOther, bMinimized);"
inside my own OnActivate handler!!!!!!!!!

It works!!!!!!
:)