Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. ATL / WTL / STL
  4. Menu Ownerdraw and WindowFromDC

Menu Ownerdraw and WindowFromDC

Scheduled Pinned Locked Moved ATL / WTL / STL
question
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Derick Cyril Thomas
    wrote on last edited by
    #1

    LPDRAWITEMSTRUCT lpdis; In an Ownerdrawn menu handler WindowFromDC(lpdis->hDC) always return zero?:confused: Any clues? Thanks, Derick.

    J 1 Reply Last reply
    0
    • D Derick Cyril Thomas

      LPDRAWITEMSTRUCT lpdis; In an Ownerdrawn menu handler WindowFromDC(lpdis->hDC) always return zero?:confused: Any clues? Thanks, Derick.

      J Offline
      J Offline
      Jason De Arte
      wrote on last edited by
      #2

      And it always will. HMENU's are the resource of a window - and never a true user accessable window themselves. It has something to do with the way that windows internally deals with menus - somehow that bit of geek trivia is lost to me & forgotten. But I wouldn't wory about it, if you're doing an owner draw menu - all you need is the HDC anyways. If you need dimensions of the full menu for a side bar or something, I'd check out the multiple ownerdraw menu samples here on codeproject. [ Jason De Arte | Toy Maker | 1001010.com ]

      D 1 Reply Last reply
      0
      • J Jason De Arte

        And it always will. HMENU's are the resource of a window - and never a true user accessable window themselves. It has something to do with the way that windows internally deals with menus - somehow that bit of geek trivia is lost to me & forgotten. But I wouldn't wory about it, if you're doing an owner draw menu - all you need is the HDC anyways. If you need dimensions of the full menu for a side bar or something, I'd check out the multiple ownerdraw menu samples here on codeproject. [ Jason De Arte | Toy Maker | 1001010.com ]

        D Offline
        D Offline
        Derick Cyril Thomas
        wrote on last edited by
        #3

        But I think I found the problem. It has something to do with mwnu animation. for animation purpouse, widows supplies another dc. This is what i think happens with a context menu.:doh: -Derick

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups