i try to use WM_SETFONT message, but it have not any change.
Posted on 2005-12-01 01:54:05 by shyhyeu_fu
hello, urm guess you're hardcoding the font change...... just a thought but if you're using an
IDE like radasm - it's simply click on the window description when creating the dialog or window and change the header. ELSE erm..... let's see

invoke SendMessage, MYWINDOWHANDLE, SB_SETTEXT , SBT_OWNERDRAW , PointerTEXT

i think......don't kill me if I'am wrong - never did like hardcoding simple stuff like this
is'nt that what IDE's are for - less work more play !?!

hope you get it
Dark Raistlin (hubby of Draakie)
Posted on 2005-12-06 07:56:03 by Draakie
oops - got ya wrong there..... you meant FONT - erm ... <daft look- too many late nights>
-----erm..... have a look again at the RADASM IDE - font can also be selected for change

<really feeling stupid now look>

bye

<suicide is an option look>
Posted on 2005-12-06 07:59:29 by Draakie
Well, u could get the caption or title bar's dimensions and paint to it in response to the WM_NCPAINT msg, this is the code I use, it draws text to the caption when window is active, for changing the title bar bg or text when the window is inactive similarly process the WM_NCACTIVATE msg..



.ELSEIF uMsg==WM_NCPAINT

invoke GetWindowDC, hWnd
mov edc,eax
invoke GetClientRect, hWnd, ADDR r2

invoke GetSystemMetrics,SM_CXSIZE
mov xp,eax
invoke GetSystemMetrics,SM_CXBORDER
add xp,eax
invoke GetSystemMetrics,SM_CXFRAME
mov xf, eax
add xp,eax
mov eax,xp
add eax,1
mov r1.left,eax
invoke GetSystemMetrics,SM_CYFRAME
mov yp,eax
mov r1.top,eax
mov eax,r2.right
sub eax,r2.left
mov r1.right,eax
invoke GetSystemMetrics,SM_CYSIZE
add eax,yp
mov r1.bottom,eax

invoke SetBkMode, edc, TRANSPARENT
invoke SetTextColor, edc, 00F0F00Fh
invoke CreateFont,24,16,0,0,400,0,0,0,OEM_CHARSET,\
                                      OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,\
                                      DEFAULT_QUALITY,DEFAULT_PITCH or FF_SCRIPT,\
                                      ADDR FontName
mov  hfont,eax
invoke SelectObject, edc, hfont
invoke DrawText,edc,OFFSET an,-1,ADDR r1,0
invoke SelectObject,edc,hfont
invoke ReleaseDC,hWnd, edc
ret



Later..  :)
Posted on 2005-12-08 10:02:14 by lone_samurai5
Hi, lone_samurai5

If you want to understand this subject much better - goto http://www.microsoft.com/msj/0697/c0697.aspx

This is great article by Paul DiLascia, with sources of his ShadeCap
("ShadeCap illustrates how to draw your own caption with flicker-free painting in Windows 95").
Posted on 2005-12-13 12:51:03 by kero