CString Problem
-
I was reading the following article http://codeproject.com/clipboard/archerclipboard1.asp[^] and when I compile the code, it give me an error (error C2039: 'GetWindowTextA' : is not a member of 'CString') and it says "see declaration of 'CString'" any help with this? thanks in advance
-
I was reading the following article http://codeproject.com/clipboard/archerclipboard1.asp[^] and when I compile the code, it give me an error (error C2039: 'GetWindowTextA' : is not a member of 'CString') and it says "see declaration of 'CString'" any help with this? thanks in advance
Dody_DK wrote: _I was reading the following article http://codeproject.com/clipboard/archerclipboard1.asp\[^\]_ is not opening on my Ccomputer , i don't knwo why. Dody_DK wrote: and when I compile the code, it give me an error (error C2039: 'GetWindowTextA' : is not a member of 'CString') and it says "see declaration of 'CString'"
GetWindowText
it Self aWin32 Api
,search for it in your local copy of MSDN
"I Think this Will Help"
visit me at http://www.thisisalok.tk
-
I was reading the following article http://codeproject.com/clipboard/archerclipboard1.asp[^] and when I compile the code, it give me an error (error C2039: 'GetWindowTextA' : is not a member of 'CString') and it says "see declaration of 'CString'" any help with this? thanks in advance
Better ask article related questions in their own forums/Message Boards. People dont like it here generally as you would have noticed by now. Found on Bash.org I'm going to become rich and famous after i invent a device that allows you to stab people in the face over the internet My Articles
-
I was reading the following article http://codeproject.com/clipboard/archerclipboard1.asp[^] and when I compile the code, it give me an error (error C2039: 'GetWindowTextA' : is not a member of 'CString') and it says "see declaration of 'CString'" any help with this? thanks in advance
-
I was reading the following article http://codeproject.com/clipboard/archerclipboard1.asp[^] and when I compile the code, it give me an error (error C2039: 'GetWindowTextA' : is not a member of 'CString') and it says "see declaration of 'CString'" any help with this? thanks in advance
As others have said, questions about code in an article are best put in that article. But I'm in a good mood. Search MSDN for GetWindowText for all the answers you can shake a stick at. GetWindowText is either a windows API function:
int GetWindowText( HWND hWnd, LPTSTR lpString, int nMaxCount );
Or a member function of CWnd:int GetWindowText( LPTSTR lpszStringBuf, int nMaxCount ) const;
void GetWindowText( CString& rString ) const;
You can see the last member function takes a parameter of CString. CString has no member function GetWindowText. So in your code you probably haveCString str; .... str.GetWindowText (...);
which should be:
void CMyWnd::OnSomething (...)
{
CString str;
....
GetWindowText (str);
....
}Iain.
-
As others have said, questions about code in an article are best put in that article. But I'm in a good mood. Search MSDN for GetWindowText for all the answers you can shake a stick at. GetWindowText is either a windows API function:
int GetWindowText( HWND hWnd, LPTSTR lpString, int nMaxCount );
Or a member function of CWnd:int GetWindowText( LPTSTR lpszStringBuf, int nMaxCount ) const;
void GetWindowText( CString& rString ) const;
You can see the last member function takes a parameter of CString. CString has no member function GetWindowText. So in your code you probably haveCString str; .... str.GetWindowText (...);
which should be:
void CMyWnd::OnSomething (...)
{
CString str;
....
GetWindowText (str);
....
}Iain.