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
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
You have to create a new font...
.data
lf LOGFONT <?>
.code
invoke GetStockObject,SYSTEM_FONT
invoke GetObjectA,eax,SIZEOF LOGFONT,offset lf
mov D[lf.lfWeight],700
invoke CreateFontIndirect, offset lf
mov [hNewSystemFont],eax
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!
Thank you, thank you very much!
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}
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}
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.
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.
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}
ANTIALIASED_QUALITY equ ??
don't have that equate.
cycle through 1,3,5. Gotit!!!
ANTIALIASED_QUALITY equ ??
don't have that equate.
cycle through 1,3,5. Gotit!!!
ANTIALIASED_QUALITY = 4
I think it is available as of Windows 2000, not really sure.
I think it is available as of Windows 2000, not really sure.
Strange, here is the pic of 5. 4 does nothin'
Anyway, thank you donkey !
mov al,[lfont.lfQuality]
add al,[b]5[/b]
mov [lfont.lfQuality],al
Anyway, thank you donkey !
Hi BlackIce,
Yes, then it is CLEARTYPE_QUALITY :
Yes, then it is CLEARTYPE_QUALITY :
#define DEFAULT_QUALITY 0
#define DRAFT_QUALITY 1
#define PROOF_QUALITY 2
#define NONANTIALIASED_QUALITY 3
#define ANTIALIASED_QUALITY 4
#define CLEARTYPE_QUALITY 5 ; Win2K
#define CLEARTYPE_NATURAL_QUALITY 6 ; WinXP only
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
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
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.
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.
Blissssss - Sweeet
Thank you donkey,
much better!!!!
Black iCE
Thank you donkey,
much better!!!!
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
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
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
Window sizing post # 9
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 :)