Message277664
The GetWindowRect example seems fine, for the most part. The docs don't have to show it being called. If I were to call it, I'd use GetForegroundWindow to get a window handle. GetActiveWindow returns the active window attached to the current thread's message queue, but a console application probably doesn't own a window. (The console window is owned by conhost.exe.)
A more pressing matter is the GetModuleHandle examples, which need to either be fixed or replaced. GetModuleHandle returns a module's base address, and in a 64-bit process the result could be truncated when returned as the default C int type. GetModuleHandleW.restype has to be set to a pointer type. Setting it to a Python function, such as the ValidHandle example, has the same truncation problem. In general, a ValidHandle checker would have to be implemented as an errcheck function. |
|
Date |
User |
Action |
Args |
2016-09-28 21:33:54 | eryksun | set | recipients:
+ eryksun, docs@python, python-dev, berker.peksag, Dan.O'Donovan |
2016-09-28 21:33:54 | eryksun | set | messageid: <1475098434.25.0.917002233494.issue21903@psf.upfronthosting.co.za> |
2016-09-28 21:33:54 | eryksun | link | issue21903 messages |
2016-09-28 21:33:53 | eryksun | create | |
|