Re: [python-win32] HookMessage fails

2007-05-24 Thread Mark Hammond
> On 5/23/07, Mark Hammond <[EMAIL PROTECTED]> wrote: > > I think the problem is likely related to the "main frame" > issue quoted below. > > I suggest you debug what the app's "main frame" is at any > given point in > > time, and confirming the value is still appropriate. > > I tried putting th

Re: [python-win32] HookMessage fails

2007-05-24 Thread TK Soh
On 5/23/07, Mark Hammond <[EMAIL PROTECTED]> wrote: > I think the problem is likely related to the "main frame" issue quoted below. > I suggest you debug what the app's "main frame" is at any given point in > time, and confirming the value is still appropriate. I tried putting this statement in th

Re: [python-win32] HookMessage fails

2007-05-23 Thread TK Soh
On 5/23/07, Mark Hammond <[EMAIL PROTECTED]> wrote: > I think the problem is likely related to the "main frame" issue quoted below. > I suggest you debug what the app's "main frame" is at any given point in > time, and confirming the value is still appropriate. Being new to pywin32, I'm not sur

Re: [python-win32] HookMessage fails

2007-05-23 Thread Mark Hammond
I think the problem is likely related to the "main frame" issue quoted below. I suggest you debug what the app's "main frame" is at any given point in time, and confirming the value is still appropriate. Mark > On 5/15/07, Mark Hammond <[EMAIL PROTECTED]> wrote: > > > > This is the magic of MF

Re: [python-win32] HookMessage fails

2007-05-23 Thread TK Soh
On 5/15/07, Mark Hammond <[EMAIL PROTECTED]> wrote: > > > This is the magic of MFC - if no parent is specified, the > > "main window" for > > > the application is automatically used. > > > > > > > Isn't that the issue, then? He's writing a dialog to plug in to > > Explorer, and every time he runs,

Re: [python-win32] HookMessage fails

2007-05-15 Thread Mark Hammond
> > This is the magic of MFC - if no parent is specified, the > "main window" for > > the application is automatically used. > > > > Isn't that the issue, then? He's writing a dialog to plug in to > Explorer, and every time he runs, there's a different "main window". > MFC gets its concept of a "m

Re: [python-win32] HookMessage fails

2007-05-15 Thread Tim Roberts
Mark Hammond wrote: >>> I don't see the parent being passed into the dialogs in pywin32's >>> sample code. Is this going to be a problem? >>> >> Well, in looking at the code, I don't even see a way to >> specify one, so >> this seems to have been a rat hole. >> >> I'm mildly surprised by tha

Re: [python-win32] HookMessage fails

2007-05-15 Thread Mark Hammond
> > I don't see the parent being passed into the dialogs in pywin32's > > sample code. Is this going to be a problem? > > Well, in looking at the code, I don't even see a way to > specify one, so > this seems to have been a rat hole. > > I'm mildly surprised by that. The CreateDialog APIs all take

Re: [python-win32] HookMessage fails

2007-05-15 Thread Tim Roberts
TK Soh wrote: > > Actually I didn't specify any parent at all: > > class MyDialog(Dialog): >def __init__(self, title=None, tmpl=None): >self.title = title >if tmpl is None: >tmpl = dlg_template() >Dialog.__init__(self, tmpl) > > I don't see the parent being p

Re: [python-win32] HookMessage fails

2007-05-15 Thread TK Soh
On 5/15/07, Tim Roberts <[EMAIL PROTECTED]> wrote: > TK Soh wrote: > > > > Thanks for the info, but I'm not sure about Platform SDK. I started > > doing this windows thing directly with python32. > > > > The HookMessage is called in OnInitDialog(), so I presumed is called > > every time a new dialo

Re: [python-win32] HookMessage fails

2007-05-15 Thread Tim Roberts
TK Soh wrote: > > Thanks for the info, but I'm not sure about Platform SDK. I started > doing this windows thing directly with python32. > > The HookMessage is called in OnInitDialog(), so I presumed is called > every time a new dialog is created (I'm very new to windows > programming): Yes, it is

Re: [python-win32] HookMessage fails

2007-05-15 Thread TK Soh
On 5/15/07, Tim Roberts <[EMAIL PROTECTED]> wrote: > TK Soh wrote: > > The hooks are working, so I guess PYWIN_WITH_WINDOWPROC support has > > indeed been compiled into ActivePython. The only problem now is the > > strange behavior when sometime the hooks don't get triggered. Any > > suggestion on

Re: [python-win32] HookMessage fails

2007-05-15 Thread Tim Roberts
TK Soh wrote: > The hooks are working, so I guess PYWIN_WITH_WINDOWPROC support has > indeed been compiled into ActivePython. The only problem now is the > strange behavior when sometime the hooks don't get triggered. Any > suggestion on workaround? > Where do you call HookWindow? Are you call

Re: [python-win32] HookMessage fails

2007-05-15 Thread TK Soh
On 5/15/07, Niki Spahiev <[EMAIL PROTECTED]> wrote: > >> In order to hook more messages (e.g. WM_SIZE) you must recompile pywin32 > >> with PYWIN_WITH_WINDOWPROC defined > > > > I'm confused. The hooks appeared to work fine, though only in the > > dialog opened from the specific explorer window as

Re: [python-win32] HookMessage fails

2007-05-15 Thread Niki Spahiev
>> In order to hook more messages (e.g. WM_SIZE) you must recompile pywin32 >> with PYWIN_WITH_WINDOWPROC defined > > I'm confused. The hooks appeared to work fine, though only in the > dialog opened from the specific explorer window as I described > earlier. I've tried WM_SIZE, WM_ACTIVATE, etc.

Re: [python-win32] HookMessage fails

2007-05-15 Thread TK Soh
On 5/15/07, Niki Spahiev <[EMAIL PROTECTED]> wrote: > TK Soh wrote: > > Greeting. > > > > I built a custom dialog which would be resized by a handler connected > > with HookMessage() to win32con.WM_SIZE. The dialogs are actually > > called from the shell extension's context menu. Every seemed to wo

Re: [python-win32] HookMessage fails

2007-05-15 Thread Niki Spahiev
TK Soh wrote: > Greeting. > > I built a custom dialog which would be resized by a handler connected > with HookMessage() to win32con.WM_SIZE. The dialogs are actually > called from the shell extension's context menu. Every seemed to work > well at first. > > The I noticed the resize handler is on

[python-win32] HookMessage fails

2007-05-14 Thread TK Soh
Greeting. I built a custom dialog which would be resized by a handler connected with HookMessage() to win32con.WM_SIZE. The dialogs are actually called from the shell extension's context menu. Every seemed to work well at first. The I noticed the resize handler is only called on the dialogs that