Click here to Skip to main content
15,891,863 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: how to hide "main dialog" properly? Pin
mirex1-Dec-04 5:18
mirex1-Dec-04 5:18 
GeneralDocking Window Pin
Shree30-Nov-04 18:57
Shree30-Nov-04 18:57 
GeneralBorland C++ Pin
Member 147636730-Nov-04 18:49
Member 147636730-Nov-04 18:49 
GeneralRe: Borland C++ Pin
toxcct1-Dec-04 5:09
toxcct1-Dec-04 5:09 
GeneralResource Script Errors Pin
CNewbie30-Nov-04 17:58
CNewbie30-Nov-04 17:58 
GeneralRe: Resource Script Errors Pin
David Crow1-Dec-04 4:17
David Crow1-Dec-04 4:17 
GeneralMenu bar with controls Pin
Member 69142230-Nov-04 17:21
Member 69142230-Nov-04 17:21 
GeneralRe: Menu bar with controls Pin
Antti Keskinen30-Nov-04 21:08
Antti Keskinen30-Nov-04 21:08 
First off, what you are creating is a rebar control. This rebar control has two bands. First band is a menu bar control, and the second band is a combobox control.

Note that a menu bar control is NOT a CMenu object. MFC does not directly support a menu bar (as far as I remember), so you must design one yourself. A menu bar, basically, is a toolbar with a collection of text-only buttons. When clicking on a button, a pop-up menu is launched. This menu can be loaded from a resource, just like a normal pop-up menu would be.

To create a menu bar object, follow the implementation sample from MSDN here[^].

After this, create a CReBar control. From the frame window, remove the menu. Instead, add the CReBar, add the newly created menu bar control, and add the combo box control. You can add more controls if you want to. Then add the CReBar control into the frame window. Voila, you're done.

-Antti Keskinen

----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
GeneralRe: Menu bar with controls Pin
toxcct1-Dec-04 5:46
toxcct1-Dec-04 5:46 
QuestionHow to draw a bitmap from the memory. Pin
paul_0730-Nov-04 16:20
paul_0730-Nov-04 16:20 
AnswerRe: How to draw a bitmap from the memory. Pin
rw1041-Dec-04 2:10
rw1041-Dec-04 2:10 
GeneralRe: How to draw a bitmap from the memory. Pin
paul_071-Dec-04 13:50
paul_071-Dec-04 13:50 
GeneralRe: How to draw a bitmap from the memory. Pin
rw1042-Dec-04 2:59
rw1042-Dec-04 2:59 
GeneralOverlay window Pin
Vivi Chellappa30-Nov-04 15:02
professionalVivi Chellappa30-Nov-04 15:02 
GeneralBitmap print problem Pin
lisoft30-Nov-04 14:10
lisoft30-Nov-04 14:10 
GeneralRe: Bitmap print problem Pin
Christian Graus30-Nov-04 14:42
protectorChristian Graus30-Nov-04 14:42 
GeneralRe: Bitmap print problem Pin
lisoft30-Nov-04 15:03
lisoft30-Nov-04 15:03 
GeneralRe: Bitmap print problem Pin
Yulianto.30-Nov-04 19:40
Yulianto.30-Nov-04 19:40 
GeneralRe: Bitmap print problem Pin
rw1041-Dec-04 2:04
rw1041-Dec-04 2:04 
GeneralRe: Bitmap print problem Pin
rw1041-Dec-04 2:12
rw1041-Dec-04 2:12 
GeneralRe: Bitmap print problem Pin
lisoft1-Dec-04 14:13
lisoft1-Dec-04 14:13 
Generalproblem with WNetAddConnection2 and WNetCancelConnection2!! Pin
venadder30-Nov-04 11:44
venadder30-Nov-04 11:44 
GeneralRe: problem with WNetAddConnection2 and WNetCancelConnection2!! Pin
hillclymr1-Dec-04 5:09
hillclymr1-Dec-04 5:09 
Generalstring problem! ahh Pin
Anonymous30-Nov-04 11:22
Anonymous30-Nov-04 11:22 
GeneralRe: string problem! ahh Pin
PJ Arends30-Nov-04 12:29
professionalPJ Arends30-Nov-04 12:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.