(self)
Draw the popup menu.
Draw the popup menu.
Draw the popup menu .
def show_menu(self):
        """Draw the popup menu."""
        menu = win32gui.CreatePopupMenu()
        self._create_menu(menu, self.menu_options)
        
        pos = win32gui.GetCursorPos()
        # See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/menus_0hdi.asp
        win32gui.SetForegroundWindow(self.hwnd)
        win32gui.TrackPopupMenu(menu,
                                win32con.TPM_LEFTALIGN,
                                pos[0],
                                pos[1],
                                0,
                                self.hwnd,
                                None)
        win32gui.PostMessage(self.hwnd, win32con.WM_NULL, 0, 0)
        self.logger.debug('Menu displayed.')
def show_menu ( self ) : menu = win32gui . CreatePopupMenu ( ) self . _create_menu ( menu , self . menu_options ) pos = win32gui . GetCursorPos ( ) # See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/menus_0hdi.asp win32gui . SetForegroundWindow ( self . hwnd ) win32gui . TrackPopupMenu ( menu , win32con . TPM_LEFTALIGN , pos [ 0 ] , pos [ 1 ] , 0 , self . hwnd , None ) win32gui . PostMessage ( self . hwnd , win32con . WM_NULL , 0 , 0 ) self . logger . debug ( 'Menu displayed.' )