Doing it without mfc.

This is a discussion on Doing it without mfc. within the Windows Programming forums, part of the Platform Specific Boards category; 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 ...

  1. #1
    * Death to Visual Basic * Devil Panther's Avatar
    Join Date
    Aug 2001
    Posts
    768

    Doing it without mfc.

    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 01: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.

  2. #2
    Registered User codingmaster's Avatar
    Join Date
    Sep 2002
    Posts
    309
    use the WinAPI

  3. #3
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    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.

  4. #4
    * Death to Visual Basic * Devil Panther's Avatar
    Join Date
    Aug 2001
    Posts
    768
    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.

  5. #5
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    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.
    Attached Files Attached Files
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  6. #6
    * Death to Visual Basic * Devil Panther's Avatar
    Join Date
    Aug 2001
    Posts
    768
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. WIndows programming?
    By hostensteffa in forum Windows Programming
    Replies: 7
    Last Post: 06-07-2002, 09:52 PM
  2. Release MFC Programs & Dynamic MFC DLL :: MFC
    By kuphryn in forum Windows Programming
    Replies: 2
    Last Post: 05-18-2002, 07:42 PM
  3. Understanding The Future of MFC
    By kuphryn in forum Windows Programming
    Replies: 2
    Last Post: 04-15-2002, 10:08 PM
  4. Beginning MFC (Prosise) Part III - Now What? :: C++
    By kuphryn in forum C++ Programming
    Replies: 5
    Last Post: 03-03-2002, 06:58 PM
  5. MFC is Challenging :: C++
    By kuphryn in forum C++ Programming
    Replies: 8
    Last Post: 02-05-2002, 01:33 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21