1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
case WM_CREATE: {
mySzInput = "30";
hwnd_ed_1 = CreateWindowEx(WS_EX_CLIENTEDGE, "edit", mySzInput,
WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_BORDER | ES_LEFT | ES_NUMBER,
50, 90, 60, 30, // x, y, w, h
hwnd, (HMENU)(100),
(HINSTANCE) GetWindowLong (hwnd, GWL_HINSTANCE), NULL);
szInput[MAX_PATH] = {mySzInput[0]};
szString = GetWindowText(GetDlgItem(hwnd_ed_1, 100), szInput, MAX_PATH);
case WM_COMMAND: {
wmId = LOWORD(wParam);
wmEvent = HIWORD(wParam);
if(LOWORD(wParam) == 143){
const HWND text_box = GetDlgItem( hwnd_ed_1, 100 );
beatsperminute = (int)text_box;//.asInt();
std::string test = std::to_string(beatsperminute);
const char* testcount = test.c_str();
MessageBox(hwnd, testcount, "Version info", MB_ICONINFORMATION);
|