I am trying to set the text to the "Save" button in the "Save file as ..." dialog box.
I set the hook, received the message, found the button (nb. If I call " GetWindowText()" I see "and" Save ", so I know that this is the right button).
Then I changed the text using " SetWindowText()" (and named " GetWindowText()" to check it - the text is correct).
But ... the button still says "Save."
I can change the Cancel button using the same code - no problem. What is so special about the save button? How can I change it.
Code (for what it's worth):
static UINT_PTR CALLBACK myHook(HWND hwnd, UINT msg, WPARAM, LPARAM)
{
if (msg == WM_INITDIALOG) {
wchar_t temp[100];
HWND h = GetDlgItem(GetParent(hwnd),IDOK);
GetWindowTextW(h,temp,100);
SetWindowTextW(h,L"Testing");
GetWindowTextW(h,temp,100);
}
}