Log in

View Full Version : Finding a button's code


pompeii
September 1st, 2001, 10:04
Can anyone tell me how to find the code attached to a button in SoftIce or a disassembler? I've messed around with it some in SoftIce. The best thing I can think of is to but a BMSG on WM_COMMAND. I'm still having a hard time finding the button's code. Any ideas? Thanks.

Fake51
September 9th, 2001, 09:23
What exactly are you looking for? the hwnd of the button, or the control code, that takes action according to messages received?
The hwnd can be found easily, by doing your basic hwnd <app name here> and then skimming thru the different hwnds till you find the right one (this would ofcourse be done in softice). The other is harder, since it would depend on how the button was created. You might wanna do a "bpx createwindowexa" and then check whether or not it's a button that's created. Then you can find the routine that handles the messages (usually the parent window), and then act accordingly.

Bluajn cxielojn
Fake

lololol
September 9th, 2001, 10:08
h