Log in

View Full Version : Pushing button


SilSaLaMaTa
August 24th, 2002, 12:04
Hi ,
Is there anyway to push two button together in a window ?
or Pushing a button while typing in a edit box ?
I want to make the button always pushed .

DakienDX
August 24th, 2002, 14:20
Hello SilSaLaMaTa !

When you press a button, a message is sent to the window telling that the button was pressed. The same goes for releasing the button.
Normally the action associated with the button happens when releasing the button. (press a button, move the mouse off the button, release the mouse button and you'll see that nothing happens)

So if you would press two buttons, one of them must be the first, the same happens when releasing them. The first button is released, the window gets the corresponding message, the action associated to it takes place, then the second button is released, the window gets the message and the second action takes place.
So there would be no difference pushing two buttons at the same time or one after the other (expect that you can't press two buttons at the same time).

I'm really wondering why you want to have a button always pushed.

SilSaLaMaTa
August 24th, 2002, 14:36
Hi ,
There is a Talk button in Yahoo! Messenger , while u push it , u can speak . but while u r speaking , u can't type ! u should keep your mouse on the talk button .
I want to make that button pushed , so I can type (or do something else)
Talk button works when u push it ,when u release it , then u can't talk anymore .

DakienDX
August 24th, 2002, 15:20
Hello SilSaLaMaTa !

Now I understand what you're trying to do.

Find the window procedure (WndProc, discussed lately), check what happens if the "Speak"button is pushed and patch it as you like.
(remove the "button released" function, change the button into a checkbox with a resource editor and modify the old functions to fit a checkbox, modify the button so that it's on if you press it one time and off if you press it an other time, ...)

NervGaz
August 24th, 2002, 15:24
write a tool that gets the windowhandle that the proc that checks for for the button, and the sends the BN_CLICKED message to the proc like every 5 seconds or something... but that's not really a great solution... best i can think of right now tho

SilSaLaMaTa
August 24th, 2002, 15:28
hi ,
Greate idea to change the button to a Checkbox , but I can't find the button in the resources all of the resources is in Res_msgr.dll , this one is in that too (cause I search for "Talk" in Unicode , and it found in that) , but ResourceHacker and PeExplorer didn't show it .

NervGaz :
u should keep button pushed to talk . so u can't send message to it every 5 seconds or ... BN_CLICKED is not helpful , because the button need WM_LBUTTONDOWN .

Edited :
DakienDX : I didn't find WndProc for Talk button I found it for other things (volume control and the others) . there is no defwindowproca . I found somewhere that executes when u release the button , but didn't find what happens when u push the button . When button pushed there is a bar that shows the volume . I found the function that draw the bars , but didn't help