News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Context menu

Started by buraks, February 10, 2020, 06:22:25 AM

Previous topic - Next topic

buraks

Hello,

i have a richedit control on the dialog box. And i show a context menu when it is right-clicked on the richedit. i want to draw a blue border around the context menu. How can i get device context and rect structure of it?

jj2007

Nice problem  :badgrin:

The window class is #32768, and it doesn't have a parent. Not easy to find. You could, however, draw the rectangle on the RichEdit's DC.

hutch--

Its an unusual requirement which adds a lot of complexity. A transparent window overlayed over the rich edit control is one way to do it but you still have to work out the dimensions of the popup menu to put the frame around it. I would look for a simpler way to do it, try a listbox in a window and draw the frame around the list box dimensions.