hi there!
I'm struggling with an issue and I hope someone could help me!
Actually, I'm trying to edit every time a static text in a dialog box edited in my ressource file.
Because I'm using the rc file, my static text isn't linked to an HWND variable. It only has a reference (IDC_STATIC_TEXT).
In the same way, my dialog has a reference (IDD_DIALOG) and is called in my program as following:
DialogBox(hInst, MAKEINTRESOURCE(IDD_DIALOG), hWnd, Function);
where hWnd is my main HWND and Function is the function handling events from my dialog box.
This's its declaration:
INT_PTR CALLBACK Function(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
I would like to find a mean to send a message either to my static text or to my dialog from the while loop of my main function of my API:
For example:
int APIENTRY _tWinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPTSTR lpCmdLine,int nCmdShow){
/* declaration */
while (GetMessage(&msg, NULL, 0, 0)){
/*send message to my static text or dialog*/
}
}
Thanks in advance for your replies !
Sincerely
M.
I'm struggling with an issue and I hope someone could help me!
Actually, I'm trying to edit every time a static text in a dialog box edited in my ressource file.
Because I'm using the rc file, my static text isn't linked to an HWND variable. It only has a reference (IDC_STATIC_TEXT).
In the same way, my dialog has a reference (IDD_DIALOG) and is called in my program as following:
DialogBox(hInst, MAKEINTRESOURCE(IDD_DIALOG), hWnd, Function);
where hWnd is my main HWND and Function is the function handling events from my dialog box.
This's its declaration:
INT_PTR CALLBACK Function(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
I would like to find a mean to send a message either to my static text or to my dialog from the while loop of my main function of my API:
For example:
int APIENTRY _tWinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPTSTR lpCmdLine,int nCmdShow){
/* declaration */
while (GetMessage(&msg, NULL, 0, 0)){
/*send message to my static text or dialog*/
}
}
Thanks in advance for your replies !
Sincerely
M.