Click here to Skip to main content
15,898,939 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: cin issue Pin
CPallini13-Mar-07 10:05
mveCPallini13-Mar-07 10:05 
GeneralRe: cin issue Pin
Cedric Moonen13-Mar-07 10:32
Cedric Moonen13-Mar-07 10:32 
GeneralRe: cin issue Pin
CPallini13-Mar-07 12:11
mveCPallini13-Mar-07 12:11 
GeneralRe: cin issue Pin
Stephen Hewitt13-Mar-07 15:43
Stephen Hewitt13-Mar-07 15:43 
GeneralRe: cin issue Pin
CPallini13-Mar-07 21:52
mveCPallini13-Mar-07 21:52 
AnswerRe: cin issue Pin
Stephen Hewitt13-Mar-07 15:39
Stephen Hewitt13-Mar-07 15:39 
GeneralRe: cin issue Pin
Programm3r13-Mar-07 19:45
Programm3r13-Mar-07 19:45 
QuestionMFC - CBitmap BitBlt Pin
Rajesh Rajan Pankapattu13-Mar-07 7:32
Rajesh Rajan Pankapattu13-Mar-07 7:32 
The below given function displays nothing. Why...?
How could I correct the problem..?


void CImageProcessorView::OnDraw(CDC *theDC)
{

CBitmap Bitmap;
Bitmap.CreateBitmap(100,100,1,24,NULL);
BITMAP bm;
Bitmap.GetObject(sizeof(BITMAP),&bm);


BYTE * pData=(BYTE *)new BYTE[bm.bmHeight *bm.bmWidthBytes ]; // the 24 bit bitmap buffer

for (int y=0;y < bm.bmHeight;y++){
for(int x=0;x < bm.bmWidth;x++){
pData[x*3+0+y*bm.bmWidthBytes]=0;
pData[x*3+1+y*bm.bmWidthBytes]=0;
pData[x*3+2+y*bm.bmWidthBytes]=255; // fill red in buffer
}
}

Bitmap.SetBitmapBits(bm.bmHeight *bm.bmWidthBytes ,pData);

CDC MemDC;
MemDC.CreateCompatibleDC(theDC);

CBitmap *pOldBitmap=MemDC.SelectObject(&Bitmap);
theDC->BitBlt(0,0,bm.bmWidth,bm.bmHeight,&MemDC,0,0,SRCCOPY);
MemDC.SelectObject(pOldBitmap);
delete [] pData;
}

Rajesh Rajan Pankapattu
AnswerRe: MFC - CBitmap BitBlt Pin
lafleon13-Mar-07 11:55
lafleon13-Mar-07 11:55 
Questionhow to add 24 bit color icons in VS.net editor Pin
OmarLodhi13-Mar-07 5:43
OmarLodhi13-Mar-07 5:43 
GeneralRe: how to add 24 bit color icons in VS.net editor Pin
Programm3r13-Mar-07 5:46
Programm3r13-Mar-07 5:46 
AnswerRe: how to add 24 bit color icons in VS.net editor Pin
Mark Salsbery13-Mar-07 7:10
Mark Salsbery13-Mar-07 7:10 
QuestionWeb services and win 32 Pin
LCI13-Mar-07 5:25
LCI13-Mar-07 5:25 
AnswerRe: Web services and win 32 Pin
led mike13-Mar-07 5:41
led mike13-Mar-07 5:41 
GeneralRe: Web services and win 32 Pin
LCI13-Mar-07 5:48
LCI13-Mar-07 5:48 
GeneralRe: Web services and win 32 Pin
led mike13-Mar-07 7:03
led mike13-Mar-07 7:03 
GeneralRe: Web services and win 32 Pin
Mark Salsbery13-Mar-07 7:26
Mark Salsbery13-Mar-07 7:26 
GeneralRe: Web services and win 32 Pin
led mike13-Mar-07 7:45
led mike13-Mar-07 7:45 
AnswerRe: Web services and win 32 Pin
led mike14-Mar-07 6:23
led mike14-Mar-07 6:23 
GeneralRe: Web services and win 32 Pin
LCI14-Mar-07 6:26
LCI14-Mar-07 6:26 
GeneralRe: Web services and win 32 Pin
LCI14-Mar-07 6:31
LCI14-Mar-07 6:31 
GeneralRe: Web services and win 32 Pin
led mike14-Mar-07 7:03
led mike14-Mar-07 7:03 
GeneralRe: Web services and win 32 Pin
LCI14-Mar-07 9:42
LCI14-Mar-07 9:42 
GeneralRe: Web services and win 32 Pin
led mike14-Mar-07 11:30
led mike14-Mar-07 11:30 
QuestionAccessing menu options from an embedded dialog Pin
Trevy13-Mar-07 5:17
Trevy13-Mar-07 5:17 

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.