c++ - How do I make a button respond according to any input text? -


i have project working on. want user input specific number '8123' , clicks on 'show count', outputs message 'you have 8123'. if user inputs '812' , clicks on 'show count', should output 'this number 812'.

    /*  make class name global variable  */ tchar szclassname[ ] = _t("codeblockswindowsapp");  char str1[5], str2[5];   hwnd textbox;             case wm_create: {              hwnd hwndtextbox   =  createwindow (text("edit"), text (""),                 ws_visible | ws_childwindow | ws_border | wm_gettext,                 100, 20, 130, 20,                 hwnd,(hmenu)  null, null, null);                  createwindow (text("button"), text ("process "),                 ws_visible | ws_child ,                 200, 100, 70, 20,                 hwnd,(hmenu) 1, null, null);    if (         sendmessage  (         hwndtextbox  ,         (uint) cb_addstring,         (wparam) 0, (lparam) text ("8123" )));           {              ::messagebox(hwnd, "you have 8123" , "show count",  mb_ok | mb_iconinformation);          }          if (         sendmessage  (         hwndtextbox  ,         (uint) cb_addstring,         (wparam) 0, (lparam) text ("812" )));           {              ::messagebox(hwnd, "this number 812" , "show count",  mb_ok | mb_iconinformation);          }       return 0;          }                      break; 

my problem that, if user opens application first time, there command comes first in 'your have 8123' without input. worst of all, when user inputs numbers , clicks 'show count', there no pop-up message. if not enough, applies inputs (8123, 812) user type in. told send 'wm_gettext' 'sendmessage' function, however, think did not pass them well. 1 more thing, not know how use strcmp aside. using code::blocks win32 appreciating.


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -