79181562

Date: 2024-11-12 14:43:26
Score: 0.5
Natty:
Report link

When you don't receive any message in Window procedure, you should call DefWindowProc() function to handle any unprocesses message. So, you used break statement under default case in window procedure, which is wrong. More on DefWindowProc() function here: https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-defwindowproca. Also, as others have stated, you did not use break statements in case blocks in window procedure. This is obivously wrong, because everything will execute, including handling from unreceived messages. And, lastly, my suggestion, you don't need to put curly brackets at the beggining of every case block. You should do that only if you declare new variables in that scope, otherwise it isn't necessary, and it worsens code readability, as too much curly brackets can only cause confusion.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Starts with a question (0.5): When you
  • Low reputation (1):
Posted by: SodaTheCoder