Can i change a static text in a Dialog after window came up in vc++ mfc application?
I am initialising a Dialog by using OnInitDialog and i initialized a static text as "loading开发者_运维知识库"
now i had a function after it returns static text should change from "loading" to "initialized".
is this possible??
can text change even after a dialog came up??
Yes, of course it can. But you will have to change its ID to something other than IDC_STATIC. Then, you can use it like any other control.
Personally, I would create a control variable from it, and do
m_MyStatic.SetWindowText(L"Initialized");
(Not really. I would store the string in the STRINGTABLE and load it from there, buy you get the idea)
精彩评论