Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Hey I can draw in Notepad.exe too! GetDC(hwnd)

Note that if you actually want to do something like this, you'd probably need to deactivate the Edit window from rendering anything, sending WM_SETREDRAW will probably work.



Notepad has been rewritten using the new WinRT APIs in Win11, so I doubt any of that still works.


A quick check of Windows 11 notepad reveals that it is still creating child windows. Text editor is of class RichEditD2DPT, status bar is msctls_statusbar32, menu bar is Windows.UI.Composition.DesktopWindowContentBridge.

As long as they are actual win32 Windows, then you can still interact with them using the system's API functions.

Other fun fact, Direct3D has interfaces inside of GDI32.DLL, look at all the D3DKMT functions there.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: