Click here to Skip to main content
15,914,417 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionBest approach for image work? GDI+, DirectX or something else? Pin
srev22-Oct-04 0:15
srev22-Oct-04 0:15 
AnswerRe: Best approach for image work? GDI+, DirectX or something else? Pin
David Chamberlain22-Oct-04 3:57
David Chamberlain22-Oct-04 3:57 
GeneralRe: Best approach for image work? GDI+, DirectX or something else? Pin
srev22-Oct-04 4:24
srev22-Oct-04 4:24 
GeneralRe: Best approach for image work? GDI+, DirectX or something else? Pin
David Chamberlain22-Oct-04 4:40
David Chamberlain22-Oct-04 4:40 
GeneralControl over the PopertySheet Pin
Cedric Moonen21-Oct-04 23:58
Cedric Moonen21-Oct-04 23:58 
GeneralRe: Control over the PopertySheet Pin
Blake Miller22-Oct-04 4:14
Blake Miller22-Oct-04 4:14 
Generalrelation between Mouse event and show in taskbar Pin
yu-yu21-Oct-04 23:52
yu-yu21-Oct-04 23:52 
Generaldisplay bitmap on a control botton. Pin
Ibana21-Oct-04 23:26
Ibana21-Oct-04 23:26 
Hi there !

Im stuck with my win32 application where I want to add an bitmap to a control button in a dialog.,

Im tryin to use the BM_SETIMAGE message but I dont get it to work... I have a bitmap IDB_BACKWARD_BITMAP defined in the resource.rc and given an id in resource.h
The control button IDC_BUTTON1 that I want to attach the image to is defined in the resource.rc
here is my callback function for the dialog window that also contains an combobox etc but its not displayed here.


LRESULT CALLBACK ToolboxProc(HWND hWndDlg, UINT Msg, WPARAM wParam, LPARAM lParam)
{

LRESULT iComboBoxSelection;


switch(Msg)
{
case WM_INITDIALOG:

SendMessage(GetDlgItem(hWndDlg,IDC_BUTTON1), BM_GETIMAGE, IMAGE_BITMAP, IDB_BACKWARD_BITMAP);

..............

I have also tried a version where I load the bitmap like this;

Bitmap=LoadBitmap(t_hInst,MAKEINTRESOURCE(IDC_BUTT

ON1));
SendMessage(GetDlgItem(hWndDlg,IDC_BUTTON1), BM_GETIMAGE, IMAGE_BITMAP, Bitmap);


Where I have defined HINSTACE t_hInst global but is there anything else that I have to do with it? and i also get an error
"cannot convert parameter 4 from 'BITMAP' to 'LPARAM'

......



Any help would be grateful because I dont have any clue about what to do Smile | :)

Regrads
/Peter


GeneralRe: display bitmap on a control botton. Pin
Ivan Cachicatari22-Oct-04 3:44
Ivan Cachicatari22-Oct-04 3:44 
Questionhow to use wave file in vc++ Pin
vc-programmer-21-Oct-04 21:28
vc-programmer-21-Oct-04 21:28 
AnswerRe: how to use wave file in vc++ Pin
Blake Miller22-Oct-04 4:16
Blake Miller22-Oct-04 4:16 
AnswerRe: how to use wave file in vc++ Pin
David Crow22-Oct-04 4:33
David Crow22-Oct-04 4:33 
QuestionOpen dialog? Pin
Larsson21-Oct-04 20:40
Larsson21-Oct-04 20:40 
AnswerRe: Open dialog? Pin
C_M_21-Oct-04 21:17
C_M_21-Oct-04 21:17 
GeneralRe: Open dialog? Pin
Larsson21-Oct-04 21:19
Larsson21-Oct-04 21:19 
GeneralRe: Open dialog? Pin
benjymous21-Oct-04 23:07
benjymous21-Oct-04 23:07 
GeneralRe: Open dialog? Pin
Larsson21-Oct-04 23:35
Larsson21-Oct-04 23:35 
GeneralRe: Open dialog? Pin
Larsson23-Oct-04 6:53
Larsson23-Oct-04 6:53 
GeneralRe: Open dialog? Pin
benjymous23-Oct-04 20:17
benjymous23-Oct-04 20:17 
AnswerRe: Open dialog? Pin
BlackDice22-Oct-04 3:19
BlackDice22-Oct-04 3:19 
GeneralRe: Open dialog? Pin
Larsson23-Oct-04 6:54
Larsson23-Oct-04 6:54 
AnswerRe: Open dialog? Pin
David Crow22-Oct-04 4:40
David Crow22-Oct-04 4:40 
GeneralRe: Open dialog? Pin
Larsson23-Oct-04 6:54
Larsson23-Oct-04 6:54 
GeneralRe: Open dialog? Pin
David Crow25-Oct-04 2:50
David Crow25-Oct-04 2:50 
Questionclose dialog? Pin
Larsson21-Oct-04 20:39
Larsson21-Oct-04 20:39 

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.