![]() |
Win32 toolbar Programming
I tried to program a windows toolbar and I thought that the code was right but for some reason it does not display the custom bitmap that I am trying to use. It displays the button but no bitmap on it. This is the code:
:
INITCOMMONCONTROLSEX initctrs;I do not know if I am missing something obvious or if I need to Load the bitmap before I use it in this context. Any help will be great. |
Re: Win32 toolbar Programming
You can load the bitmap first, using LoadImage. Then you would want to change hInst_menu in your CreateToolbarEx call to NULL, and put the HBITMAP handle where IDB_BIT is.
You might want to try something else, first though. I'm not 100% sure this will work, but it's worth a shot. It looks like IDB_BIT is the numeric ID of the bitmap. Correct? You may want to try MAKEINTRESOURCE(IDB_BIT), instead of just IDB_BIT. |
Re: Win32 toolbar Programming
Loading the image first worked perfectly but I also tried MAKEINTRESOURCE and it did not work because it was telling me that I could not convert the UINT from the MAKEINTRESOURCE into LPWSTR. I tried typcasting but that still did not work. I do think that there is a way to do it without manually loading the bitmap because I saw it in a tutorial that I found but I did not go totally in depth.
|
Re: Win32 toolbar Programming
Fixed the LPWSTR issue but still does not work.
|
| All times are GMT -5. The time now is 4:09 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC