Send Message to Button control in a PB Application

  • Thread starter Thread starter Raj
  • Start date Start date
R

Raj

Hi,

I am trying to send message (WM_CLICK) to a button control in a
PowerBuilder application using a C# spy program. This works for all
other windows applications but in case of PB application it does not
work.

Would appreciate any help on this.

Thanks in advance

Raj
 
Raj,

How are you making the call? Are you sure that you have the right
window handle? I'm not too sure how PB works, but the controls should be
the same as any other (unless of course, it is a windowless control).

You might also want to try calling SendInput (to simulate the button
click).

In reality, more than just the WM_CLICK message is sent, you have a
mouse down message, a click message, then the mouse up event, etc, etc.
This is why SendInput is better, because it will generate that message stack
for you.

Hope this helps.
 
Back
Top