Click here to Skip to main content
15,905,607 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: file transfer Pin
shivditya29-Oct-05 2:28
shivditya29-Oct-05 2:28 
QuestionmciSendString and fullscreen Pin
Sasuko29-Oct-05 1:19
Sasuko29-Oct-05 1:19 
Questionreading and writing .xml files Pin
Warier29-Oct-05 0:37
Warier29-Oct-05 0:37 
AnswerRe: reading and writing .xml files Pin
toxcct29-Oct-05 2:16
toxcct29-Oct-05 2:16 
AnswerRe: reading and writing .xml files Pin
Ravi Bhavnani29-Oct-05 4:11
professionalRavi Bhavnani29-Oct-05 4:11 
QuestionZoom Pin
AskQuestion29-Oct-05 0:03
AskQuestion29-Oct-05 0:03 
QuestionBitmap on mfc Radio button Pin
LaHaHa28-Oct-05 23:39
LaHaHa28-Oct-05 23:39 
AnswerRe: Bitmap on mfc Radio button Pin
toxcct29-Oct-05 2:25
toxcct29-Oct-05 2:25 
if i well remember, you actually trying to put a bitmap on a push-like button (such as a radio or a check box).

you could have a look at my article[^] and look at the "Switch Answers Lists" button.

here is how to proceed. On the OnInitDialog() insert this code :

m_pbAnswersListState = (CButton*) GetDlgItem(IDC_ANSLISTSTATE_CHK);
 
//...
 
HICON hIcon;
hIcon = (HICON)LoadImage(AfxGetInstanceHandle(),
                         MAKEINTRESOURCE(IDI_SWITCH),
                         IMAGE_ICON,
                         0,
                         0,
                         LR_DEFAULTCOLOR);
if (hIcon) {
    m_pbAnswersListState->SendMessage(BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon);
}


in my code, IDI_SWITCH is the ID of my icon, and IDC_ANSLISTSTATE_CHK is the ID of my checkbox (work the same with a radio)...

ok, i use an icon ; for a bitmap, just change the IMAGE_ICON parameter with IMAGE_BITMAP and the HICON with HBITMAP.



TOXCCT >>> GEII power
[toxcct][VisualCalc]

-- modified at 8:37 Saturday 29th October, 2005
GeneralRe: Bitmap on mfc Radio button Pin
LaHaHa29-Oct-05 12:17
LaHaHa29-Oct-05 12:17 
GeneralRe: Bitmap on mfc Radio button Pin
toxcct30-Oct-05 4:42
toxcct30-Oct-05 4:42 
GeneralRe: Bitmap on mfc Radio button Pin
LaHaHa30-Oct-05 11:17
LaHaHa30-Oct-05 11:17 
AnswerRe: Bitmap on mfc Radio button Pin
Ravi Bhavnani30-Oct-05 6:18
professionalRavi Bhavnani30-Oct-05 6:18 
GeneralRe: Bitmap on mfc Radio button Pin
LaHaHa30-Oct-05 11:21
LaHaHa30-Oct-05 11:21 
QuestionFunction parameters tip Pin
Chintoo72328-Oct-05 23:14
Chintoo72328-Oct-05 23:14 
AnswerRe: Function parameters tip Pin
Ghasrfakhri28-Oct-05 23:58
Ghasrfakhri28-Oct-05 23:58 
GeneralRe: Function parameters tip Pin
Chintoo72329-Oct-05 1:00
Chintoo72329-Oct-05 1:00 
QuestionRe: Function parameters tip Pin
shivditya29-Oct-05 2:13
shivditya29-Oct-05 2:13 
AnswerRe: Function parameters tip Pin
ThatsAlok30-Oct-05 19:25
ThatsAlok30-Oct-05 19:25 
QuestionOdd BitBlt timings Pin
RandomMonkey28-Oct-05 20:42
RandomMonkey28-Oct-05 20:42 
AnswerRe: Odd BitBlt timings Pin
Mircea Puiu28-Oct-05 21:19
Mircea Puiu28-Oct-05 21:19 
GeneralRe: Odd BitBlt timings Pin
RandomMonkey29-Oct-05 4:24
RandomMonkey29-Oct-05 4:24 
GeneralRe: Odd BitBlt timings Pin
Mircea Puiu29-Oct-05 7:32
Mircea Puiu29-Oct-05 7:32 
GeneralRe: Odd BitBlt timings Pin
RandomMonkey29-Oct-05 9:06
RandomMonkey29-Oct-05 9:06 
GeneralRe: Odd BitBlt timings Pin
Mircea Puiu29-Oct-05 9:11
Mircea Puiu29-Oct-05 9:11 
GeneralRe: Odd BitBlt timings Pin
RandomMonkey29-Oct-05 9:14
RandomMonkey29-Oct-05 9:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.