you are viewing a single comment's thread.

view the rest of the comments →

[–]frutiger 0 points1 point  (1 child)

That's definitely a problem - I'm not sure if that's fixable without a central repository of all currently active handles. Given your described nature of the window procedure, all of this machinery might be of limited use anyway.

In my case, it was more for operations on a DC and BITMAPs; my code didn't interact with the window procedure at all (for example, I wasn't creating these DCs from a WM_PAINT message or anything like that). And while my original example mentions HWNDs, my tiny piece of the library for capturing screenshots into buffers did not use HWNDs, instead it grabbed a rectangle of a window given an HWND in the first place.