Click here to Skip to main content
15,914,452 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Drawing a Japanese string onto a dialog Pin
V K 230-May-08 2:21
V K 230-May-08 2:21 
Questionhndling of controls in smart device Pin
waquasalig29-May-08 22:55
waquasalig29-May-08 22:55 
QuestionRe: hndling of controls in smart device Pin
David Crow30-May-08 3:20
David Crow30-May-08 3:20 
Questionuser control Pin
subramanyeswari29-May-08 22:24
subramanyeswari29-May-08 22:24 
AnswerRe: user control Pin
subramanyeswari29-May-08 23:06
subramanyeswari29-May-08 23:06 
AnswerRe: user control Pin
ShilpiP29-May-08 23:50
ShilpiP29-May-08 23:50 
AnswerRe: user control Pin
David Crow30-May-08 3:21
David Crow30-May-08 3:21 
GeneralRe: user control Pin
subramanyeswari30-May-08 3:32
subramanyeswari30-May-08 3:32 
This is my code to print the control

CWnd pWnd ;
HWND hParent,hChild1,hChild2,hChild3;
hParent=hChild1=hChild2=hChild3=NULL;
hParent = ::FindWindow("Wmak Class",NULL);
hChild1 = ::FindWindowEx(hParent,NULL,"ClientFrame",NULL);
hChild2 = ::FindWindowEx(hChild1,NULL,"WindowClient",NULL);
hChild3 = ::FindWindowEx(hChild2,NULL,"AppWindow",NULL);
pWnd.Attach(hChild3);


CDC pDC;
pDC.Attach(hDC);


// save the device context
pDC.SaveDC();

// place at the correct location
pDC.SetViewportOrg(rect.left, rect.top);
LRESULT res = pWnd.SendMessage(WM_PRINT, (WPARAM) pDC.GetSafeHdc(), PRF_CLIENT | PRF_CHILDREN | PRF_OWNED);
pWnd.Detach();
// restore the device context
pDC.RestoreDC(-1);

res is returning 1 but it is not printing. I missed something to code in the control. What is that. similar to DoSuperClassPaint for an activex control
QuestionShellExecute swallowing empty parameter Pin
mav.northwind29-May-08 21:29
mav.northwind29-May-08 21:29 
QuestionRe: ShellExecute swallowing empty parameter Pin
David Crow30-May-08 3:25
David Crow30-May-08 3:25 
AnswerRe: ShellExecute swallowing empty parameter Pin
mav.northwind30-May-08 3:45
mav.northwind30-May-08 3:45 
QuestionRe: ShellExecute swallowing empty parameter Pin
David Crow30-May-08 4:08
David Crow30-May-08 4:08 
AnswerRe: ShellExecute swallowing empty parameter Pin
mav.northwind30-May-08 4:43
mav.northwind30-May-08 4:43 
QuestionRe: ShellExecute swallowing empty parameter Pin
David Crow30-May-08 4:50
David Crow30-May-08 4:50 
AnswerRe: ShellExecute swallowing empty parameter Pin
mav.northwind30-May-08 11:06
mav.northwind30-May-08 11:06 
QuestionOffice 2007 files in Webservice? Pin
ritz123429-May-08 21:27
ritz123429-May-08 21:27 
Questionhow to find out associated filetypes? Pin
steven_wong29-May-08 21:13
steven_wong29-May-08 21:13 
AnswerRe: how to find out associated filetypes? Pin
David Crow30-May-08 3:29
David Crow30-May-08 3:29 
AnswerRe: how to find out associated filetypes? Pin
ThatsAlok20-Jul-09 1:00
ThatsAlok20-Jul-09 1:00 
QuestionFile size in standard way Pin
CodingLover29-May-08 20:46
CodingLover29-May-08 20:46 
AnswerRe: File size in standard way Pin
Doc Lobster29-May-08 21:44
Doc Lobster29-May-08 21:44 
GeneralRe: File size in standard way Pin
CodingLover29-May-08 22:26
CodingLover29-May-08 22:26 
AnswerRe: File size in standard way Pin
CPallini29-May-08 22:06
mveCPallini29-May-08 22:06 
GeneralRe: File size in standard way Pin
CodingLover29-May-08 22:22
CodingLover29-May-08 22:22 
GeneralRe: File size in standard way Pin
CPallini29-May-08 22:34
mveCPallini29-May-08 22:34 

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.