Use WS_TABSTOP for each control
WS_TABSTOP
hwnd = CreateWindow(appName, TEXT(" basicwindow"), WS_DLGFRAME | WS_SYSMENU | WS_TABSTOP, xpos, ypos, width, height, NULL, NULL, hInstance, NULL);