[pywin32-checkins] pywin32/win32/Demos win32gui_dialog.py,1.5,1.6
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2005-04-12 03:33:59
|
Update of /cvsroot/pywin32/pywin32/win32/Demos In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4745/Demos Modified Files: win32gui_dialog.py Log Message: Deal with fallout of commctrl having an insane value for PY_OU Index: win32gui_dialog.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Demos/win32gui_dialog.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** win32gui_dialog.py 25 Jan 2005 13:41:47 -0000 1.5 --- win32gui_dialog.py 12 Apr 2005 03:33:46 -0000 1.6 *************** *** 301,305 **** hwndFrom, idFrom, code, iItem, iSubItem, uNewState, uOldState, uChanged, actionx, actiony, lParam \ = struct.unpack(format, buf) ! code += 0x4f0000 # hrm - wtf - commctrl uses this, and it works with mfc. *sigh* if code == commctrl.NM_DBLCLK: print "Double click on item", iItem+1 --- 301,310 ---- hwndFrom, idFrom, code, iItem, iSubItem, uNewState, uOldState, uChanged, actionx, actiony, lParam \ = struct.unpack(format, buf) ! # *sigh* - work around a problem with old commctrl modules, which had a ! # bad value for PY_OU, which therefore cause most "control notification" ! # messages to be wrong. ! # Code that needs to work with both pre and post pywin32-204 must do ! # this too. ! code += commctrl.PY_0U if code == commctrl.NM_DBLCLK: print "Double click on item", iItem+1 |