Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - CXTPMenuBar only shows when mouse hovered over it.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPMenuBar only shows when mouse hovered over it.

 Post Reply Post Reply
Author
Message
BobWansink View Drop Down
Groupie
Groupie
Avatar

Joined: 24 January 2008
Status: Offline
Points: 59
Post Options Post Options   Thanks (0) Thanks(0)   Quote BobWansink Quote  Post ReplyReply Direct Link To This Post 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..

Back to Top
jimmy View Drop Down
Senior Member
Senior Member


Joined: 11 November 2003
Location: Austria
Status: Offline
Points: 516
Post Options Post Options   Thanks (0) Thanks(0)   Quote jimmy Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
BobWansink View Drop Down
Groupie
Groupie
Avatar

Joined: 24 January 2008
Status: Offline
Points: 59
Post Options Post Options   Thanks (0) Thanks(0)   Quote BobWansink Quote  Post ReplyReply Direct Link To This Post 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!
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.070 seconds.