🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.tools.mfc
Article #33

HELP - CString conversion?

#33
From: iti
Date: Tue, 23 Jan 1996 23:26
26 lines
1378 bytes

When I try to read the text from a Edit Control (IDC_EDIT1) with the
following code:

--------------------------------------------------------------
CString callBuf;
int msgLen = GetDlgItemText(IDC_EDIT1, callBuf, sizeof(callBuf));
--------------------------------------------------------------

I get the following error:

--------------------------------------------------------------
error C2664: 'GetDlgItemText' : cannot convert parameter 2 from 'class 
::CString ' to 'char __far *'
--------------------------------------------------------------


I am using Visual C++, how can I read the text directly into the CString?
I know that I am doing something REAL STUPID so if you can be of any help-

Please send any advice you have for me to my EMail address:
	iti@netvision.net.il

Thanks
Yaakov
Technical Details
Message-ID: <NEWTNews.16531.822443361.Postmaster@Jerusalem.netvision.net.il>
Path: arc1-ca.pugleaf.net!news.NetVision.net.il!news

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.NetVision.net.il!news
From: iti@Jerusalem.netvision.net.il
Newsgroups: comp.os.ms-windows.programmer.tools.mfc,comp.os.ms-windows.apps.compatibility.win95,comp.lang.c++
Subject: HELP - CString conversion?
Date: Tue, 23 Jan 96 16:26:35 PDT
Organization: NetVision LTD.
Message-ID: <NEWTNews.16531.822443361.Postmaster@Jerusalem.netvision.net.il>
NNTP-Posting-Host: ts2cp10.netvision.net.il
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Newsreader: NEWTNews & Chameleon -- TCP/IP for MS Windows from NetManage