CBitmapButton
-
I want to create CBitmapButton in a dialog with CButton::Create(), but for some reason the button is not visible when I run the app. I put the following code in CDialog::OnInitDialog()
VERIFY(m_whiteBtn2.Create("", WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON | BS_OWNERDRAW, CRect(200, 100,85,48), this, IDC_WHITE_BUTTON2)); VERIFY(m_whiteBtn2.LoadBitmaps(IDB_WHITE_BUTTONU, IDB_WHITE_BUTTOND));
Does anyone know what might be the problem? -
I want to create CBitmapButton in a dialog with CButton::Create(), but for some reason the button is not visible when I run the app. I put the following code in CDialog::OnInitDialog()
VERIFY(m_whiteBtn2.Create("", WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON | BS_OWNERDRAW, CRect(200, 100,85,48), this, IDC_WHITE_BUTTON2)); VERIFY(m_whiteBtn2.LoadBitmaps(IDB_WHITE_BUTTONU, IDB_WHITE_BUTTOND));
Does anyone know what might be the problem?You might want to try
BS_BITMAP
... Iain. -
I want to create CBitmapButton in a dialog with CButton::Create(), but for some reason the button is not visible when I run the app. I put the following code in CDialog::OnInitDialog()
VERIFY(m_whiteBtn2.Create("", WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON | BS_OWNERDRAW, CRect(200, 100,85,48), this, IDC_WHITE_BUTTON2)); VERIFY(m_whiteBtn2.LoadBitmaps(IDB_WHITE_BUTTONU, IDB_WHITE_BUTTOND));
Does anyone know what might be the problem? -
I want to create CBitmapButton in a dialog with CButton::Create(), but for some reason the button is not visible when I run the app. I put the following code in CDialog::OnInitDialog()
VERIFY(m_whiteBtn2.Create("", WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON | BS_OWNERDRAW, CRect(200, 100,85,48), this, IDC_WHITE_BUTTON2)); VERIFY(m_whiteBtn2.LoadBitmaps(IDB_WHITE_BUTTONU, IDB_WHITE_BUTTOND));
Does anyone know what might be the problem?In case you don't get your code working, see this article.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
-
This article : http://www.codeproject.com/editctrl/smartedit.asp[^] shows an example of how to use bitmapped buttons. __________________________________________ a two cent stamp short of going postal.
-
I want to create CBitmapButton in a dialog with CButton::Create(), but for some reason the button is not visible when I run the app. I put the following code in CDialog::OnInitDialog()
VERIFY(m_whiteBtn2.Create("", WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON | BS_OWNERDRAW, CRect(200, 100,85,48), this, IDC_WHITE_BUTTON2)); VERIFY(m_whiteBtn2.LoadBitmaps(IDB_WHITE_BUTTONU, IDB_WHITE_BUTTOND));
Does anyone know what might be the problem?After calling the button's
Create(...)
method, you must call itsShowWindow(SW_SHOW);
method to actually show the window.
Software Zen:
delete this;