Click here to Skip to main content
15,921,779 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: vptr help? Pin
Joe Woodbury12-Jul-09 17:30
professionalJoe Woodbury12-Jul-09 17:30 
GeneralRe: vptr help? Pin
sam_psycho12-Jul-09 8:42
sam_psycho12-Jul-09 8:42 
GeneralRe: vptr help? Pin
Stuart Dootson12-Jul-09 8:59
professionalStuart Dootson12-Jul-09 8:59 
GeneralRe: vptr help? Pin
«_Superman_»12-Jul-09 16:52
professional«_Superman_»12-Jul-09 16:52 
QuestionNow playing in vc++ Pin
storyera_storyera12-Jul-09 4:51
storyera_storyera12-Jul-09 4:51 
Questionhow to drag a document to a listctrl from desktop for example (mfc) Pin
johnfafa12-Jul-09 2:26
johnfafa12-Jul-09 2:26 
AnswerRe: how to drag a document to a listctrl from desktop for example (mfc) Pin
Stuart Dootson12-Jul-09 5:23
professionalStuart Dootson12-Jul-09 5:23 
GeneralRe: how to drag a document to a listctrl from desktop for example (mfc) Pin
johnfafa12-Jul-09 22:02
johnfafa12-Jul-09 22:02 
GeneralRe: how to drag a document to a listctrl from desktop for example (mfc) Pin
Stuart Dootson12-Jul-09 22:08
professionalStuart Dootson12-Jul-09 22:08 
GeneralRe: how to drag a document to a listctrl from desktop for example (mfc) Pin
Stuart Dootson12-Jul-09 23:38
professionalStuart Dootson12-Jul-09 23:38 
Questionthe parent of exe files in windows Pin
zon_cpp11-Jul-09 22:33
zon_cpp11-Jul-09 22:33 
AnswerRe: the parent of exe files in windows Pin
Stuart Dootson11-Jul-09 23:48
professionalStuart Dootson11-Jul-09 23:48 
GeneralRe: the parent of exe files in windows Pin
zon_cpp12-Jul-09 0:04
zon_cpp12-Jul-09 0:04 
GeneralRe: the parent of exe files in windows Pin
Stuart Dootson12-Jul-09 0:24
professionalStuart Dootson12-Jul-09 0:24 
QuestionA CLASS TO CONTROL SOME BITMAPS [modified] Pin
Dr.FIA11-Jul-09 19:51
Dr.FIA11-Jul-09 19:51 
Hello!
i'm making a mini-game by MFC
i want to make a class to ctrl some bitmaps,
i've written some menber founctions like this:
.................
in the constructor:
{
bitmap.loadbitmap...
xxx=0...//a bool to make sure CreateCompatibleDC(pDC) will only run once time.
}
setDC(CDC pdc);
{
if(xxx==0)
{
mDC.CreateCompatibleDC(pdc);// mDC used to store the picture
xxx=1
}
mDC.SelectObject(&bitmap[i]);
PDC=pdc;// PDC to store the target CDC
}
draw()//draw the picture
{
PDC->BitBlt(0,0,600,450,&mDC,0,0,SRCCOPY);
}
...........
but there's a problem:
when i use this class as a menber of CView; everything's OK ;

but when i use this class as menber of class X,and make X a menber of CView;
while using the founction setDC ;the mistake appears! a messagebox of"A\Retry\Ignore" comes out!!!

why things can be like this??
how should i write this class?

i just call setDC in founction"OnDraw".

modified on Sunday, July 12, 2009 4:12 AM

AnswerRe: A CLASS TO CONTROL SOME BITMAPS Pin
«_Superman_»11-Jul-09 19:53
professional«_Superman_»11-Jul-09 19:53 
QuestionRe: A CLASS TO CONTROL SOME BITMAPS Pin
Dr.FIA11-Jul-09 20:02
Dr.FIA11-Jul-09 20:02 
QuestionRe: A CLASS TO CONTROL SOME BITMAPS Pin
«_Superman_»11-Jul-09 20:15
professional«_Superman_»11-Jul-09 20:15 
QuestionRe: A CLASS TO CONTROL SOME BITMAPS Pin
Dr.FIA11-Jul-09 20:50
Dr.FIA11-Jul-09 20:50 
QuestionI need help about searching and deleting files? Pin
jon ray11-Jul-09 17:47
jon ray11-Jul-09 17:47 
AnswerRe: I need help about searching and deleting files? Pin
Hamid_RT11-Jul-09 19:43
Hamid_RT11-Jul-09 19:43 
AnswerRe: I need help about searching and deleting files? Pin
«_Superman_»11-Jul-09 19:51
professional«_Superman_»11-Jul-09 19:51 
GeneralRe: I need help about searching and deleting files? Pin
jon ray11-Jul-09 20:09
jon ray11-Jul-09 20:09 
GeneralRe: I need help about searching and deleting files? Pin
«_Superman_»11-Jul-09 20:13
professional«_Superman_»11-Jul-09 20:13 
Questiona Class Decleration ?? Pin
csipahi11-Jul-09 14:30
csipahi11-Jul-09 14:30 

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.