Has anyone tried this API before?
I have the application themed WITH an XP manifest in the resource file.
I have the commoncontrol version 6 initialized...
..the output renders the correct colors, but the characters are showing up as solid bars
looks like non-printable characters, so I think its grabbing the wrong memory for the string.
thx.
regards,
Jules
I have the application themed WITH an XP manifest in the resource file.
I have the commoncontrol version 6 initialized...
..the output renders the correct colors, but the characters are showing up as solid bars
looks like non-printable characters, so I think its grabbing the wrong memory for the string.
Code:
DECLARE FUNCTION DrawShadowText LIB "COMCTL32.DLL" ALIAS "DrawShadowText" ( _ BYVAL hdc AS DWORD,_ 'Handle to a device context (HDC). BYVAL lpszText AS LONG, _ 'A pointer to a string that contains the text to be drawn BYVAL cch AS LONG, _ 'A UINT that specifies the number of characters in the string that is to be drawn BYVAL lprect AS LONG,_ 'A pointer to a RECT structure that contains, in logical coordinates, the rectangle in which the text is to be drawn. BYVAL dwFlags AS DWORD,_ 'A DWORD that specifies how the text is to be drawn. BYVAL crText AS LONG,_ 'A COLORREF structure that contains the color of the text. (RGB(255,0,78)) BYVAL crShadow AS LONG,_ 'A COLORREF structure that contains the color of the text shadow (RGB(255,0,255)) BYVAL ixOffset AS LONG, _ 'A value of type int that specifies the X coordinate of where the text should begin. BYVAL iyOffset AS LONG _ 'A value of type int that specifies the Y coordinate of where the text should begin. ) AS LONG LOCAL hDC AS DWORD LOCAL rc AS RECT LOCAL szText AS ASCIIZ*255 LOCAL ps AS PAINTSTRUCT SetRect rc, 10,10,200,40 hdc = beginpaint(hwnd,ps) szText = " Hello Shadow Text !" DrawShadowText hdc,VARPTR(szText),-1,VARPTR(rc),0,RGB(0,255,255),RGB(64,64,64),1,2 endpaint hwnd,ps
regards,
Jules
Comment