c++ - Update textbox value from another cpp -
I have to get text box value from another CPP file. We say that a .cpp has the following code snippet that actually creates a text box.
CreateWindow (TEXT ("edit"), text ("test"), WS_CHILD | WS_VISIBLE | WS_BORDER, 100, 20, 140, 20, HWD, Nouvel, Nouel, Null); I have to get the output or textbox value that we have created in a CPPP, but from the second CPP file to the other CPP.
How do I do this?
First of all, you have to do two things to make that editable useable. (1) Pass a unique ID as the HMEU parameter of the CreateWindow call. Control IDs are commonly declared in resource.h. You need to use that ID to search for messages from the edit control. (2) Save the HWD created by HTMLML in a global variable (HWWD Edited)
Now one can set or read text using cpp hwd edit. Make the following declaration in a declaration
External HWND HWAdit; In both CPP files, add #include "one.h" can now set or read text using second.cpp hwndEdit, in the same way in a .pp.
Comments
Post a Comment