| View previous topic :: View next topic |
| Author |
Message |
Icarus
Joined: 24 Nov 2005 Posts: 851
|
Posted: Wed Aug 22, 2007 6:01 am Post subject: How to change menu font color/style |
|
|
Is there a command that I missed to do that?
I found how to change the background color, but I want a black menu with a white bold font.
(p.s. not talking about the tray menu, but any other GUI menu)
Can be done? |
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 8688
|
Posted: Wed Aug 22, 2007 6:16 am Post subject: Re: How to change menu font color/style |
|
|
| Icarus wrote: | | I found how to change the background color, but I want a black menu with a white bold font. |
I do not think you can change the text color of menu for a single App.
It can be effected only globally.
 |
|
| Back to top |
|
 |
Icarus
Joined: 24 Nov 2005 Posts: 851
|
Posted: Wed Aug 22, 2007 6:42 am Post subject: |
|
|
hmm... interesting.
i was assuming that if bg color can be changed, so can font color.
i feel like the Truman Show lately - I keep reaching the boundaries of the AutoHotkey world...  |
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 8688
|
Posted: Wed Aug 22, 2007 7:10 am Post subject: |
|
|
| Icarus wrote: | i feel like the Truman Show lately - I keep reaching the boundaries of the AutoHotkey world...  |
Maybe the boundaries of Windows API .. AutoHotkey is built on Windows API and that is why we get a tiny app sized around 200KB. If menus and controls were owner drawn by AHK, it would bloat the size EXE as well as affect the EXEcution speed.
If you see an APP that has a menu text NOT in default color, probably it was owner drawn.
 |
|
| Back to top |
|
 |
Icarus
Joined: 24 Nov 2005 Posts: 851
|
Posted: Wed Aug 22, 2007 7:28 am Post subject: |
|
|
Yeah yeah, not complaining at all.
The tinyness of AHK and the things it provides is absolutely amazing.
I dont know what would I do without it.
ANd the best thing is, there is a living, breathing community that helps and circulates ideas.
I am just always under the assumption that AHK can do anything, so I keep trying to push the envelope. |
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 2462
|
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 8688
|
Posted: Wed Aug 22, 2007 7:38 am Post subject: |
|
|
That is interesting.. Thanks Sean. I hope someone could wrap it up.  |
|
| Back to top |
|
 |
Icarus
Joined: 24 Nov 2005 Posts: 851
|
Posted: Wed Aug 22, 2007 7:52 am Post subject: |
|
|
Thats a little overboard for me. I get lost at MSDN.
It took me some months to start using DllCall, I believe it will take me some more to collect enough courage to go back into the microsoft maze. |
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 2462
|
Posted: Wed Aug 22, 2007 8:29 am Post subject: |
|
|
Then, what you meant by "I found how to change the background color"?
Usually, changing foreground color is similar to changing background color.
Show us your working code for the background color, then may alter it to the foreground color. |
|
| Back to top |
|
 |
Icarus
Joined: 24 Nov 2005 Posts: 851
|
Posted: Wed Aug 22, 2007 8:50 am Post subject: |
|
|
There is a built in AHK command
Menu <MenuName>, Color, <ColorCode>
| Code: | #SingleInstance Force
Menu Menu_1, Add, Item 1 in menu 1, DoNothing
Menu Menu_1, Color, Yellow ; Here it is
Gui Add, Text, x5 w90 vButton_1 gShowMenu, Graphic Button 1
Gui Show
Return
ShowMenu:
Menu Menu_1, Show
Return
DoNothing:
Return
GuiEscape:
GuiClose:
ExitApp
Return |
|
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 2462
|
Posted: Wed Aug 22, 2007 10:33 am Post subject: |
|
|
| Icarus wrote: | There is a built in AHK command
Menu <MenuName>, Color, <ColorCode> |
I see. Then, I think AHK uses SetMenuInfo API which has a member to set the background color, however, no member corresponding to set the foreground color.
I'm afraid owner-drawn menu seems the only solution. |
|
| Back to top |
|
 |
Icarus
Joined: 24 Nov 2005 Posts: 851
|
Posted: Wed Aug 22, 2007 11:01 am Post subject: |
|
|
I see.
Thanks for clearing that. Seems odd that one graphical aspect is available, while the other isn't. someone at microsoft got fired before he could finish his code... |
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 8688
|
Posted: Wed Aug 22, 2007 11:10 am Post subject: |
|
|
| Icarus wrote: | | Seems odd that one graphical aspect is available, while the other isn't. someone at microsoft got fired before he could finish his code... |
No Icarus! What Sean means is: AHK has not included that option while Win API actually supports it
Want to post it in the Wish List ?  |
|
| Back to top |
|
 |
Icarus
Joined: 24 Nov 2005 Posts: 851
|
Posted: Wed Aug 22, 2007 11:29 am Post subject: |
|
|
ah - so Chris (?) went for coffee in the middle of the implementation....
Will post in wish list.
EDIT:
Posted in wish list |
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 2462
|
Posted: Wed Aug 22, 2007 12:24 pm Post subject: |
|
|
No, I meant that there was no member to set the foreground color.
If it had been there, Chris would have implemented it already, obviously.
Without having it and using Owner-Drawn items, it's tricky to achieve it.
There is an API similar to SetBkColor: SetTextColor.
The tricky part is that it seems to have to be applied before the menu is displayed to take an effect.
Currently, the only solution would be via CBT Hook using ahkhook.dll. |
|
| Back to top |
|
 |
|