Click here to Skip to main content
15,918,193 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Can GDI and RichEdit share the WindowClient (and live together) Richard thanks for your help Pin
ForNow28-Nov-21 8:32
ForNow28-Nov-21 8:32 
AnswerCSpiltter has max row of 2 Pin
ForNow28-Nov-21 7:50
ForNow28-Nov-21 7:50 
AnswerRe: Can GDI and RichEdit share the WindowClient (and live together) Pin
Randor 28-Nov-21 8:05
professional Randor 28-Nov-21 8:05 
GeneralRe: Can GDI and RichEdit share the WindowClient (and live together) Pin
ForNow28-Nov-21 8:33
ForNow28-Nov-21 8:33 
QuestionPlease give me explanation to this code.Explain me the second line of code. What will be the output? Pin
poojitha0822-Nov-21 19:04
poojitha0822-Nov-21 19:04 
AnswerRe: Please give me explanation to this code.Explain me the second line of code. What will be the output? Pin
Victor Nijegorodov22-Nov-21 20:31
Victor Nijegorodov22-Nov-21 20:31 
Rant[REPOST] Please give me explanation to this code.Explain me the second line of code. What will be the output? Pin
Richard Deeming22-Nov-21 21:31
mveRichard Deeming22-Nov-21 21:31 
QuestionCPrintDialog default printer. Pin
Maximilien18-Nov-21 3:40
Maximilien18-Nov-21 3:40 
I don't have a physical printer, so I cannot test (Am I wrong here?)

I'm trying to print something (a bitmap) using MFC.

I set my default printer to "Microsoft Print To PDF" in Windows 10 settings.

I have a skeleton code like this :

The GetDefaults() fails.

Am I missing something ?

Obviously, other print commands in other software work (VS, Word, Chrome... )
{
    CPrintDialog dlg(FALSE);

    if (!dlg.GetDefaults())
    {
        AfxMessageBox(_T("You have no default printer!"));
    }
    else
    {
        // attach to the DC we were given
        CDC dc;
        dc.Attach(dlg.m_pd.hDC);
        //....
    }

}
CI/CD = Continuous Impediment/Continuous Despair

AnswerRe: CPrintDialog default printer. Pin
Victor Nijegorodov18-Nov-21 7:17
Victor Nijegorodov18-Nov-21 7:17 
GeneralRe: CPrintDialog default printer. Pin
Maximilien19-Nov-21 5:00
Maximilien19-Nov-21 5:00 
GeneralRe: CPrintDialog default printer. Pin
Randor 19-Nov-21 12:34
professional Randor 19-Nov-21 12:34 
GeneralRe: CPrintDialog default printer. Pin
Maximilien22-Nov-21 1:48
Maximilien22-Nov-21 1:48 
PraiseRe: CPrintDialog default printer. Pin
Randor 22-Nov-21 2:45
professional Randor 22-Nov-21 2:45 
Question++ operator in the case of pointers Pin
Calin Negru15-Nov-21 5:32
Calin Negru15-Nov-21 5:32 
AnswerRe: ++ operator in the case of pointers Pin
Richard MacCutchan15-Nov-21 6:20
mveRichard MacCutchan15-Nov-21 6:20 
GeneralRe: ++ operator in the case of pointers Pin
Calin Negru15-Nov-21 7:10
Calin Negru15-Nov-21 7:10 
GeneralRe: ++ operator in the case of pointers Pin
Richard Andrew x6415-Nov-21 7:26
professionalRichard Andrew x6415-Nov-21 7:26 
GeneralRe: ++ operator in the case of pointers Pin
Calin Negru15-Nov-21 7:38
Calin Negru15-Nov-21 7:38 
AnswerRe: ++ operator in the case of pointers Pin
k505415-Nov-21 11:37
mvek505415-Nov-21 11:37 
GeneralRe: ++ operator in the case of pointers Pin
Calin Negru16-Nov-21 2:55
Calin Negru16-Nov-21 2:55 
GeneralRe: ++ operator in the case of pointers Pin
Richard MacCutchan17-Nov-21 3:02
mveRichard MacCutchan17-Nov-21 3:02 
GeneralRe: ++ operator in the case of pointers Pin
Calin Negru17-Nov-21 6:10
Calin Negru17-Nov-21 6:10 
GeneralRe: ++ operator in the case of pointers Pin
jsc4217-Nov-21 4:58
professionaljsc4217-Nov-21 4:58 
GeneralRe: ++ operator in the case of pointers Pin
k505417-Nov-21 5:20
mvek505417-Nov-21 5:20 
Questionc++ code interpreter/debugging tool Pin
Calin Negru10-Nov-21 1:40
Calin Negru10-Nov-21 1:40 

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.