1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
case WM_CREATE:
{
HINSTANCE hIns;
hIns = ((LPCREATESTRUCT)lParam)->hInstance;
CreateWindowEx(NULL, L"Static", L"Server: ", WS_CHILD | WS_VISIBLE, 10, 20, 75, 20, hWnd, (HMENU)IDC_SERVER_LABEL, hIns, NULL);
CreateWindowEx(NULL, L"Edit", NULL, WS_CHILD | WS_VISIBLE | WS_TABSTOP, 100, 20, 150, 20, hWnd, (HMENU)IDC_SERVER_EDIT, hIns, NULL);
CreateWindowEx(NULL, L"Static", L"Port: ", WS_CHILD | WS_VISIBLE, 10, 50, 75, 20, hWnd, (HMENU)IDC_PORT_LABEL, hIns, NULL);
CreateWindowEx(NULL, L"Edit", NULL, WS_CHILD | WS_VISIBLE | WS_TABSTOP, 100, 50, 150, 20, hWnd, (HMENU)IDC_PORT_EDIT, hIns, NULL);
CreateWindowEx(NULL, L"Static", L"DB Name: ", WS_CHILD | WS_VISIBLE, 10, 80, 75, 20, hWnd, (HMENU)IDC_DB_LABEL, hIns, NULL);
CreateWindowEx(NULL, L"Edit", NULL, WS_CHILD | WS_VISIBLE | WS_TABSTOP, 100, 80, 150, 20, hWnd, (HMENU)IDC_DB_EDIT, hIns, NULL);
CreateWindowEx(NULL, L"Static", L"Username: ", WS_CHILD | WS_VISIBLE, 10, 110, 75, 20, hWnd, (HMENU)IDC_USER_LABEL, hIns, NULL);
CreateWindowEx(NULL, L"Edit", NULL, WS_CHILD | WS_VISIBLE | WS_TABSTOP, 100, 110, 150, 20, hWnd, (HMENU)IDC_USER_EDIT, hIns, NULL);
CreateWindowEx(NULL, L"Static", L"Password: ", WS_CHILD | WS_VISIBLE, 10, 140, 75, 20, hWnd, (HMENU)IDC_PASSWORD_LABEL, hIns, NULL);
CreateWindowEx(NULL, L"Edit", NULL, WS_CHILD | ES_PASSWORD | WS_VISIBLE | WS_TABSTOP, 100, 140, 150, 20, hWnd, (HMENU)IDC_PASSWORD_EDIT, hIns, NULL);
CreateWindowEx(NULL, L"Button", L"Connect", WS_CHILD | WS_VISIBLE, 100, 170, 90, 25, hWnd, (HMENU)IDC_LOGIN_BUTTON, hIns, NULL);
CreateWindowEx(NULL, L"Button", L"Exit", WS_CHILD | WS_VISIBLE, 200, 170, 50, 25, hWnd, (HMENU)IDC_EXIT_BUTTON, hIns, NULL);
SetFocus(GetDlgItem(hWnd, IDC_SERVER_EDIT));
return 0;
}
|