Professional UI Solutions
Site Map   /  Register


Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » I still have a problem with how to implement menu bar on dialog based application with office 2007 R Collapse All
Subject Author Date
huuhenbold boldoo Apr 10, 2007 - 5:05 AM

I read your help document that comes with your prof-uis trial version. It says belows:

Add a custom control to your dialog resource and specify the string "ProfUIS-ControlBar" as its window class, IDC_MY_MENUBAR as its control identifier, the value 0x50402034 as its window style and the zero value as its extended style.

It means that i should declare IDC_MY_MENUBAR as its control identifier with the value 0x50402034 as its window style in the resource.h header file. am I right?
And to specify the string "ProfUIS-ControlBar" as its window class, what should i do ? Because i don’t know what to do with it.

Please help.

please explain me as much detail as possible.

Suhai Gyorgy Apr 10, 2007 - 6:26 AM

If you are using Visual Studio, open your dialog in Resource Editor (look for your dialog’s identifier in the tree of the Resource View window). In Toolbox, look for the control type: Custom Control. Select it and place it on the top part of your dialog, where you’d like your menu bar to be. Select the newly created control by clickling on it. In the Properties window of Visual Studio, look for the property "Extended Style", enter value 0x0. Look for property "Style", enter value 0x50402034. Look for property "Class", enter the string ProfUIS-ControlBar. Look for property ID, enter string IDC_MY_MENUBAR. This last step will add the needed line in your resource.h file, you don’t need to enter anything in that file.

If you are using a text editor to modify your .rc file, you need to add the following line into your dialog’s code:
CONTROL "",IDC_MY_MENUBAR,"ProfUIS-ControlBar",0x50402034,5,0,443,13
(Last 4 numbers define place and size of the control, modify them to your own needs)
In this case you have to define the control ID IDC_MY_MENUBAR in resource.h file, enter a value that is one greater than the last control’s value.

huuhenbold boldoo Apr 12, 2007 - 12:05 AM

It worked.

Thanks Suhai Gyorgy.