|
-
May 19th, 1999, 01:48 AM
#1
Changing Static Controls Text
Hi All
I have a static control in a dialog box
I know I use SetDlgItemText(IDC_STATICITEM, CString str) to change a static items text
I would like to be able to change the static controls text from my main view class
I tried creating a static function that calls SetDlgItemText but developers studio says I can't call
SetDlgItemText from a static function
Any ideas how I could change a static controls text from my view class???
Thanks Alot
-
May 19th, 1999, 04:29 AM
#2
Re: Changing Static Controls Text
I am not sure what exactly you wanna do, but here is how I catch the meaning:
make a member var in the dialog class of type CString, and then do this:
in the view class --
CDialog MyDlg;
MyDlg.m_static_text = "What ever I want to";
MyDlg.DoModal();
in the InitDialog() of the dialog class
SetDlgItemText(IDC_STATIC1,m_static_text);
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|