Thibaud

Thibaud

  • NA
  • 1
  • 0

having a long context menu not taking all the screen height

Dec 5 2005 4:58 AM

Hi,

I display a lot of images in a context menu, using OwnerDraw=true and overring OnMeasureItem/OnDrawItem. The automatically displayed arrows are great, but the menu takes all the screen height! My boss want the menu to be shorter...

I tried to display only a few images, and added my own arrow items at the beginning and the end of them, but I can't make the menu scroll when I click/select the arrows!

- when clicking the arrows, the menu automatically closes
- when selecting them, I dynamically modify the images items, but I can't make the menu update!
I tried everything: Refresh/Update/Invalidate of the parent control, PerformSelect on all the images items, calling SendMessage with WM_PAINT, WM_PRINT, WM_PRINT_CLIENT with the menu handle, and the parent control handle, I've even tried to set to false then back to true all the images items OwnerDraw, they update more or less, but the false ownerdraw menu (brief) displaying is awful!

I didn't manage to find an answer to my problems on the web, so if someone have a clue it would be great to tell me! Either about how making my long menu not taking all the screen height, or forcing the menu to update when I dynamically modify it!

Thanks a lot
Thibaud