Add bitmap on next button of property sheet wizrad |
Post Reply |
Author | |
aarti
Newbie Joined: 10 July 2009 Location: India Status: Offline Points: 1 |
Post Options
Thanks(0)
Posted: 10 July 2009 at 5:55am |
Hello All,
I am working on Property sheet wizard based application .My problem is that i have to add bitmap to Next ,Back,Cancel buttons of Property sheet.I used CBitmapButton Class and uses follwing approach to add bitmap to buttons. CButton *btnNext,*btnCancel,*btnHelp; CBitmaputton btnBmpNext,btnBmpCancel,btnBmpNext; // Get a handle to each of the existing buttons btnCancel = reinterpret_cast<CButton *>(GetDlgItem(IDCANCEL)); btnNext = reinterpret_cast<CButton *>(GetDlgItem(ID_WIZNEXT)); btnHelp = reinterpret_cast<CButton *>(GetDlgItem(IDHELP)); LONG GWLNext = GetWindowLong(btnNext->m_hWnd, GWL_STYLE); SetWindowLong(btnNext->m_hWnd, GWL_STYLE, GWLNext | BS_OWNERDRAW); BOOL b=btnBmpNext.SubclassDlgItem(ID_WIZNEXT, this); btnBmpNext.LoadBitmaps(IDB_SCAN_NORMAL, IDB_SCAN_CLICK, IDB_SCAN_HOT, 0); LONG GWLCancel = GetWindowLong(btnCancel->m_hWnd, GWL_STYLE); SetWindowLong(btnCancel->m_hWnd, GWL_STYLE, GWLCancel | BS_OWNERDRAW); btnBmpCancel.SubclassDlgItem(IDCANCEL, this); btnBmpCancel.LoadBitmaps(IDB_EXIT2, IDB_EXIT_CLICKED, IDB_EXIT_FOCUS, 0); LONG GWLHelp = GetWindowLong(btnHelp->m_hWnd, GWL_STYLE); SetWindowLong(btnHelp->m_hWnd, GWL_STYLE, GWLHelp | BS_OWNERDRAW); btnBmpHelp.SubclassDlgItem(IDHELP, this); btnBmpNext.LoadBitmaps(IDB_SCAN_NORMAL, IDB_SCAN_CLICK, IDB_SCAN_HOT, 0); it successfully add bimap to next and cancel button but when i navigate to next page by clicking next button bitmap on next page does not remain on Next button and when i clicked back button the bitmap applied on first page also got vanishes. How to handle these things as i am newto wizard type applications and doesnt know how to apply bitmap for all pages of propertysheet. waiting for reply soon as i am struck in my project. Thanks |
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
I believe you need to do this in CMyPropertyPage::OnSetActive() or perhaps CMyPropertyPage::OnInitDialog() is enough? |
|
PokerMemento - http://www.pokermemento.com/
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |