Ok, i've been able to change the font and make it bold... but how would you make the system font bold....
WM_GETFONT returns null and i would like to keep the selected font (system font) within a TOOLBAR and just bold it.

Thank you,
Black iCE
Posted on 2004-04-26 18:39:19 by Black iCE
You have to create a new font...


lf LOGFONT <?>
invoke GetStockObject,SYSTEM_FONT
invoke GetObjectA,eax,SIZEOF LOGFONT,offset lf
mov D[lf.lfWeight],700
invoke CreateFontIndirect, offset lf
mov [hNewSystemFont],eax
Posted on 2004-04-26 19:04:29 by donkey
Thank you Donkey, i havn't been playing around with gdi alot and therefor i am glad that help is wailible here. I looked at code from *one* of your other posts to originally change the font (but not modify current font).

Thank you, thank you very much!
Posted on 2004-04-26 19:12:22 by Black iCE
One more question.... if you look at the font within the first pane of the XP start menu (where My XXXXX) is located, it sooo much smoother than the font created. Why? looked around, and i can't seem to get that property of LOGFONT to make it look so smooth.

I know i will have to Custom Draw some of the toolbar and *hopefully* (windows xp) the rest. GOTTA looooong way to go0000!

{couldn't attach image here}
Posted on 2004-04-26 19:48:22 by Black iCE
Hi BlackIce,

I don't have XP but it is probably drawn with an Anti-Alias effect, use ANTIALIASED_QUALITY as the font quality in the LOGFONT structure.
Posted on 2004-04-26 19:58:46 by donkey
i'll give it a try, but here is the pic. {to bad, it seems you can't attach an item to an edited post}


don't have that equate.

cycle through 1,3,5. Gotit!!!
Posted on 2004-04-26 20:17:10 by Black iCE

I think it is available as of Windows 2000, not really sure.
Posted on 2004-04-26 20:25:56 by donkey
Strange, here is the pic of 5. 4 does nothin'

mov al,[lfont.lfQuality]
add al,[b]5[/b]
mov [lfont.lfQuality],al

Anyway, thank you donkey !
Posted on 2004-04-26 20:29:31 by Black iCE
Hi BlackIce,

Yes, then it is CLEARTYPE_QUALITY :

#define DEFAULT_QUALITY         0

Posted on 2004-04-26 20:36:17 by donkey

When viewing your guistuff code, i noticed that the window is the correct background color... meanwhile, mine it completely white {hurts the eyes after a while}. Anyway, i tried to set other color values other than COLOR_WINDOW in my WINCLASSEX, but not working.

Tested my window on a 98 machine to see if is written to the exe - and yes it also appeared white as day there. {notice in my pic the white space... 1 reason why i cut the image}

So how do you solve that... HBRUSH passed to wc.hbrBackground specifying the default window colour? API's not forth coming... looked at GetSysColorBrush and passed through COLOR_WINDOW... mmmm .... still white.

Thank you
Posted on 2004-04-26 21:47:05 by Black iCE
Hi BlackIce,

I generally use dialogs because I like to visually design my windows, the normal color for a window created via CreateWindowEx is white, but you can use COLOR_3DFACE+1 in the WNDCLASSEX structure to get a dialog color in any version of Windows.
Posted on 2004-04-26 21:54:34 by donkey
Blissssss - Sweeet

Thank you donkey,
much better!!!!

Black iCE
Posted on 2004-04-26 22:10:20 by Black iCE
Questions....... i feel like such an idiot.

When i drag the window (size it), i can see all the contents redrawing itself constantly. Read of a similar problem with listview (advice given : use Ownerdraw) but what about all the childs within my window? LockUpdateWindow was givin' by donkey in that thread - and continual reading - said that it will only work for 1 control.

Thank you all.
Black iCE
Posted on 2004-04-26 22:27:08 by Black iCE
The main reason is that your child windows do not cover the entire client area of the window so you cannot suppress the WM_ERASEBKGND message. I posted some thoughts on it here...

Window sizing post # 9
Posted on 2004-04-26 22:36:44 by donkey
small sidenote: when uploading images of this type, it's better to use png/gif than jpeg. It'll usually be a bit smaller, plus it's lossless ("pixel perfect"), so you can determine whether you're looking at antialiasing or JPEG artifacts :)
Posted on 2004-04-27 03:21:39 by f0dder