how come my bmp is not displayed? thank you
-
First, I create a bmp
control
on aDialog
, and set itsID
toID_MYBMP
second, I creat a member variable for the bmp control asm_mybmp
; third, I import a bmp file into the resource and name itIDB_MYBMP
; forth, I add following code to the funcionOnInitDialog()
BOOL CMyDlg::OnInitDialog()
{
CDialog::OnInitDialog();CBitmap bmp; bmp.LoadBitmap(IDB\_MYBMP); m\_mybmp.SetBitmap((HBITMAP)bmp);
}
Thank you very much!!! ------------------- I am learning C++ and English
-
First, I create a bmp
control
on aDialog
, and set itsID
toID_MYBMP
second, I creat a member variable for the bmp control asm_mybmp
; third, I import a bmp file into the resource and name itIDB_MYBMP
; forth, I add following code to the funcionOnInitDialog()
BOOL CMyDlg::OnInitDialog()
{
CDialog::OnInitDialog();CBitmap bmp; bmp.LoadBitmap(IDB\_MYBMP); m\_mybmp.SetBitmap((HBITMAP)bmp);
}
Thank you very much!!! ------------------- I am learning C++ and English
I'd check if bmp contains a bitmap, in the debugger. One way is just to call GetWidth and see what you get back. Then you can focus on the bitmap control as a possible source of the problem. Christian Graus - Microsoft MVP - C++
-
First, I create a bmp
control
on aDialog
, and set itsID
toID_MYBMP
second, I creat a member variable for the bmp control asm_mybmp
; third, I import a bmp file into the resource and name itIDB_MYBMP
; forth, I add following code to the funcionOnInitDialog()
BOOL CMyDlg::OnInitDialog()
{
CDialog::OnInitDialog();CBitmap bmp; bmp.LoadBitmap(IDB\_MYBMP); m\_mybmp.SetBitmap((HBITMAP)bmp);
}
Thank you very much!!! ------------------- I am learning C++ and English
Try the following code as it works in my application for same
CBitmap bmp;
bmp.LoadBitmap(MAKEINTRESOURCE(IDB_SCHEDULE));
m_Schedule.SetBitmap(bmp);
bmp.Detach();Hope it works for you Knock out "T" from CAN'T You 'CAN' if you think you 'CAN' :cool: -- modified at 0:13 Wednesday 12th April, 2006
-
First, I create a bmp
control
on aDialog
, and set itsID
toID_MYBMP
second, I creat a member variable for the bmp control asm_mybmp
; third, I import a bmp file into the resource and name itIDB_MYBMP
; forth, I add following code to the funcionOnInitDialog()
BOOL CMyDlg::OnInitDialog()
{
CDialog::OnInitDialog();CBitmap bmp; bmp.LoadBitmap(IDB\_MYBMP); m\_mybmp.SetBitmap((HBITMAP)bmp);
}
Thank you very much!!! ------------------- I am learning C++ and English
Hi ewighell Do you set Bitmap(false) to true in property window from control?
-
First, I create a bmp
control
on aDialog
, and set itsID
toID_MYBMP
second, I creat a member variable for the bmp control asm_mybmp
; third, I import a bmp file into the resource and name itIDB_MYBMP
; forth, I add following code to the funcionOnInitDialog()
BOOL CMyDlg::OnInitDialog()
{
CDialog::OnInitDialog();CBitmap bmp; bmp.LoadBitmap(IDB\_MYBMP); m\_mybmp.SetBitmap((HBITMAP)bmp);
}
Thank you very much!!! ------------------- I am learning C++ and English
-
First, I create a bmp
control
on aDialog
, and set itsID
toID_MYBMP
second, I creat a member variable for the bmp control asm_mybmp
; third, I import a bmp file into the resource and name itIDB_MYBMP
; forth, I add following code to the funcionOnInitDialog()
BOOL CMyDlg::OnInitDialog()
{
CDialog::OnInitDialog();CBitmap bmp; bmp.LoadBitmap(IDB\_MYBMP); m\_mybmp.SetBitmap((HBITMAP)bmp);
}
Thank you very much!!! ------------------- I am learning C++ and English