Click here to Skip to main content
15,900,258 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: compile error,please help me, Pin
nhathoang26-Oct-07 10:05
nhathoang26-Oct-07 10:05 
GeneralRe: compile error,please help me, Pin
Fernando A. Gomez F.26-Oct-07 18:08
Fernando A. Gomez F.26-Oct-07 18:08 
GeneralRe: compile error,please help me, Pin
nhathoang26-Oct-07 21:55
nhathoang26-Oct-07 21:55 
GeneralRe: compile error,please help me, Pin
Mark Salsbery27-Oct-07 7:02
Mark Salsbery27-Oct-07 7:02 
GeneralRe: compile error,please help me, Pin
nhathoang27-Oct-07 8:09
nhathoang27-Oct-07 8:09 
QuestionRuntimeError: Invalid argument to sendto (plz help me out) Pin
majid mahmood26-Oct-07 5:16
majid mahmood26-Oct-07 5:16 
AnswerRe: RuntimeError: Invalid argument to sendto (plz help me out) Pin
Mark Salsbery26-Oct-07 6:12
Mark Salsbery26-Oct-07 6:12 
QuestionCreating a large DC Pin
Meisterzunge26-Oct-07 4:23
Meisterzunge26-Oct-07 4:23 
Hi,

i want to print a picture. If I print it to a file on my hard disk, every thing's fine. But I can't print with my printer.
This is because my memory dc (2172 x 3072 px) is smaller than my print dc (6675 x 4800 px). As msdn says, we can't use 'StretchBlt()' when the source and target dc sizes differs much.

So I wanted to create very large memory dc (As large as my print dc):

CBitmap bBitmap;
CPaintDC pPaintDC(this);
CDC dMemDC;
CSize sSize;

// prepare 'dPrintDC' ... (works)

// get size of dc ... (works)

if ((dMemDC.CreateCompatibleDC(&pPaintDC)) && (bBitmap.CreateCompatibleBitmap(&pPaintDC, sSize.cx, sSize.cy)))
{
    dMemDC.SelectObject(&bBitmap);

    // do anything
    // ...
}


But creating a large dc fails, too. The error ocurs when I call 'CreateCompatibleBitmap()'.

So how to solve this problem ? I have to get printed my memory dc to the print dc.

Thank you

Greetings
Marco
AnswerRe: Creating a large DC Pin
Chris Losinger26-Oct-07 4:45
professionalChris Losinger26-Oct-07 4:45 
QuestionRe: Creating a large DC Pin
bob1697226-Oct-07 4:46
bob1697226-Oct-07 4:46 
QuestionRe: Creating a large DC Pin
Hamid_RT26-Oct-07 7:30
Hamid_RT26-Oct-07 7:30 
AnswerRe: Creating a large DC Pin
Meisterzunge26-Oct-07 11:03
Meisterzunge26-Oct-07 11:03 
GeneralRe: Creating a large DC Pin
Meisterzunge26-Oct-07 11:22
Meisterzunge26-Oct-07 11:22 
GeneralRe: Creating a large DC Pin
bob1697226-Oct-07 21:04
bob1697226-Oct-07 21:04 
QuestionRe: Creating a large DC Pin
Meisterzunge27-Oct-07 21:42
Meisterzunge27-Oct-07 21:42 
GeneralRe: Creating a large DC Pin
Meisterzunge28-Oct-07 1:29
Meisterzunge28-Oct-07 1:29 
GeneralRe: Creating a large DC Pin
Force Code26-Oct-07 23:34
Force Code26-Oct-07 23:34 
QuestionKeyboard accelerators and docking bars Pin
bob1697226-Oct-07 4:16
bob1697226-Oct-07 4:16 
QuestionHow to make a listener on a folder, for client-server data synchronization? Pin
Caetano.n.a26-Oct-07 1:53
Caetano.n.a26-Oct-07 1:53 
AnswerRe: How to make a listener on a folder, for client-server data synchronization? Pin
David Crow26-Oct-07 2:39
David Crow26-Oct-07 2:39 
QuestionWake On LAN Problem Pin
joshiprashant26-Oct-07 1:18
joshiprashant26-Oct-07 1:18 
AnswerRe: Wake On LAN Problem Pin
baerten26-Oct-07 3:03
baerten26-Oct-07 3:03 
GeneralRe: Wake On LAN Problem Pin
joshiprashant26-Oct-07 3:48
joshiprashant26-Oct-07 3:48 
GeneralRe: Wake On LAN Problem Pin
baerten26-Oct-07 4:07
baerten26-Oct-07 4:07 
QuestionHow to find the path of my current running application Pin
chandu00426-Oct-07 0:51
chandu00426-Oct-07 0:51 

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.