Problem in adding menu to dialog

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi
i have a dialog based application in evc4 where i am trying to add a menu.
I have created a menu resource "IDR_MENU1" and am tryingto add it to my
dialog.

BOOL CHelloDlg:nInitDialog()
{
CDialog:nInitDialog();

// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
CenterWindow(GetDesktopWindow()); // center to the hpc screen

// TODO: Add extra initialization here

//My Code
SHMENUBARINFO mbi;

memset(&mbi, 0, sizeof(SHMENUBARINFO));
mbi.cbSize = sizeof(SHMENUBARINFO);
mbi.hwndParent = this->m_hWnd;
mbi.dwFlags = SHCMBF_HMENU;
mbi.nToolBarId =IDR_MENU1; // this is menu resource ID
mbi.hInstRes =AfxGetInstanceHandle();// g_hInst;
SHCreateMenuBar(&mbi);

return TRUE; // return TRUE unless you set the focus to a control
}
i see that the menu is created but is not part of the dialog box.
In fact it becomes part of the main window i.e the menu can be seen at the
bottom of the emulator window.
How can i make the menu to be a part of the Dialog box of my application??


.



Relevant Pages

  • Re: Problem in adding menu to dialog
    ... i have a dialog based application in evc4 where i am trying to add a menu. ... I have created a menu resource "IDR_MENU1" and am tryingto add it to my ... You don't say what platform you are targeting. ... In fact it becomes part of the main window i.e the menu can be seen at the ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: Multithreaded IntPtr Hdc problem - Common or obscure error?
    ... Hello James, ... is probably due to two threads trying to use the same resource. ... If the window grabbing is fast enough that a dropped "frame" is not ... > int usedHeight = rect.Height; ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: [Tk] Double, Triple, Quadruple,
    ... But window system managers have their own settings about the time between two ... For mouse clicks, you do have timers, but only for the Double- etc ... distributed through the X resource system using the "multiClickTime" ... but does not act on multiClickTime. ...
    (comp.lang.tcl)
  • Re: Multiple source on single task
    ... Good morning Julie, ... Ok, I'm on that window. ... I have the "Clear leveling values before leveling" checked ... I hit the "Level Now" button for the selected resource and it fixed it. ...
    (microsoft.public.project)
  • Re: [patch 2/5] Staging: vme: add VME userspace driver
    ... The core, or a layer above it, can control how those resources are used. ... So it's foolish to have a generic USB layer, or a generic PCI layer or generic "name you bus here" layer? ... What about a driver only needed to access CR/CSR space, then utilized a DMA controller to transfer data over the VME bus (thereby not requiring a master or slave window). ... we just share the 'resource management' code among those, ...
    (Linux-Kernel)