You need to consider what it means to be a modal window - basically, the window's parent is disabled. The only automatic way of doing this (that I am aware of) is to call DialogBox()
to create a modal dialog box. However, since you want to use CreateWindow()
, then all that you need to do is to manually disable the parent window yourself.
Ideally, it would be better to go the dialog box route (since the OS knows exactly what must be done in order to create a modal window), but I suppose this option is there if you must use it.