anyone give me a sample about direct access the DC surface
anyone give me a sample about direct access GDI DC
Not in MFC andy i mean direct access the surface
Tahnx!
Edited by - fancyzero on April 11, 2001 3:01:59 AM
Edited by - fancyzero on April 12, 2001 7:59:32 AM
GetSafeHdc( ).
Seriously tho, directly accessing it from where, and for what?
-fel
Seriously tho, directly accessing it from where, and for what?
-fel
~ The opinions stated by this individual are the opinions of this individual and not the opinions of her company, any organization she might be part of, her parrot, or anyone else. ~
Are you looking for API funcion
HDC GetDC( HWND hWnd );
Earlier today i used it like this to draw on the windows calc app![](smile.gif)
//first get a window handle (your prog or other window).
//Param 1 is a class name (if more than one "Calculator"?)
HWND hwnd = FindWindowA(NULL,"Calculator");
//now get a handle to that window''s dc
HDC hdc = GetDC(hwnd);
//Draw shapes, print text -- whatever.
TextOut(hdc,50,50,"BLAH",4);
Ellipse(hdc,10,10,500,500);
Not sure if this is what you mean...
-McAnthrax
HDC GetDC( HWND hWnd );
Earlier today i used it like this to draw on the windows calc app
![](smile.gif)
//first get a window handle (your prog or other window).
//Param 1 is a class name (if more than one "Calculator"?)
HWND hwnd = FindWindowA(NULL,"Calculator");
//now get a handle to that window''s dc
HDC hdc = GetDC(hwnd);
//Draw shapes, print text -- whatever.
TextOut(hdc,50,50,"BLAH",4);
Ellipse(hdc,10,10,500,500);
Not sure if this is what you mean...
-McAnthrax
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement