No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
I am very cool person.
- Interests
- Music, Chatting, reading
Hi ! I am creating one application and I want to change the background of my button. How can I change my button background and put image in background ? |
|
Re:
Hi, I want to change the color of my button during runtime.. i am writing the following code inthe OnCtlColor of my dialog box [CODE]HBRUSH CPIVSyncDlg::OnCtlColor(CDC *pdc,CWnd *pwnd,UINT nCtlColor) { HBRUSH hbr = CDialog::OnCtlColor(pdc,pwnd,nCtlColor); switch(nCtlColor) { case CTLCOLOR_BTN: if(pwnd->GetDlgCtrlID() == IDC_STARTSTOP) pdc->SetBkColor(RGB(255,0,0)); return (HBRUSH)m_btbrush.GetSafeHandle(); case CTLCOLOR_DLG: pdc->SetBkColor(RGB(255,255,255)); pdc->SetBkMode(TRANSPARENT); return (HBRUSH)m_hbrush.GetSafeHandle(); … |