![]() |
|
#1
|
|||
|
|||
problem with filling a char array in a windows GUI app.I'm working on a GUI for windows, for this I'm using the win32 API.
I have a dialog with a single textedit control, An Ok and Cancel button. What I want is, that when I enter some text in the first control, it will appear in a messagebox. But for some reason it won't. I've added the string variable result to see if the messagebox worked properly (which it does) and the variable dat to see if the while statement did it's job(iterate through the char array). CPP / C++ / C Code:
Well the iteration won't work because, quite probally because the char array is empty. But how can this array be empty? I did enter data in de textedit control and clicked "Ok". |
|
#2
|
|||
|
|||
Re: problem with filling a char array in a windows GUI app.Everything looks good except when you call GetDlgItemText() you are sending the parent window of the dialog box as an argument for the hwndDlg parameter. You need to find some way of getting the handle of the dialogbox window and sending that as an argument there.. A suggestion is getting it through the NewdataProc() window procedure somehow.. GL
|
Recent GIDBlog
I?m Home by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 2D arrays:dynamic allocation and freeing | bravetanveer | C Programming Language | 48 | 27-Nov-2007 16:55 |
| Need help deleting the last element in the array | headphone69 | C++ Forum | 2 | 15-Mar-2006 20:31 |
| problem modifying an array of char in a function | ronin | C Programming Language | 10 | 28-Mar-2005 19:15 |
| Compiling Errors | ToddSAFM | C++ Forum | 22 | 18-Dec-2004 12:42 |
| Creating N string | gwk | C Programming Language | 3 | 21-Jul-2004 00:27 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The