Mar 21st, 2003, 04:22 AM
#1
Thread Starter
Member
Error if I wont to GetWindowText()?!!
Hi ,
If I wont to GetWindowText () on my project .
As in the following Cod .
Code:
void CMainFrame::OnGetviewtextGettext()
{
CString msg;
CLesenView.GetWindowText(msg);
MessageBox(msg);
}
I don’t do whey this Error .
Code:
--------------------Configuration: lesen - Win32 Debug--------------------
Compiling...
MainFrm.cpp
H:\lesen\MainFrm.cpp(112) : error C2143: syntax error : missing ';' before '.'
H:\lesen\MainFrm.cpp(112) : error C2143: syntax error : missing ';' before '.'
Error executing cl.exe.
lesen.exe - 2 error(s), 0 warning(s)
Thank you for help me:>
Mar 21st, 2003, 04:25 AM
#2
Thread Starter
Member
Attached Files
Mar 22nd, 2003, 06:41 PM
#3
CLesenView.GetWindowText(msg);
You need a class instance.
All the buzzt
CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Mar 23rd, 2003, 11:35 AM
#4
Thread Starter
Member
thake you for help me .
yes , but when I create instance of CLesonView as the following .
Code:
void CMainFrame::OnGetviewtextGettext()
{
CString msg;
CLesenView myView;
myView.GetWindowText(msg);
MessageBox(msg);
}
that make the followin error.
Code:
--------------------Configuration: lesen - Win32 Debug--------------------
Compiling...
MainFrm.cpp
H:\lesen\MainFrm.cpp(113) : error C2248: 'CLesenView::CLesenView' : cannot access protected member declared in class 'CLesenView'
h:\lesen\lesenview.h(16) : see declaration of 'CLesenView::CLesenView'
Generating Code...
Compiling...
lesen.cpp
Generating Code...
Error executing cl.exe.
lesen.exe - 1 error(s), 0 warning(s)
and I'm read in one book the CappView and Cappdoc and so are run time class .
the opration in the EditTextBox are good but in the View inhereted to EditView make error.
Mar 23rd, 2003, 12:18 PM
#5
There must be a view instance already lying around somewhere. Use it.
All the buzzt
CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Mar 23rd, 2003, 08:39 PM
#6
Thread Starter
Member
Thank you I will search for it
Mar 24th, 2003, 12:09 PM
#7
GetActiveView() should do it in the frame class unless it's an MDI program.
All the buzzt
CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Mar 25th, 2003, 04:04 AM
#8
New Member
hello,
whow I can do It ?
Get the Text from the EditView in SDI ...
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