Print Page | Close Window

Custom Menu Background Question

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=2432
Printed Date: 17 July 2025 at 9:01pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Custom Menu Background Question
Posted By: robosport
Subject: Custom Menu Background Question
Date Posted: 22 June 2005 at 12:28pm

I'm slowly getting a grip on the custom themes. I have another noob question though.

I am tying to fill in the menu background with a gradient. I found a great example in ACDSee Theme sample of how to use the FillCommandBarEntry to accomplish a custom background.

Unfortunately the same FillCommandBarEntry also gets called for the background of the toolbar and the background of the pull down menus.

Question: Is there a way to draw a custom background just for the menu bar, and a different custom background for menus, and yet a different one for toolbars?

It seems like the easiest way would be if it was possible to figure out in the FillCommandBarEntry function what control type it is being call for (menu bar, tool bar, etc.), but I haven't figured out how to do that yet.

Any pointers would be much appreciated. Thank you! 




Replies:
Posted By: robosport
Date Posted: 22 June 2005 at 12:54pm

Got it! Apparently just typing out the problem and what I assumed might be a solution was enough for it to click in my head.

I used the GetType() function of the pBar parameter and compared it agains the enum bar type I hadn't seen before.

if ( pBar->GetType() == xtpBarTypeMenuBar ) ... is exactly what I needed.

Awesome library. I'm still learning it but I keep being impressed every time I find something I needed already there.

 




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