----- Original Message ----- From: "Progor" <[EMAIL PROTECTED]> To: <pythonce@python.org> Sent: Tuesday, February 27, 2007 2:15 PM Subject: [PythonCE] One other question: detecting SIP
> > Is it possible to detect whether the SIP (software keyboard) is displayed > or > not? It would be nice to resize my main frame when the SIP is in the way. You need to do the following: 1. Allocate a SHACTIVATEINFO structure 2. When your main window receives a WM_SETTINGCHANGE message, call SHHandleWMSettingChange() passing the structure 3. When you receive WM_ACTIVATE, call SHHandleWMActivate() passing the same structure The resizing of your window will now be done for you. Luke class SHACTIVATEINFO(ctypes.Structure): _fields_ = [ ('cbSize', DWORD), ('hwndLastFocus', HWND), ('flags', UINT), ] def __init__(self): ctypes.Structure.__init__(self) self.cbSize = ctypes.sizeof(self) aygshell = ctypes.cdll.aygshell SHHandleWMSettingChange = aygshell[83] SHHandleWMSettingChange.argtypes = [ HWND, WPARAM, LPARAM, ctypes.POINTER(SHACTIVATEINFO) ] SHHandleWMSettingChange.restype = BOOLRESULT SHHandleWMActivate = aygshell[84] SHHandleWMActivate.argtypes = [ HWND, WPARAM, LPARAM, ctypes.POINTER(SHACTIVATEINFO), DWORD ] SHHandleWMActivate.restype = BOOLRESULT _______________________________________________ PythonCE mailing list PythonCE@python.org http://mail.python.org/mailman/listinfo/pythonce