Click here to Skip to main content
15,909,091 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
AnswerRe: about WTL Attach some window. Pin
Steve Echols28-Feb-06 19:29
Steve Echols28-Feb-06 19:29 
GeneralRe: about WTL Attach some window. Pin
FlyWithYou28-Feb-06 20:25
FlyWithYou28-Feb-06 20:25 
GeneralRe: about WTL Attach some window. Pin
Steve Echols28-Feb-06 20:53
Steve Echols28-Feb-06 20:53 
GeneralRe: about WTL Attach some window. Pin
Jörgen Sigvardsson28-Feb-06 21:36
Jörgen Sigvardsson28-Feb-06 21:36 
Questionhow hook the one proces(or thread) all the windows? Pin
HOW WHAT26-Feb-06 20:31
HOW WHAT26-Feb-06 20:31 
Questionhow to notify COM class in another class Pin
brygid26-Feb-06 19:03
brygid26-Feb-06 19:03 
AnswerRe: how to notify COM class in another class Pin
mbue27-Feb-06 22:20
mbue27-Feb-06 22:20 
QuestionProblem with grabbing window's output to EMF's DC Pin
modosansreves24-Feb-06 20:59
modosansreves24-Feb-06 20:59 
Hello

I'd like to have a specific hWnd's content drawn at my EMF's DC.

I've tried several techniques but they don't seem to work.

As I do
// >>>
HDC hDC = GetDC(hWnd);
hBmp = CreateCompatibleBitmap(hDC, width, height);
ReleaseDC(hWnd, hDC);
HGDIOBJ hOld = SelectObject(hDCMem, hBmp);
SendMessage(hWnd, WM_PRINT, (WPARAM) hDCMem, PRF_CHILDREN | PRF_CLIENT | PRF_ERASEBKGND | PRF_NONCLIENT | PRF_OWNED);
SelectObject(hDCMem, hOld);
DeleteObject(hDCMem);
// <<<

it successfully grabs the output to my bitmap
but the similar code
// >>>
HDC hDC = GetDC(hWnd);
hEmfDC = CreateEnhMetaFile(hDC, NULL, NULL, NULL);
ReleaseDC(hWnd, hDC);
SendMessage(hWnd, WM_PRINT, (WPARAM) hEmfDC, PRF_CHILDREN | PRF_CLIENT | PRF_ERASEBKGND | PRF_NONCLIENT | PRF_OWNED);// <<<
doesn't.

Guys at microsoft go further with recursive enumerating of child windows. That somehow improves the solution as most of dialog controls appear on EMF's DC.
But the window's header doesn't.

Now I doubt that it is possible at all.

I'd like to have any info about it.
Especially concerning grabbing output of non-client area and window's header.
AnswerRe: Problem with grabbing window's output to EMF's DC Pin
mbue27-Feb-06 22:31
mbue27-Feb-06 22:31 
Questionstl sorting question Pin
Warren Stevens24-Feb-06 8:52
Warren Stevens24-Feb-06 8:52 
AnswerRe: stl sorting question Pin
Rob Caldecott24-Feb-06 9:52
Rob Caldecott24-Feb-06 9:52 
GeneralRe: stl sorting question Pin
Warren Stevens24-Feb-06 11:45
Warren Stevens24-Feb-06 11:45 
Questionstl string parsing for DB query statement Pin
xcavin23-Feb-06 5:48
xcavin23-Feb-06 5:48 
AnswerRe: stl string parsing for DB query statement Pin
Roland Pibinger24-Feb-06 23:23
Roland Pibinger24-Feb-06 23:23 
QuestionError In Building simple ATL application Pin
maharaja pandian23-Feb-06 1:47
maharaja pandian23-Feb-06 1:47 
AnswerRe: Error In Building simple ATL application Pin
Stephen Hewitt24-Feb-06 22:40
Stephen Hewitt24-Feb-06 22:40 
QuestionUsing ShellContextMenu in my application Pin
empit4ever22-Feb-06 11:18
empit4ever22-Feb-06 11:18 
QuestionAccess to COM methods inside Windows Service ATL Pin
cmacgowan22-Feb-06 6:01
cmacgowan22-Feb-06 6:01 
AnswerRe: Access to COM methods inside Windows Service ATL Pin
cmacgowan24-Feb-06 8:28
cmacgowan24-Feb-06 8:28 
QuestionActiveX classname chnage Pin
Anilkumar K V20-Feb-06 16:42
Anilkumar K V20-Feb-06 16:42 
Questioni write a general dll want only use ATL's some windows class, how to do? Pin
HOW WHAT18-Feb-06 20:01
HOW WHAT18-Feb-06 20:01 
AnswerRe: i write a general dll want only use ATL's some windows class, how to do? Pin
georgeraafat20-Feb-06 9:07
georgeraafat20-Feb-06 9:07 
GeneralRe: i write a general dll want only use ATL's some windows class, how to do? Pin
HOW WHAT20-Feb-06 20:48
HOW WHAT20-Feb-06 20:48 
GeneralRe: i write a general dll want only use ATL's some windows class, how to do? Pin
Stephen Hewitt21-Feb-06 19:28
Stephen Hewitt21-Feb-06 19:28 
Questionin WTL, can these code not use in WinMain? Pin
HOW WHAT18-Feb-06 19:58
HOW WHAT18-Feb-06 19:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.