VC++ 6.0. How I get a device context in static function for to use TextOut?

Hello, I have an application in VC++ 6.0 with mfc.
I need print on video messages.
I define a static function. In this function I need get a device context for to use TextOut. How I can do it?
Thanks
:wave:
[239 byte] By [Antonio2929] at [2007-11-20 11:37:59]
# 1 Re: VC++ 6.0. How I get a device context in static function for to use TextOut?
A device context to what? Pass the window handle to that static function.
cilu at 2007-11-10 22:24:44 >
# 2 Re: VC++ 6.0. How I get a device context in static function for to use TextOut?
What video message, to print on anything, you need the Window handle (control or window), then you can use GetDC(WindowHandle) to retrieve the device context handle, and then you can draw on it using TextOut/DrawText etc. APis.
Krishnaa at 2007-11-10 22:25:54 >
# 3 Re: VC++ 6.0. How I get a device context in static function for to use TextOut?
My message are information on calculation.

I see ::GetDC(NULL) retrieve the DC for the entire screen, client area.

Someone have sample code? Or link to sample code?
Antonio2929 at 2007-11-10 22:26:52 >
# 4 Re: VC++ 6.0. How I get a device context in static function for to use TextOut?
Sample code for what ?
Krishnaa at 2007-11-10 22:27:58 >
# 5 Re: VC++ 6.0. How I get a device context in static function for to use TextOut?
Sample code for to use corretly the instruction for print my message on client area..
Antonio2929 at 2007-11-10 22:28:57 >
# 6 Re: VC++ 6.0. How I get a device context in static function for to use TextOut?
Look into MSDN for TextOut, DrawText.
Krishnaa at 2007-11-10 22:29:51 >