Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
End Users
Pocket PCActiveSyncMultimediaEBooksWirelessSmartPhones
Developers
Windows MobileSmartPhonesWinCE ProgrammingVB for WinCEVC++ for WinCEPlatform BuilderTest Tools
PocketPC DirectoryFree SoftwareWeb Resources
Related Topics
PalmMobile PhonesMore Topics ...

Pocket PC Forum / Developers / Windows Mobile / February 2008

Tip: Looking for answers? Try searching our database.

Hiding menu CDialog

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
marklt88 - 27 Feb 2008 20:38 GMT
Hello,

Is there a way to hide the menu bar at the bottom of the screen in dialog
box? I created a MFC dialog box application and put the following code in the
OnInitDialog function:

-- code snippet begin --

SHMENUBARINFO mbi;
ZeroMemory(&mbi, sizeof(SHMENUBARINFO));

mbi.cbSize     = sizeof(SHMENUBARINFO);
mbi.hwndParent = GetSafeHwnd();
mbi.dwFlags    = SHCMBF_HIDDEN;
// also tried using the SHCMBF_HIDESIPBUTTON flag with the HIDDEN flag
SHCreateMenuBar(&mbi);

-- code snippet end --

That didn't seem to work. It works when I created a Windows application and
put the code in response to the WM_CREATE message.

The other thing that would work for me is if I can draw over that menu bar
area.

Thank you in advance for your help.

----
mark
marklt88 - 29 Feb 2008 22:19 GMT
Answering my own question in case anyone else is interested in, I found the
answer here:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=118771&SiteID=1

Extracting the juicy parts:
 
BOOL Ctest_fullscreenDlg::OnInitDialog()
{
   CDialog::OnInitDialog();
   SHINITDLGINFO sid;
   sid.dwMask = SHIDIM_FLAGS;
   sid.dwFlags = SHIDIF_FULLSCREENNOMENUBAR;
   sid.hDlg = m_hWnd; ::SHInitDialog(&sid);
   HWND hBar =SHFindMenuBar(m_hWnd);
   ::ShowWindow(hBar,SW_HIDE);
    ......

Signature

----
mark

> Hello,
>
[quoted text clipped - 25 lines]
> ----
> mark
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.