Click here to Skip to main content
15,916,463 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionc++ Pin
yaaqub1-Mar-06 20:28
yaaqub1-Mar-06 20:28 
AnswerRe: c++ Pin
Nibu babu thomas1-Mar-06 20:33
Nibu babu thomas1-Mar-06 20:33 
AnswerRe: c++ Pin
Stephen Hewitt1-Mar-06 22:28
Stephen Hewitt1-Mar-06 22:28 
QuestionCombo box height is not increasing Pin
BiswaR1-Mar-06 19:45
BiswaR1-Mar-06 19:45 
AnswerRe: Combo box height is not increasing Pin
Naveen1-Mar-06 20:42
Naveen1-Mar-06 20:42 
QuestionUsing Serial Port communication for dialog based application Pin
BeakX1-Mar-06 19:44
BeakX1-Mar-06 19:44 
AnswerRe: Using Serial Port communication for dialog based application Pin
Cedric Moonen1-Mar-06 20:26
Cedric Moonen1-Mar-06 20:26 
GeneralRe: Using Serial Port communication for dialog based application Pin
Rick York1-Mar-06 21:50
mveRick York1-Mar-06 21:50 
GeneralRe: Using Serial Port communication for dialog based application Pin
Cedric Moonen1-Mar-06 22:00
Cedric Moonen1-Mar-06 22:00 
Questionhow to show images on window and move. Pin
baldha rakesh1-Mar-06 19:19
baldha rakesh1-Mar-06 19:19 
AnswerRe: how to show images on window and move. Pin
Nibu babu thomas1-Mar-06 19:54
Nibu babu thomas1-Mar-06 19:54 
GeneralRe: how to show images on window and move. Pin
baldha rakesh1-Mar-06 20:14
baldha rakesh1-Mar-06 20:14 
QuestionHow to test the MTTTY example of serial comm in Win32 console? Pin
pkyiu1-Mar-06 19:17
pkyiu1-Mar-06 19:17 
QuestionHow to convert exe to dll Pin
BicycleTheif1-Mar-06 18:38
BicycleTheif1-Mar-06 18:38 
AnswerRe: How to convert exe to dll Pin
Naveen1-Mar-06 18:49
Naveen1-Mar-06 18:49 
Questionrelated to images Pin
baldha rakesh1-Mar-06 17:19
baldha rakesh1-Mar-06 17:19 
AnswerRe: related to images Pin
Nibu babu thomas1-Mar-06 17:36
Nibu babu thomas1-Mar-06 17:36 
AnswerRe: related to images Pin
Naveen1-Mar-06 17:39
Naveen1-Mar-06 17:39 
AnswerRe: related to images Pin
Hamid_RT1-Mar-06 18:05
Hamid_RT1-Mar-06 18:05 
This way is not very good but it's a draw image
for draw image use WM_PAINT
Like this

CBitmap m_Bmp;
CBrush *m_brush;
m_Bmp.LoadBitmap('FileName');
//for other formats graphic use OleLoadPicture or cimage

m_brush=new CBrush(&m_Bmp);
m_Bmp.Detach();



HBRUSH CMyCpp::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
//if((pWnd->==this)
hbr = (HBRUSH)m_brush->m_hObject;
return hbr;
}



WM_PAINT is good for draw I suggestion WM_PAINT
OnPaint
First
/*
m_dcSource.CreateCompatibleDC(GetDC());
Bmp.CreateCompatibleBitmap(GetDC(),x,y);
m_dcSource.SelectObject(&Bmp);
then Load bmp file
and ....
*/
CPaint dc(this)
dc.BitBlt(0,0,800,600,m_dcSource,0,0,SRCCOPY)
or
dc.StretchBlt()
dc is destination for draw And m_dcSource is source
Questionimage processing Pin
elips1-Mar-06 17:12
elips1-Mar-06 17:12 
AnswerRe: image processing Pin
Member 22716551-Mar-06 23:27
Member 22716551-Mar-06 23:27 
QuestionNAT API Pin
J51219821-Mar-06 17:08
J51219821-Mar-06 17:08 
AnswerRe: NAT API Pin
Ryan Binns1-Mar-06 18:54
Ryan Binns1-Mar-06 18:54 
GeneralRe: NAT API Pin
J51219821-Mar-06 19:33
J51219821-Mar-06 19:33 
Questionobject tracking Pin
ali kanju1-Mar-06 17:00
ali kanju1-Mar-06 17:00 

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.