Results 1 to 4 of 4

Thread: subclassing

  1. #1

    Thread Starter
    Hyperactive Member Amon Ra's Avatar
    Join Date
    Feb 2001
    Location
    In some cave on Uranus...
    Posts
    500

    subclassing

    i wanna write a class for my owner-drawn menus.. the problem is how could i get the class to get all the menus(and sub-menus) on the window, and then allow a function such as AttachMenus(HWND hwnd) to modify all of them to the way i want using other functions in teh class...how would i get all the menus to subclass at run time?
    Thanks
    Amon Ra
    The Power of Learning.

  2. #2

    Thread Starter
    Hyperactive Member Amon Ra's Avatar
    Join Date
    Feb 2001
    Location
    In some cave on Uranus...
    Posts
    500

    ..

    basically i would wanna be able to have a varying number of menus, and change them rite when the program starts... if i dont wanna have a definite number of menus, i just call my AttachMenu function adn then it owner-draws all the menus in my prog without having me give the individual names..
    Thanks
    Amon Ra
    The Power of Learning.

  3. #3

    Thread Starter
    Hyperactive Member Amon Ra's Avatar
    Join Date
    Feb 2001
    Location
    In some cave on Uranus...
    Posts
    500
    I dont want anyone to tell me how to do the whole thing(otherwise whats the point of learning??), but just to tell me how to have a function that would dynamically retrieve the names of all the menus and change them to owner-drawn.
    that's all..thanks
    Amon Ra
    Amon Ra
    The Power of Learning.

  4. #4
    Zaei
    Guest
    Probably use EnumWindows(), and EnumChildWindows(), and loop through all windows, check for a menu, if it exists, change the setting. Should work, although it is off the top of my head.

    Z.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width