Does anyone know which GDI API is called to draw menus and menu items on windows? I know its not DrawText, DrawTextEx, TextOut or ExtTextOut.

9 Years
Discussion Span
Last Post by marco93

Thank you for your reply,

I think my original post wasn't too descriptive.

I know about win32 api. I'm using Detours (a library that Microsoft Research released for "detouring" a function in a given application. I don't mean to explain this with detail but what is does is to call your own function anytime the application you "detoured" calls the desired function (usually an api function). This can be used to get notified when a certain program wants to read/write values to and from the registry, files in your hard drive, etc.

I wrote a program that "detours" DrawText, DrawTextEx, TextOut or ExtTextOut (in fact their W versions) and calls the original functions with other parameters (so the given hDC gets drawn with whatever text i want).

The problem i have is that menus stay with their original text (my functions are not called) so I need to know which function(s) windows calls internally to draw menus.

By this i don't mean AppendMenu nor InsertMenuItem. I need the function(s) these call to draw text on screen.

I hope it's better explained now.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.