What you have done there is correct so far, but it will only change the title of the message box , and the problem is that your program state is paused until the ok button is pressed on the created message box. This is why all of your findwindow() e.t.c code will have to go in a seperate thread i think, i would give you some code for the thread but i cant rembmer how to do them properly. But heres some code for how you would change the main meassage rather than the title.
Code:
HWND h_msgbox;
HWND h_msgbox_text;
h_msgbox = FindWindow(0, "Test Title");
if(h_msgbox != NULL)
{
// window found now get the static text handle to change.
// Im not sure as i dont have a compiler but you probably have to use the SetParent() function here, so it searchs the parent HWND for the child HWND.
h_msgbox_text = FindWindow(0, "Message Box Text");
if(h_msgbox_text != NULL)
{
SetWindowText(h_msgbox_text, "New Text");
}
else
{
// child error
}
}
else
{
// error
}
I think thats correct, but you will need to put the code after the message box creation in a seperate thread. Hope thats some help.