Ok so this is the code.
hEdit=CreateWindowEx(WS_EX_CLIENTEDGE,
"EDIT",
"",
WS_CHILD|WS_VISIBLE|ES_MULTILINE|ES_AUTOVSCROLL|ES_AUTOHSCROLL,
50,
100,
200,
100,
hWnd,
(HMENU)IDC_MAIN_EDIT,
GetModuleHandle(NULL),
NULL);
ok so that creates the asset (our edit field to type into).
I can use the below code to display what is in the text box in a message box.
LPWSTR buffer[256];
SendMessage(hEdit,
WM_GETTEXT,
sizeof(buffer)/sizeof(buffer[0]),
reinterpret_cast<LPARAM>(buffer));
MessageBox(NULL,
(LPWSTR)buffer,
"Information",
MB_ICONINFORMATION);
Ok so here's what I am wanting to do. In this edit field a username will be entered example: JohnDoe I need to grab the strong "JohnDoe" and then add it in a simple dos command using the system("net localgroup administrators /add JohnDoe");
How can this be done? My brain is telling me I can declare a LPWSTR name; then name = GetDialogtext(hedit, ... or something like that? Any help would be appreciated.