While using the CreateWindow function to create child controls inside the main window do I have to pass the main hInstance to it? I know I have to pass it while creating the main window, but what about child controls? If the answer is no, could you explain why so?