Thank for your help. I solved my problem: MyProc was always returning 0 whatever the message was, whereas it has to treat Windows messages such as "WM_CREATE", ... (traditional messages to create a window). Now, I use "return DefWindowProc(_hWnd,_iMsg,_wParam,_lParam)" when I receive a Windows message different from my messages.