I want to create two textboxes on my window. I used this code
case WM_CREATE:

 hwnd = CreateWindowEx(WS_EX_CLIENTEDGE, TEXT("edit"), TEXT("sending"),
    WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_BORDER | ES_LEFT,
    15, 15, 200, 300, hwnd, NULL, NULL, NULL);

    hwnd = CreateWindowEx(WS_EX_CLIENTEDGE, TEXT("edit"), TEXT("Receiving"),
        WS_CHILD | WS_VISIBLE | WS_BORDER,
        220, 15, 100, 300, hwnd, NULL, NULL, NULL);
    break;

    It shows only one window.
    What is the problem?

This works for me. Notice I had to change hwnd parameter in CreateWindowEx()

HWND txtBox1 = NULL, txtBox2 = NULL;
...
...
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    int wmId, wmEvent;
    PAINTSTRUCT ps;
    HDC hdc;

    switch (message)
    {
    case WM_CREATE:
            txtBox1 = CreateWindowEx(WS_EX_CLIENTEDGE, TEXT("edit"), TEXT("sending"),
                WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_BORDER | ES_LEFT,
                15, 15, 200, 300, hWnd, NULL, NULL, NULL);

            txtBox2  = CreateWindowEx(WS_EX_CLIENTEDGE, TEXT("edit"), TEXT("Receiving"),
                WS_CHILD | WS_VISIBLE | WS_BORDER,
                220, 15, 100, 300, hWnd, NULL, NULL, NULL);
            break;
This question has already been answered. Start a new discussion instead.