Click here to Skip to main content
15,912,977 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Multithreading Pin
David Crow28-Mar-06 2:29
David Crow28-Mar-06 2:29 
AnswerRe: Multithreading Pin
El Corazon27-Mar-06 2:14
El Corazon27-Mar-06 2:14 
AnswerRe: Multithreading Pin
Michael Dunn27-Mar-06 9:00
sitebuilderMichael Dunn27-Mar-06 9:00 
QuestionHow to implement crop feature in VC++ Pin
snprani@yahoo.com27-Mar-06 1:29
snprani@yahoo.com27-Mar-06 1:29 
AnswerRe: How to implement crop feature in VC++ Pin
_AnsHUMAN_ 27-Mar-06 3:31
_AnsHUMAN_ 27-Mar-06 3:31 
QuestionAny reson why SelectObject would not work for new bitmap? Pin
Laughing Buddha27-Mar-06 0:15
Laughing Buddha27-Mar-06 0:15 
AnswerRe: How do I select a CBitmap into a dc? Pin
Hamid_RT27-Mar-06 0:26
Hamid_RT27-Mar-06 0:26 
AnswerRe: How do I select a CBitmap into a dc? Pin
Hamid_RT27-Mar-06 0:35
Hamid_RT27-Mar-06 0:35 
if you want to show picture in the Dialog you can use

CImage m_Image;
m_Image.Load("c:\\picture.bmp");

OnPaint()
{
CPaintDC dc(this); // device context for painting
m_Image.BitBlt(dc.m_hDC,CRect(0,0,800,600),CPoint(0,0));
}


....else...........

HBITMAP hBit;
HDC hdc;

hdc=CreateCompatibleDC(GetDC()->m_hDC);

int iWidth = GetSystemMetrics (SM_CXSCREEN) / 10;
int iHeight = GetSystemMetrics (SM_CYSCREEN) / 10;

//hBit=CreateCompatibleBitmap(GetDC()->m_hDC,iWidth,iHeight );

HBITMAP hBit = (HBITMAP)::LoadImage(NULL,"c:\\picture.bmp",IMAGE_BITMAP,0,0,
LR_LOADFROMFILE|LR_CREATEDIBSECTION);

SelectObject(hdc,hBit);



OnPaint()
{
CPaintDC dc(this); // device context for painting
BitBlt(dc.m_hDC,0,0,800,600,hdc,0,0,SRCCOPY);
}


maybe it is some helpful to you
GeneralRe: How do I select a CBitmap into a dc? Pin
Laughing Buddha27-Mar-06 3:03
Laughing Buddha27-Mar-06 3:03 
QuestionA problem when port win32console C++ from vs2003 to 2005 Pin
tiancaidao26-Mar-06 23:03
tiancaidao26-Mar-06 23:03 
AnswerRe: A problem when port win32console C++ from vs2003 to 2005 Pin
Cedric Moonen26-Mar-06 23:40
Cedric Moonen26-Mar-06 23:40 
GeneralRe: A problem when port win32console C++ from vs2003 to 2005 Pin
tiancaidao27-Mar-06 0:41
tiancaidao27-Mar-06 0:41 
AnswerRe: A problem when port win32console C++ from vs2003 to 2005 Pin
oshah26-Mar-06 23:59
oshah26-Mar-06 23:59 
GeneralRe: A problem when port win32console C++ from vs2003 to 2005 Pin
tiancaidao27-Mar-06 0:43
tiancaidao27-Mar-06 0:43 
GeneralRe: A problem when port win32console C++ from vs2003 to 2005 Pin
tiancaidao27-Mar-06 0:47
tiancaidao27-Mar-06 0:47 
GeneralRe: A problem when port win32console C++ from vs2003 to 2005 Pin
tiancaidao27-Mar-06 1:01
tiancaidao27-Mar-06 1:01 
QuestionSetting background color of Dialog to RED Pin
RockyJames26-Mar-06 22:49
RockyJames26-Mar-06 22:49 
AnswerRe: Setting background color of Dialog to RED Pin
Nibu babu thomas26-Mar-06 23:00
Nibu babu thomas26-Mar-06 23:00 
GeneralRe: Setting background color of Dialog to RED Pin
RockyJames26-Mar-06 23:21
RockyJames26-Mar-06 23:21 
GeneralRe: Setting background color of Dialog to RED Pin
Nibu babu thomas26-Mar-06 23:26
Nibu babu thomas26-Mar-06 23:26 
AnswerRe: Setting background color of Dialog to RED Pin
Hamid_RT27-Mar-06 0:11
Hamid_RT27-Mar-06 0:11 
AnswerRe: Setting background color of Dialog to RED Pin
Vinaya27-Mar-06 0:23
Vinaya27-Mar-06 0:23 
AnswerRe: Setting background color of Dialog to RED Pin
Ganesh_T27-Mar-06 2:17
Ganesh_T27-Mar-06 2:17 
QuestionQuestion about "singleton in multi-thread" Pin
chenxiujie26-Mar-06 22:05
chenxiujie26-Mar-06 22:05 
AnswerRe: Question about "singleton in multi-thread" Pin
YaronNir27-Mar-06 0:59
YaronNir27-Mar-06 0:59 

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.