It is not good practice to use a relative filename in the constructor of a wxBitmap. You have not got any control over where the current directory of your app is pointing to.
Basically use a full path name, check of the bitmap is loaded ok, then assign it to the wxBitmapButton.
- Jorgen
···
On 3/5/07, Amit15.Kumar@aricent.com <Amit15.Kumar@aricent.com > wrote:
Can anybody tell me whats wrong with
this code…/* trying to display test2.bmp on button
bmpBtn*/bitmap = wxBitmap(_T(“test2.bmp”),
wxBITMAP_TYPE_BMP);wxBitmapButton *bmpBtn = new wxBitmapButton
(
panel, wxID_ANY,
bitmap ,
wxPoint(30, 70)
);
Result: Button is not being display…
thanks
amit tandial
*********************** Aricent-Unclassified ***********************
"DISCLAIMER: This message is proprietary to Aricent and is intended solely for the use of the individual to whom it is addressed. It may contain privileged or confidential information and should not be circulated or used for any purpose other than for what it is intended. If you have received this message in error, please notify the originator immediately. If you are not the intended recipient, you are notified that you are strictly prohibited from using, copying, altering, or disclosing the contents of this message. Aricent accepts no responsibility for loss or damage arising from the use of the information transmitted by this email including damage from virus."