how will i get wnd value (define in Winproc) just after CreateWindowExW statement execute

static LRESULT CALLBACK WindowProc(HWND wnd, UINT msg, WPARAM wparam, LPARAM lparam)
{

}

int main(..)
{
HWND wnd1 = CreateWindowExW(...);

here how will i get wnd value (define in Winproc)in this line, e.g. just after CreateWindowExW statement execute.

}
Handle the WM_CREATE message, which is a C based Constructor call of the window being created/constructed, and the HWND parameter will be the HWND of the window being created. In other words, when you make a CreateWindowEx() call in WinMain(), when you receive the WM_CREATE message in WNDPROC(), that function call will be executing within the CreateWindowEx() call, and you'll get the HWND of the window being created before the CreateWindowEx() call in WinMain() returns.
Topic archived. No new replies allowed.