Link to the project
I decided to write a simple Paint, to penetrate into WinAPI. As a result, if you draw more than 20 seconds, then everything freezes and the menu on top disappears. What could be the problem?
Closed due to the fact that off-topic participants insolor , VTT , MSDN.WhiteKnight , αλεχολυτ , 0xdb Jun 11 '18 at 23:11 .
It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:
- “Questions asking for help with debugging (“ why does this code not work? ”) Should include the desired behavior, a specific problem or error, and a minimum code for playing it right in the question . Questions without an explicit description of the problem are useless for other visitors. See How to create minimal, self-sufficient and reproducible example . " - insolor, VTT, MSDN.WhiteKnight, αλεχολυτ, 0xdb
|
1 answer
The reason is simple - the exhaustion of resources. Pencil (pen) you create, and for every sneeze, and delete them do not delete. Read the documentation and call DeleteObject.
In general, if you create 10,000 descriptors, they will "end" and there will be a hang or a fall.
- Thank! Made the handle global, now everything works) - Viktor Cherniak
|