![]() |
CXTPMenuBar only shows when mouse hovered over it. |
Post Reply
|
| Author | |
BobWansink
Groupie
Joined: 24 January 2008 Status: Offline Points: 59 |
Post Options
Thanks(0)
Quote Reply
Topic: CXTPMenuBar only shows when mouse hovered over it.Posted: 31 January 2008 at 6:10am |
|
Hi!
After toying around with the Theme of our application, I stumbled against the following problem: Our software uses modal frames for Human-Computer Interfacing. After applying the theme of Visual Studio 2005 to the main frame, I'd like all the modal frames to have the same type of menu-bar, in stead of the old MFC-style menu bars. However, these modal frames are given their menu's after creation, and dynamically, so no resource_ID can be used. I've noticed the LoadMenu function, and applied it. This seems to work. A Visual Studio 2005 themed menu is added to the application. The only problem is that the menu is only visible when the mouse hovers over it. ![]() The image above shows it. I've done InitCommandBars(); in the onCreate of the frame. In our own setMenu function, i: CXTPCommandBars* pCommandBars = GetCommandBars(); CXTPCommandBar* pMenuBar = pCommandBars->GetMenuBar(); pMenuBar->LoadMenu(&menu, true); pMenuBar->SetFlags(xtpFlagIgnoreSetMenuMessage); Does anyone know why the menu doesn't appear normally? Did I not implement it correctly? Am i missing something? Thanks in advance. edited: Picture was wrongly aligned.. |
|
![]() |
|
jimmy
Senior Member
Joined: 11 November 2003 Location: Austria Status: Offline Points: 516 |
Post Options
Thanks(0)
Quote Reply
Posted: 31 January 2008 at 6:56am |
|
Hi,
If this is a dialog, look into the DialogSample, function RepositionControls. else look for correct base codejock classes. Jimmy |
|
![]() |
|
BobWansink
Groupie
Joined: 24 January 2008 Status: Offline Points: 59 |
Post Options
Thanks(0)
Quote Reply
Posted: 31 January 2008 at 9:56am |
|
I've looked at the function and implemented it in the Program. The system doesn't compile though, because DialogSample is derived from CXTPDialogBase<CXTResizeDialog>. My modal dialogs are all derived from CXTPFrameWnd, thus, I have no acces to the function Offset. I've commented it out, unsure of whether this would effect the outcome of the function.
The result was that the problem is still there. Is the Offset function important (I assume it is, it would not be there if it wasn't)? Thanks! |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |