Drawing menu gutter in RTL mode using Visual Styles on Vista
Hi all,
I'm using DrawThemeBackground() on Vista in order to draw a gutter for
a menu which is drawn using uxtheme API. The code is pretty simple,
and looks like this:
DrawThemeBackground(theme, hdc, MENU_POPUPGUTTER, 0, &gutterRect,
&clipRect);
Now, I need to support RTL (right-to-left) menus, which need the
gutter mirrored in the right side of the menu. When I calculate a new
rect at the right side of the menu as gutterRect, the
DrawThemeBackground() API draws the gutter in left-to-right mode
(i.e., the vertical bar appears at the right side of the gutter
instead of its left side), therefore the appearance is incorrect.
Is there any way to get the uxtheme API to draw the menu gutter
correctly in RTL mode?
I have the same problem in drawing the submenu icon
(MENU_POPUPSUBMENU) but I guess these two problems must have the same
solution.
Thanks in advance!
Ehsan
date: Sat, 26 Apr 2008 12:22:02 -0700 (PDT)
author: Ehsan Akhgari