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

C / C++ / MFC

 
AnswerRe: Conversion Pin
CPallini14-Mar-09 5:13
mveCPallini14-Mar-09 5:13 
GeneralRe: Conversion Pin
durban214-Mar-09 5:42
durban214-Mar-09 5:42 
GeneralRe: Conversion Pin
CPallini14-Mar-09 7:17
mveCPallini14-Mar-09 7:17 
QuestionPCI driver development Pin
Deepu Antony14-Mar-09 4:34
Deepu Antony14-Mar-09 4:34 
QuestionHow to place a Bitmap in the center of a Cdocument document on startup Pin
Larry Mills Sr14-Mar-09 3:13
Larry Mills Sr14-Mar-09 3:13 
AnswerRe: How to place a Bitmap in the center of a Cdocument document on startup Pin
Code-o-mat14-Mar-09 5:44
Code-o-mat14-Mar-09 5:44 
GeneralRe: How to place a Bitmap in the center of a Cdocument document on startup Pin
Larry Mills Sr14-Mar-09 6:24
Larry Mills Sr14-Mar-09 6:24 
GeneralRe: How to place a Bitmap in the center of a Cdocument document on startup Pin
Code-o-mat14-Mar-09 6:35
Code-o-mat14-Mar-09 6:35 
I'm still not sure what you mean but...did you try overwriting the OnPaint method of your view class (or OnDraw maybe?) and do something like this:
CBitmap bitmap;
bitmap.LoadBitmap(IDB_WHATEVER);
CDC MemDC;
MemDC.CreateCompatibleDC(&dc_of_view);
CBitmap *originalBitmap = MemDC.SelectObject(&bitmap);
BITMAP bitmapInfo;
bitmap.GetBitmap(&bitmapInfo);
CRect Rect;
GetClientRect(&Rect)
dc.BitBlt(Rect.CenterPoint().x - bitmapInfo.bmWidth / 2, 
          Rect.CenterPoint().y - bitmapInfo.bmHeight / 2, 
          bitmapInfo.bmWidth, 
          bitmapInfo.bmHeight, 
          &MemDC, 
          0, 
          0, 
          SRCCOPY);
MemDC.SelectObject(originalBitmap);


> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <

GeneralRe: How to place a Bitmap in the center of a Cdocument document on startup Pin
Larry Mills Sr15-Mar-09 9:24
Larry Mills Sr15-Mar-09 9:24 
GeneralRe: How to place a Bitmap in the center of a Cdocument document on startup Pin
Code-o-mat15-Mar-09 11:37
Code-o-mat15-Mar-09 11:37 
GeneralRe: How to place a Bitmap in the center of a Cdocument document on startup Pin
Larry Mills Sr16-Mar-09 2:21
Larry Mills Sr16-Mar-09 2:21 
QuestionHow to solve this,I have try my best! Pin
Archy_Yu14-Mar-09 0:34
Archy_Yu14-Mar-09 0:34 
QuestionHow to pass SendMessage() which is having base class as CWinApp? Pin
Abhijit D. Babar13-Mar-09 23:59
Abhijit D. Babar13-Mar-09 23:59 
AnswerRe: How to pass SendMessage() which is having base class as CWinApp? Pin
«_Superman_»14-Mar-09 1:40
professional«_Superman_»14-Mar-09 1:40 
QuestionMFC Pin
p_196013-Mar-09 22:55
p_196013-Mar-09 22:55 
AnswerRe: MFC Pin
Iain Clarke, Warrior Programmer13-Mar-09 23:24
Iain Clarke, Warrior Programmer13-Mar-09 23:24 
AnswerRe: MFC Pin
CPallini14-Mar-09 1:38
mveCPallini14-Mar-09 1:38 
GeneralRe: MFC Pin
Hamid_RT14-Mar-09 3:26
Hamid_RT14-Mar-09 3:26 
GeneralRe: MFC Pin
CPallini14-Mar-09 4:36
mveCPallini14-Mar-09 4:36 
GeneralRe: MFC Pin
Hamid_RT14-Mar-09 5:27
Hamid_RT14-Mar-09 5:27 
AnswerRe: MFC Pin
Hamid_RT14-Mar-09 3:23
Hamid_RT14-Mar-09 3:23 
AnswerRe: MFC Pin
Joe Woodbury15-Mar-09 17:52
professionalJoe Woodbury15-Mar-09 17:52 
QuestionIConverterSession Pin
Swapnil Shah13-Mar-09 20:42
Swapnil Shah13-Mar-09 20:42 
AnswerRe: IConverterSession Pin
Archy_Yu14-Mar-09 0:02
Archy_Yu14-Mar-09 0:02 
GeneralRe: IConverterSession Pin
Swapnil Shah14-Mar-09 12:45
Swapnil Shah14-Mar-09 12:45 

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.