How do u change the text of a edit box in a dialog? Not in the main window......... not using mfc... can anyone help me.. plz?
SetDlgItemText() doesnt seem to work......
How do u change the text of a edit box in a dialog? Not in the main window......... not using mfc... can anyone help me.. plz?
SetDlgItemText() doesnt seem to work......
SetDlgItemText() does work.
Need some code to find the problem.
What params are you sending in?
What callback are you in?
"Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
Friedrich Nietzsche
"I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
George Best
"If you are going through hell....keep going."
Winston Churchill
the call itself...ive tried calling it from the main...from the callback WM_CREATE in ToolDlgProc.... im lost!ive tried calling it before and after i set the dialog up... in main
SetDlgItemText(
hwnd, // maybe this is wrong? its my handle for the main window which creates the dialog
IDC_STATUS,
"TEST");
the dialog box which contains the edit control...
DialogBox(GetModuleHandle(NULL),MAKEINTRESOURCE(ID D_MAIN), hwnd, ToolDlgProc);
finnaly its call back....
BOOL CALLBACK ToolDlgProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam);
Is there a certain value i need to set in the edit control to inable this to work..? Or does SetDlgItemText() have to be in a certain spot..? or do something special in a call back? im confused
do i have to update the dialog or resource after i do this?
In ToolDlgProc()
under WM_INIT or WM_CREATE
SetDlgItemText(hWnd,IDC_STATIC,"Text to Set");
UpdateWindow(hWnd);
where hWnd is the HWND in the callback. eg of the whole dlg.
or else where
SetWindowText( GetDlgItem(hDlg, IDD_MAIN), IDC_STATIC, "Text to Set");
UpdateWindow(GetDlgItem(hDlg, IDD_MAIN));
"Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
Friedrich Nietzsche
"I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
George Best
"If you are going through hell....keep going."
Winston Churchill