Re: app with command bar, but no menu bar
> Thanks for the reply. If I can send any info, please let me know.
I'm using V 1.23, and I've debugged this problem because I
want the same thing - no menu. Here is what I found out:
v\srcwin\vapp.cpp:275 Calls the Win32 function ::CreateWindow
_Frame = ::CreateWindow(szMdiFrameClass, _name,
WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN | WS_MAXIMIZE |
WS_VISIBLE | WS_MAXIMIZEBOX | WS_MINIMIZEBOX,
CW_USEDEFAULT, CW_USEDEFAULT,
// _DefaultWidth,_DefaultHeight,
(_frameWidth == 0) ? CW_USEDEFAULT : _frameWidth,
(_frameHeight == 0) ? CW_USEDEFAULT : _frameHeight,
NULL, hFrameMenu, (HINSTANCE)hInstance, NULL);
This hFrameMenu is custom built in the preceding code,
but according to MSDN documentation, we can pass NULL
(in some situations) instead:
hMenu
Handle to a menu, or specifies a child-window identifier depending
on the window style. For an overlapped or pop-up window, hMenu
identifies the menu to be used with the window; it can be NULL
if the class menu is to be used. For a child window, hMenu
specifies the child-window identifier, an integer value used by
a dialog box control to notify its parent about events. The
application determines the child-window identifier; it must
be unique for all child windows with the same parent window.
So, I would suggest changing this hFrameMenu parameter of
CreateWindow is NULL. Maybe it won't work - but it's
worth a try. (Let me know if it works!) In any case,
this is the area of V that needs to be looked at to
support optional menus. Most likely this was put here
for a reason, and we'll have to wait for someone who
knows what they're doing.
Hope it helps,
Nigel Stewart
--
Nigel Stewart (nigels@nigels.com)
Research Student, Software Developer
Y2K is the new millenium for the mathematically challenged.
Reply to: