How can I set a breakpoint for a button click using ollydbg?

user3725506 picture user3725506 · Jun 10, 2014 · Viewed 18.5k times · Source

How can I set a breakpoint for a button click using ollydbg?

i am trying to disable a button click on game client, so i want to set break point to catch the button click event. is that possible to happen with ollydbg?

Answer

Amir picture Amir · Mar 28, 2016

let application make window and buttons then pause it.

in ollyDBG 1 :

  • go to view > windows
  • select your button.
  • right click and select Message breakpoint on ClassProc
  • in Messages: select 202 WM LBUTTONUP
  • select Break on all windows with same title
  • select Pause program: On message
  • select Log WinProc arguments: Never

in ollyDBG 1 or 2 :

  • go to view > windows
  • select your button.
  • right click and select Conditional breakpoint... Shift+F2
  • type [ESP+8]==WM_LBUTTONUP as your condition and run program