Hi,

This problem has me pulling my hair out?? I have an application that doesn't display text for some users. I cannot replicate the problem as it works fine for me. I did discover that if I run the application as an administrator the problem happens?

When running the application as an administrator the SetWindowText function does not work. When running the application as normal the SetWindowText works fine.

If I try to debug the application in Visual Studio 2017 running the application in admin mode it works fine so I cannot see what the problem is. I have displayed a message box just before it calls SetWindowText and the messabe box displays the text correctly but the SetWindowText is blank?

Here's an example of the test code.

Code:
// Declared in the Header file
WCHAR m_UserPrompt[128];



// CPP implementation file
void CUserPromptDlg::GetDisplayPrompt(WCHAR *pUserPrompt)
{
	wcscpy(pUserPrompt, L"Test message");
}


void CUserPromptDlg::TestFunc1()
{
	GetDisplayPrompt(m_UserPrompt);
	AfxMessageBox(m_UserPrompt);
	SetDlgItemTextW(IDS_USER_PROMPT, m_UserPrompt);
}