Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Custom Menu Background Question
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Custom Menu Background Question

 Post Reply Post Reply
Author
Message
robosport View Drop Down
Groupie
Groupie


Joined: 20 June 2005
Location: United States
Status: Offline
Points: 62
Post Options Post Options   Thanks (0) Thanks(0)   Quote robosport Quote  Post ReplyReply Direct Link To This Post Topic: Custom Menu Background Question
    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! 



Edited by robosport
Back to Top
robosport View Drop Down
Groupie
Groupie


Joined: 20 June 2005
Location: United States
Status: Offline
Points: 62
Post Options Post Options   Thanks (0) Thanks(0)   Quote robosport Quote  Post ReplyReply Direct Link To This Post 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.

 



Edited by robosport
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.047 seconds.