Click here to Skip to main content
15,915,336 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: AfxBeginThread problem (with member function) Pin
jmkhael1-Jun-04 5:59
jmkhael1-Jun-04 5:59 
GeneralRe: AfxBeginThread problem (with member function) Pin
BlackDice1-Jun-04 6:06
BlackDice1-Jun-04 6:06 
Generalvector problem Pin
BlackDice1-Jun-04 5:19
BlackDice1-Jun-04 5:19 
GeneralRe: vector problem Pin
Diddy1-Jun-04 5:34
Diddy1-Jun-04 5:34 
GeneralRe: vector problem Pin
BlackDice1-Jun-04 5:42
BlackDice1-Jun-04 5:42 
GeneralM.S.Chart Problem Pin
Member 3287141-Jun-04 4:59
Member 3287141-Jun-04 4:59 
GeneralMemory device context help Pin
JHAKAS1-Jun-04 4:55
JHAKAS1-Jun-04 4:55 
GeneralRe: Memory device context help Pin
JHAKAS1-Jun-04 5:11
JHAKAS1-Jun-04 5:11 
Well in plain words my problem is that i have to draw on the view
and also in the memory device context, which will be used for storing the device context conte to the image file

If you can provide guideline and suggestions then it will be helpful.

NOTE

1.0 I have to keep CDC MemDC ( Memory device context) member of the class so that i can write it in the drawing function and then i can use the same in another function of the class to store it in the image

2.0 In OnDraw i have to render the memdc content on the view. Thats what i was doing? On running the application and trying the drawing function 1-2 times it just draws, but after that it does not draw and same 1*1pixel bitmap

<br />
OnDraw()<br />
{<br />
pDC->StretchBlt(50, 0, 860, -1100, &MemDC, 0, 0, 860, -1100, SRCCOPY);<br />
}


3.0 I want to know that does the following schema is ok?

memdc.createcompatibledc()
bmp.createcompatiblebitmap()
CBitmap *old =memdc.selectobject(bmp);

DO THE DRAWING HERE

memdc.selectobject(old)


another query related to this is that
does this will not effect my memdc.stretchblt in the onDraw.

What i mean is when i select anaother bitmap then does my mainbitmap on which i had drawn still carries the drawing and can i use that for saving as bitmap file?

Would it not affect that bitmap file?






If you can provide the sample code taking above points in consideration than i will be greatfull? Well also point out any mistake.


Leave your mark wherever you go
GeneralRe: Memory device context help Pin
PJ Arends1-Jun-04 22:05
professionalPJ Arends1-Jun-04 22:05 
GeneralIllegal conversion warning Pin
Jim Crafton1-Jun-04 4:15
Jim Crafton1-Jun-04 4:15 
GeneralRe: Illegal conversion warning Pin
Antony M Kancidrowski1-Jun-04 4:39
Antony M Kancidrowski1-Jun-04 4:39 
GeneralRe: Illegal conversion warning Pin
Antony M Kancidrowski1-Jun-04 4:48
Antony M Kancidrowski1-Jun-04 4:48 
GeneralRe: Illegal conversion warning Pin
Michael Dunn1-Jun-04 5:04
sitebuilderMichael Dunn1-Jun-04 5:04 
GeneralRe: Illegal conversion warning Pin
Marcello1-Jun-04 6:16
Marcello1-Jun-04 6:16 
GeneralRe: Illegal conversion warning Pin
Marcello1-Jun-04 6:41
Marcello1-Jun-04 6:41 
GeneralRe: Illegal conversion warning Pin
Anonymous17-Jun-04 9:53
Anonymous17-Jun-04 9:53 
GeneralUsing TRACE macro Pin
Anonymous1-Jun-04 3:24
Anonymous1-Jun-04 3:24 
GeneralRe: Using TRACE macro Pin
David Crow1-Jun-04 3:41
David Crow1-Jun-04 3:41 
GeneralRe: Using TRACE macro Pin
jmkhael1-Jun-04 3:45
jmkhael1-Jun-04 3:45 
GeneralRe: Using TRACE macro Pin
Anonymous1-Jun-04 8:43
Anonymous1-Jun-04 8:43 
GeneralRe: Using TRACE macro Pin
Anonymous1-Jun-04 9:01
Anonymous1-Jun-04 9:01 
GeneralMy Dialog-Window (not minimized), is hidden under other windows, how to make active/top/etc Pin
ohadp1-Jun-04 3:24
ohadp1-Jun-04 3:24 
GeneralRe: My Dialog-Window (not minimized), is hidden under other windows, how to make active/top/etc Pin
Antony M Kancidrowski1-Jun-04 4:11
Antony M Kancidrowski1-Jun-04 4:11 
GeneralRe: My Dialog-Window (not minimized), is hidden under other windows, how to make active/top/etc Pin
ohadp1-Jun-04 4:27
ohadp1-Jun-04 4:27 
GeneralRe: My Dialog-Window (not minimized), is hidden under other windows, how to make active/top/etc Pin
Antony M Kancidrowski1-Jun-04 4:52
Antony M Kancidrowski1-Jun-04 4:52 

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.