NOTE: The Init3D call takes place after the Window creation
By that I assume/hope you mean after you have processed the WM_CREATE message.
Also mode GFX_WINDOWED I think is the only legal parameter for working with owner hwnd, use the viewport command to set the output to the correct scale.