Click here to Skip to main content
14,484,661 members

C / C++ / MFC

QuestionRe: How to send a text file from C to java and receive the same text file from java to C Pin
David Crow19-Aug-15 5:24
MemberDavid Crow19-Aug-15 5:24 
AnswerRe: How to send a text file from C to java and receive the same text file from java to C Pin
ThatsAlok20-Aug-15 0:23
MemberThatsAlok20-Aug-15 0:23 
GeneralOT Pin
CPallini20-Aug-15 0:35
mveCPallini20-Aug-15 0:35 
GeneralRe: OT Pin
ThatsAlok20-Aug-15 1:51
MemberThatsAlok20-Aug-15 1:51 
GeneralRe: OT Pin
ThatsAlok20-Aug-15 1:53
MemberThatsAlok20-Aug-15 1:53 
QuestionCMFCToolBarComboBoxButton::GetByCmd returns NULL Pin
joliet17-Aug-15 20:26
Memberjoliet17-Aug-15 20:26 
AnswerRe: CMFCToolBarComboBoxButton::GetByCmd returns NULL Pin
Jochen Arndt17-Aug-15 20:59
professionalJochen Arndt17-Aug-15 20:59 
QuestionAdjust paper size Pin
Erich Ruth17-Aug-15 10:02
MemberErich Ruth17-Aug-15 10:02 
I have this code

BOOL CFormOptions::OnPreparePrinting(CPrintInfo* pInfo) 
	tagPDA pPrintDlg;
	AfxGetApp()->GetPrinterDeviceDefaults (&pPrintDlg);
	pInfo->m_pPD->m_pd.hDevMode = pPrintDlg.hDevMode;
	LPDEVMODE devMode = pInfo->m_pPD->GetDevMode();
    if (devMode)
	   if (m_legal)
	     devMode->dmPaperSize = 45; // DMPAPER_10X11;  // DMPAPER_LEGAL;
         devMode->dmPaperSize = DMPAPER_LEGAL; // _LETTER

	   devMode->dmPaperWidth = 2000;

	   //devMode->dmPaperSize = DMPAPER_10X11;

    if ( pInfo->m_bPreview )        // normal print preview
         return DoPreparePrinting(pInfo);

    return DoPreparePrinting(pInfo);

and I can adjust the paper size from letter to legal. But if I try to adjust the paper size to DMPAPER_10X11 or any other size, the software ignores it and just uses letter size.

How can I adjust the paper size to be something like DMPAPER_10X11? I tried adjust the PaperWidth as well and that is ignored as well. So Im not sure what Im doing wrong.

Any help, any direction any one can provide will be greatly appreciated.
AnswerRe: Adjust paper size Pin
Kenneth Walters17-Aug-15 11:09
MemberKenneth Walters17-Aug-15 11:09 
Peter Weyzen17-Aug-15 4:51
MemberPeter Weyzen17-Aug-15 4:51 
Questionc++ Qt or C# or JAVA !! Pin
Dreamer_X15-Aug-15 3:51
MemberDreamer_X15-Aug-15 3:51 
AnswerRe: c++ Qt or C# or JAVA !! Pin
OriginalGriff15-Aug-15 3:54
mveOriginalGriff15-Aug-15 3:54 
AnswerRe: c++ Qt or C# or JAVA !! Pin
ThatsAlok20-Aug-15 0:24
MemberThatsAlok20-Aug-15 0:24 
QuestionFirst button of toolbar control get activated after another button get executed Pin
Amrit Agr14-Aug-15 1:35
MemberAmrit Agr14-Aug-15 1:35 
QuestionCheckbox: SetFocus() doesn't draw broken rectangle around it Pin
Donguy197613-Aug-15 13:39
MemberDonguy197613-Aug-15 13:39 
AnswerRe: Checkbox: SetFocus() doesn't draw broken rectangle around it Pin
Arthur V. Ratz13-Aug-15 19:13
mvaArthur V. Ratz13-Aug-15 19:13 
QuestionLearning C++ Pin
Kevin Marois13-Aug-15 11:12
professionalKevin Marois13-Aug-15 11:12 
AnswerRe: Learning C++ Pin
jeron113-Aug-15 12:09
Memberjeron113-Aug-15 12:09 
GeneralRe: Learning C++ Pin
Kevin Marois13-Aug-15 12:13
professionalKevin Marois13-Aug-15 12:13 
AnswerRe: Learning C++ Pin
Nitin K. Kawale17-Aug-15 1:55
professionalNitin K. Kawale17-Aug-15 1:55 
QuestionURLDownloadToFile stopped working on Windows 10 Pin
DavidBaird12-Aug-15 13:18
MemberDavidBaird12-Aug-15 13:18 
SuggestionRe: URLDownloadToFile stopped working on Windows 10 Pin
Ujesh Mohanan13-Aug-15 3:30
MemberUjesh Mohanan13-Aug-15 3:30 
GeneralRe: URLDownloadToFile stopped working on Windows 10 Pin
DavidBaird13-Aug-15 10:43
MemberDavidBaird13-Aug-15 10:43 
QuestionHow to read an XML file in C++.? Pin
Member 874411112-Aug-15 0:02
MemberMember 874411112-Aug-15 0:02 
JokeRe: How to read an XML file in C++.? Pin
enhzflep12-Aug-15 0:12
Memberenhzflep12-Aug-15 0:12 

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.