How can I do what is done here, without mfc and classes?
http://www.codeguru.com/toolbar/LogoDemo.shtml
I don't want to make it a button, just a logo in the toolbar.
Anything will be most helpful. Thanks.
How can I do what is done here, without mfc and classes?
http://www.codeguru.com/toolbar/LogoDemo.shtml
I don't want to make it a button, just a logo in the toolbar.
Anything will be most helpful. Thanks.
Last edited by Devil Panther; 07-13-2003 at 12:54 PM.
"I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe
http://www.Bloodware.net - Developing free software for the community.
You may wish to try subclassing the toolbar and either drawing the bitmap yourself (BitBlt in WM_PAINT handler but you would still need to call the default window procedure for the toolbar in order to get default behaviour for that toolbar) or, alternatively, make a static control a child of the toolbar window and use the STM_SETIMAGE message to associate your logo image with that static control.
Another option, which is not quite the same as that mfc example you linked to, is to use a rebar control and make the toolbar the control of one band and a static control the control of another rebar band; use ST_SETIMAGE message to set your logo image on the static control.
A search of this board will give you more information on window subclassing, toolbars, rebars and static controls. Don't forget msdn.
Hope that helps some.
Thanks a lot, that really helps a lot!
Just, how exacly subclasses different from classes?
"I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe
http://www.Bloodware.net - Developing free software for the community.
Subclassing in the Windows world does not involve C++ classes, rather, it involves intercepting messages aimed at one windows WinFunc() with another function. Compile this and plat with it. It has nothing directly to do with your problem, but demonstrtates the concept and the functions used to subclass a control.
Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.
Ok, this is a realy old topic, but I didn't want to open a new one... so here goes:
Is there a way to place an image as part of the menu line, instead of the toolbar line?
I guess what I'm asking, can I treat the menu line as a window with a handle?
thanks again.
"I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe
http://www.Bloodware.net - Developing free software for the community.