Hi,
I add three buttons on toolbar.
The first two are non-system-defined button bitmaps,and the third one is system-defined button bitmaps. I think the result will be result.jpg.
But I don't know why I get the result (orinin.jpg).
The CreateToolbar function:
// Ensure that the common control DLL is loaded.
icex.dwSize = sizeof(INITCOMMONCONTROLSEX);
icex.dwICC = ICC_BAR_CLASSES;
InitCommonControlsEx(&icex);
// Send the TB_BUTTONSTRUCTSIZE message, which is required for backward compatibility.
SendMessage(hwndTB, TB_BUTTONSTRUCTSIZE, (WPARAM) sizeof(TBBUTTON), 0);
Could someone help me to modify it ?
Thank you! :)
NoHero
December 20th, 2004, 01:22 PM
I have searched through the MSDN quite a bit to find these default values, and I think I got the answer:
You use these values to specify an image index within a standard image list that was loaded with the TB_LOADIMAGES message. The index values correspond to images within standard image lists that the control creates for your convenience. The images depict actions that Windows applications commonly perform.
This was found here (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/toolbar/image_indexes.asp). So you need to send TB_LOADIMAGES (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/toolbar/messages/tb_loadimages.asp) first so the toolbar can load the standard images into its image list. I haven't tested it out though. But I am shure it will work after this addition.
Cooker
January 12th, 2005, 10:28 AM
I have searched through the MSDN quite a bit to find these default values, and I think I got the answer:
This was found here (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/toolbar/image_indexes.asp). So you need to send TB_LOADIMAGES (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/toolbar/messages/tb_loadimages.asp) first so the toolbar can load the standard images into its image list. I haven't tested it out though. But I am shure it will work after this addition.
Hi,
I try this:
// Ensure that the common control DLL is loaded.
icex.dwSize = sizeof(INITCOMMONCONTROLSEX);
icex.dwICC = ICC_BAR_CLASSES;
InitCommonControlsEx(&icex);
// Ensure that the common control DLL is loaded.
icex.dwSize = sizeof(INITCOMMONCONTROLSEX);
icex.dwICC = ICC_BAR_CLASSES;
InitCommonControlsEx(&icex);
And since I cannot find any other code that loads application defined image resources, the subsystem will be use the STD_ ones. Beside the default internal one you need one you created on your own to hold application defined images.
Cooker
January 12th, 2005, 08:52 PM
Of course.
// windows declarations
#define STD_CUT 0
#define STD_COPY 1
And the following two code peaces will be similiar:
And since I cannot find any other code that loads application defined image resources, the subsystem will be use the STD_ ones. Beside the default internal one you need one you created on your own to hold application defined images.
Anyway,thanks for your help!
Could someone share your experience???
Thanks!
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.