Jump to content
View in the app

A better way to browse. Learn more.

Tuts 4 You

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Catching remote WM_PAINT messages

Featured Replies

Posted
hi all,

 

i would like to ask ur help if you can guide me on how to subclass/detour remote (exe) control or simply catch remote process's wm paint messages using hook or whatsoever?

 

preferred language delphi. would likely pay $$ for help. ty!

You will want to hook their WNDPROC to obtain the window messages. This can be done using the SetWindowLongPtr API.

https://msdn.microsoft.com/en-us/library/windows/desktop/ms644898(v=vs.85).aspx

For compatibility reasons and for privilige reasons its typically best to do this via DLL injection so you can hook into the same process, but it is not required. (On XP/2000 though, as MSDN says if you do not own the window, the API call will fail.)

You will need the windows hWnd for this, which you can obtain via FindWindow or enumerate the windows via EnumWindows:

https://msdn.microsoft.com/en-us/library/windows/desktop/ms633497(v=vs.85).aspx

Once you have the hWnd of the window you want to subclass, use SetWindowLongPtr with the GWL_WNDPROC param. The last param will be a pointer to the new function to call. (Be sure to store the return and use it for returning default values back to the window so it does not lock up or work incorrectly.)

Edit: Here are some direct examples for Delphi:

http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_20026950.html

http://swag.outpostbbs.net/DELPHI/0041.PAS.html

http://stackoverflow.com/questions/24533123/how-to-get-the-window-handle-from-inside-wndproc

Edited by atom0s

  • Author

thanks for advise, i sent you a pm


Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.