Dialog box help..
I have a dialog box with an edit box in it. I just need to know how to extract the text from the box and put it in a variable. Any help would be greatly appreciated.
Assuming you are working with MSVC 6:
With MFC you assign a variable of type CString to it and call UpdateData(TRUE) to have the text of the Edit control copied to the CString.
Without MFC you call GetDlgItemText() and pass it a pointer to a char array along with the size of the array where the text will be copied to.
With MFC you assign a variable of type CString to it and call UpdateData(TRUE) to have the text of the Edit control copied to the CString.
Without MFC you call GetDlgItemText() and pass it a pointer to a char array along with the size of the array where the text will be copied to.
What language (C++/Delphi/Java/Visual Basic)? What API are you using? (win32, MFC, VCL [Delphi, Borland C++ Builder], Swing [Java])
I use C++ and Win32 API.
GetDlgItemText(hwnd, 1002, buf, 100);
buf seems to come out empty everytime.
GetDlgItemText(hwnd, 1002, buf, 100);
buf seems to come out empty everytime.
Crossposting is bad.
---visit #directxdev on afternet <- not just for directx, despite the name
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement