flat assembler
Message board for the users of flat assembler.

Index > Windows > bold text in menus

Author
Thread Post new topic Reply to topic
thecf



Joined: 23 Dec 2006
Posts: 23
thecf
What is the flag i need to pass to my memu item in order for the font style to change to bold like msn and other win32 apps?

I tried MF_DEFAULT but this didnt work.


Description: bold menu items...
Filesize: 6.36 KB
Viewed: 782 Time(s)

Untitled.jpg


Post 05 Jan 2007, 21:12
View user's profile Send private message Reply with quote
kohlrak



Joined: 21 Jul 2006
Posts: 1421
Location: Uncle Sam's Pad
kohlrak
I don't know much about the api, yet, but i've noticed menus and window text appear to be the same. So, if you can make bolded text in other areas, you might be able to use that code to bold your menu text, but i know so little about the winapi that i don't know if you can bold a text before calling the function that prints it in menu format...
Post 06 Jan 2007, 02:00
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
How do you set MF_DEFAULT?

I just tried adding "invoke SetMenuDefaultItem, [hTrayMenu], IDM_SHOWHIDE, FALSE" to http://flatassembler.net/examples/tray.zip just below of "invoke AppendMenu, eax, MF_STRING, IDM_SHOWHIDE, szShowHide" and worked great.

Note that AppendMenu does not accept MF_DEFAULT flag, you have to use InsertMenuItem but it requires a MENUITEMINFO and I think is a little bit hard to use than AppendMenu and then SetMenuDefaultItem.
Post 06 Jan 2007, 02:38
View user's profile Send private message Reply with quote
thecf



Joined: 23 Dec 2006
Posts: 23
thecf
yea i tried SetMenuDefaultItem and it worked great.

push 0 ; fByPos
push IDM_REFRESH ; uItem
push [hPopupMenu] ; hMenu
call [SetMenuDefaultItem]
Post 06 Jan 2007, 04:21
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.