[pywin32-bugs] [ pywin32-Bugs-838232 ] SetScrollInfo incorrectly raises exception
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2003-11-11 18:38:50
|
Bugs item #838232, was opened at 2003-11-07 14:16 Message generated for change (Comment added) made by glchapman You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=838232&group_id=78018 Category: win32 Group: None Status: Open Resolution: None Priority: 5 Submitted By: Greg Chapman (glchapman) Assigned to: Nobody/Anonymous (nobody) Summary: SetScrollInfo incorrectly raises exception Initial Comment: I'm using win32all build 163 on Windows XP. I just got an api exception with 0 error code when using win32gui.SetScrollInfo. It looks like the reason for this is that PySetScrollInfo treats the result of the SetScrollInfo api call as a BOOL, with a false result indicating error. My copy of the win32 api documentation states that SetScrollInfo returns the current position of the scroll box. This position happened to be 0 in my case, so PySetScrollInfo raised an exception. Also, I just discovered that win32gui.GetScrollInfo also generates an api error with a 0 error code. Looking at the source, I note that PyGetScrollInfo does not fill in the fMask field before calling GetScrollInfo. My documentation indicates the mask must be initialized to specify which members to retrieve. ---------------------------------------------------------------------- >Comment By: Greg Chapman (glchapman) Date: 2003-11-11 09:38 Message: Logged In: YES user_id=86307 I'm attaching a diff file to indicate the changes I think are needed. I used the web CVS browser to get the win32gui.i file, so the date of the original is wrong, but it is revision 1.31. The changes included address both this report and report 838065. ---------------------------------------------------------------------- Comment By: Greg Chapman (glchapman) Date: 2003-11-07 14:25 Message: Logged In: YES user_id=86307 Also concerning win32gui.GetScrollInfo, if it creates an exception because ok is false, it fails to return NULL. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=838232&group_id=78018 |