I am a programmer in C. I have not yet started to program Windows in C, but my curiousity has been aroused. How would you get a string from a text box, let's say, when the use clicks the command, "Convert"? Thanks.
Printable View
I am a programmer in C. I have not yet started to program Windows in C, but my curiousity has been aroused. How would you get a string from a text box, let's say, when the use clicks the command, "Convert"? Thanks.
By using GetDlgItemText().
What library is that in? Windows.h? Thanks.
Yeah, it's declared in a header file that's included in windows.h. Check MSDN for details.
Thanks! Oh, and thanks for the link. I was looking for a site that had the resources for libraries. Thanks again!
Can anyone post a small code snippet that shows how GetDlgItemText() is used?
I would really appreciate it...
This is from a logon dialog.
//*******************************
case IDC_USERNAME:
if (EN_CHANGE == HIWORD(wParam))
{
GetDlgItemText(hwnd,IDC_USERNAME,sName,STRING);
}
break;
//*******************************