M_ exists in many places of MFC. . . What do you mean by things like m _ hwnd and m _?

The abbreviation of m_ = member means that he is a member variable of a class.

This is the naming standard of MFC programming. When there are many things, it is difficult to understand and organize without standards. You can have your own habits, but naming the code according to some existing specifications can make the code clear and easy to read.