Displaying An Image

Hi, I am making a Win32 C++ Application and want to display an image in a child window. When I search it I have lots of results of how to do that for Visual C++ but I'm using Dev and want to know how to do with Dev. I also want to know how to display an Icon on a button. I know the code, I think I have to change the style of the button to BS_ICON or BS_BITMAP and then I must send a message to put the icon but it never works, any help would be highly appreciated.

Thank you.
If you use the raw API you can do it in either. Dev-C++/MinGW don't have MFC so you can't use it but for such simplistic stuff you really don't need to. You can use a static common control to display an image by sending it a STM_SETIMAGE message. You can also send a BM_SETIMAGE message to a button control. Just make sure that the HBITMAP/HICON handle you pass in is actually valid.

MSDN's Controls Library is a good place to start: http://msdn.microsoft.com/en-us/library/bb773169(v=VS.85).aspx
Topic archived. No new replies allowed.