Click here to Skip to main content
15,909,742 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: OnEraseBkgnd() in dialog Pin
Nibu babu thomas11-Jun-08 23:28
Nibu babu thomas11-Jun-08 23:28 
AnswerRe: OnEraseBkgnd() in dialog Pin
sudhir_Kumar12-Jun-08 1:13
sudhir_Kumar12-Jun-08 1:13 
AnswerRe: OnEraseBkgnd() in dialog Pin
David Crow12-Jun-08 4:08
David Crow12-Jun-08 4:08 
QuestionHow to design an application to handle versioning issues? Pin
nrj2311-Jun-08 23:10
nrj2311-Jun-08 23:10 
AnswerRe: How to design an application to handle versioning issues? Pin
Saurabh.Garg11-Jun-08 23:53
Saurabh.Garg11-Jun-08 23:53 
QuestionCoordinating between Print Setup dialog and Print dialog Pin
theCPkid11-Jun-08 22:52
theCPkid11-Jun-08 22:52 
AnswerRe: Coordinating between Print Setup dialog and Print dialog Pin
leonigah12-Jun-08 0:46
leonigah12-Jun-08 0:46 
GeneralRe: Coordinating between Print Setup dialog and Print dialog Pin
theCPkid12-Jun-08 2:41
theCPkid12-Jun-08 2:41 
My problem is because of the fact that I am using my own dialog box for print setup but using the mfc provided dialog box for print. When I use my own dialog box, I dont update the internal m_hDevMode structure which has the information for all settings like page size, orientation, dpi etc etc.
I did not update because I did not know how to update and precisely speaking, i did not know about GetPrinterDeviceDefaults API.

This is what I needed to do to set the default settings before the print dialog is displayed. No matter what you do, you will always get a print dialog box with a4 & landscape set. It's sufficient for my purpose.
[code]
OnPreparePrinting(CPrintInfo* pInfo)
{
if(GetPrinterDeviceDefaults(&pInfo->m_pPD->m_pd))
{
LPDEVMODE dev = pInfo->m_pPD->GetDevMode();
GlobalUnlock(dev);
dev->dmOrientation = DMORIENT_LANDSCAPE;
dev->dmPaperSize = DMPAPER_A4;
}
return CView::DoPreparePrinting(pInfo);
}
[/code]

Thanks!
GeneralRe: Coordinating between Print Setup dialog and Print dialog Pin
Nelek12-Jun-08 5:33
protectorNelek12-Jun-08 5:33 
GeneralRe: Coordinating between Print Setup dialog and Print dialog Pin
theCPkid12-Jun-08 21:24
theCPkid12-Jun-08 21:24 
GeneralRe: Coordinating between Print Setup dialog and Print dialog Pin
Nelek12-Jun-08 22:47
protectorNelek12-Jun-08 22:47 
QuestionRemove parent menu item Pin
kildareflare11-Jun-08 22:32
kildareflare11-Jun-08 22:32 
AnswerRe: Remove parent menu item Pin
Saurabh.Garg11-Jun-08 23:10
Saurabh.Garg11-Jun-08 23:10 
AnswerRe: Remove parent menu item Pin
SandipG 11-Jun-08 23:12
SandipG 11-Jun-08 23:12 
GeneralRe: Remove parent menu item Pin
Saurabh.Garg11-Jun-08 23:25
Saurabh.Garg11-Jun-08 23:25 
GeneralRe: Remove parent menu item Pin
kildareflare11-Jun-08 23:28
kildareflare11-Jun-08 23:28 
QuestionFinding specific locations in a string Pin
toasttime11-Jun-08 21:22
toasttime11-Jun-08 21:22 
AnswerRe: Finding specific locations in a string [modified] Pin
rp_suman11-Jun-08 21:46
rp_suman11-Jun-08 21:46 
AnswerRe: Finding specific locations in a string Pin
Nibu babu thomas11-Jun-08 21:47
Nibu babu thomas11-Jun-08 21:47 
AnswerRe: Finding specific locations in a string Pin
_AnsHUMAN_ 11-Jun-08 21:48
_AnsHUMAN_ 11-Jun-08 21:48 
AnswerRe: Finding specific locations in a string Pin
Saurabh.Garg11-Jun-08 21:58
Saurabh.Garg11-Jun-08 21:58 
QuestionReg: System Login detail Pin
pooja_friends11-Jun-08 21:10
pooja_friends11-Jun-08 21:10 
AnswerRe: Reg: System Login detail Pin
Rajesh R Subramanian11-Jun-08 21:57
professionalRajesh R Subramanian11-Jun-08 21:57 
GeneralRe: Reg: System Login detail Pin
pooja_friends11-Jun-08 22:04
pooja_friends11-Jun-08 22:04 
GeneralRe: Reg: System Login detail Pin
Rajesh R Subramanian11-Jun-08 22:09
professionalRajesh R Subramanian11-Jun-08 22:09 

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.