Hi, all, Please help me out.
I run the following code. The compiling was right, neither error nor waring. However, it threw error box "failed: GetLastError returned 87".
It seems it failed to call RegisterClaserEx function.
I had tried WNDCLASS and RegisterClass functions,removed the two lines "wndclass.cbSize=sizeof(WNDCLASS);" and "wndclass.hIconSm = LoadIcon( wndclass.hInstance, MAKEINTRESOURCE( IDI_APPLICATION ));". This time I got the created window.
I don't know Why the RegisterClassEx function, is there anything wrong? Please help me! Please! Thanks for your attention and patience.
wndclass.hIcon = LoadIcon( NULL, IDI_APPLICATION) ;
wndclass.hIconSm = LoadIcon( wndclass.hInstance, MAKEINTRESOURCE( IDI_APPLICATION )); //why don't you do this the same way you did hIcon