Print Page | Close Window

CXTPMenuBar only shows when mouse hovered over it.

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=9453
Printed Date: 14 November 2025 at 2:34pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPMenuBar only shows when mouse hovered over it.
Posted By: BobWansink
Subject: CXTPMenuBar only shows when mouse hovered over it.
Date 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..




Replies:
Posted By: jimmy
Date 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



Posted By: BobWansink
Date 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!



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net