Hello guys
I've faced the trouble that consist in text transferring into Edit control
I'm using SDI with Ribbon. The Edit control is on the panel
When I try to pass the text from My View Class by SetDlgItemText(ID_EDIT1,L"Bla-bla");
It gives no effect.
I've already tried do it in different ways
1)
::SetDlgItemText(GetParent()->GetSafeHwnd(),ID_CR_EDIT,L"adasdaasd");
also in vain
It is the merest trifle but
I don't see where the problem might be
I've red all articles on msdn and on web,But everywhere they just call
SetDlgItemText(CONTROL_ID,"Some text")
If I try run GetDlgItem(ID_EDIT1),It returns NULL. Maybe I need to catch some event in the BEGIN_MESSAGE_MAP? I don't see where the problem is.
I took Edit from toolbox and hung it on the form(like I'd do in FormConstructor in C#), then opened Properties and set a new ID.
It seems to me it's quite enough to operate with Edit control, right ?
Now I'd like to set a new value from whatever function in MyView class
I suppose the problem with parent class that handles Edit control events.
I've tried do
GetParent()->SetDlgItemText(ID_CR_EDIT,L"Abcd");
=No way
Now I'm trying to detect the parrent window with Spy++, but I haven't caught it yet :(