Click here to Skip to main content
15,907,392 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Working with files Pin
Ryan Binns8-Jul-03 7:23
Ryan Binns8-Jul-03 7:23 
QuestionHow to store a numeric value to *.mdb table from interface Pin
Anonymous8-Jul-03 3:53
Anonymous8-Jul-03 3:53 
AnswerRe: How to store a numeric value to *.mdb table from interface Pin
John M. Drescher8-Jul-03 4:05
John M. Drescher8-Jul-03 4:05 
GeneralAdd dynamic text to a Dialog Body Pin
keegan8-Jul-03 3:21
keegan8-Jul-03 3:21 
GeneralRe: Add dynamic text to a Dialog Body Pin
Cedric Moonen8-Jul-03 3:29
Cedric Moonen8-Jul-03 3:29 
GeneralRe: Add dynamic text to a Dialog Body Pin
keegan8-Jul-03 3:38
keegan8-Jul-03 3:38 
GeneralRe: Add dynamic text to a Dialog Body Pin
Mike Dimmick8-Jul-03 5:38
Mike Dimmick8-Jul-03 5:38 
GeneralRe: Add dynamic text to a Dialog Body Pin
keegan8-Jul-03 5:48
keegan8-Jul-03 5:48 
This is just for my personal knowledge, but ion C++, is tere an easier way to convert a string into an LPCTSTR? Here's how im doing it now, which is quite laborious...


<br />
int ch_num = 0;<br />
string tool_name;<br />
LPCTSTR str_word = "";<br />
channel_gettoolname(ch_num, tool_name);<br />
tool_name += ".";<br />
CString boo;<br />
char bleh[100];<br />
for(int i = 0; i < tool_name.size(); i++)<br />
{<br />
	bleh[i] = tool_name[i];<br />
	boo += bleh[i];<br />
}<br />
str_word = boo;<br />
GetDlgItem(IDC_ch0edittxt)->SetWindowText(str_word);<br />


where channel_gettoolname(ch_num, tool_name); passes a string, 'tool_name' by reference.

i have to covnert my string into an array of Char, convert the array of Char into a CString, then convert the CString into an LPCTSRT. i tried strcpy() but it kept saying i cant convert a string into a char.

*.*
GeneralRe: Add dynamic text to a Dialog Body Pin
Rage8-Jul-03 6:02
professionalRage8-Jul-03 6:02 
GeneralRe: Add dynamic text to a Dialog Body Pin
Mike Dimmick8-Jul-03 6:07
Mike Dimmick8-Jul-03 6:07 
GeneralRe: Add dynamic text to a Dialog Body Pin
keegan8-Jul-03 6:54
keegan8-Jul-03 6:54 
GeneralWindows API Pin
Anonymous8-Jul-03 3:19
Anonymous8-Jul-03 3:19 
GeneralRe: Windows API Pin
AlexO8-Jul-03 3:50
AlexO8-Jul-03 3:50 
GeneralCListCtrl Pin
schonu8-Jul-03 2:52
schonu8-Jul-03 2:52 
GeneralRe: CListCtrl Pin
David Crow8-Jul-03 2:56
David Crow8-Jul-03 2:56 
GeneralRe: CListCtrl Pin
schoni9-Jul-03 5:11
schoni9-Jul-03 5:11 
Generalmfc activeX control Pin
gucy8-Jul-03 1:44
gucy8-Jul-03 1:44 
GeneralRe: mfc activeX control Pin
AlexO8-Jul-03 3:55
AlexO8-Jul-03 3:55 
GeneralRe: mfc activeX control Pin
gucy8-Jul-03 15:21
gucy8-Jul-03 15:21 
GeneralRe: mfc activeX control Pin
gucy8-Jul-03 16:28
gucy8-Jul-03 16:28 
GeneralCEditView MFC app Pin
Jay Hova8-Jul-03 1:38
Jay Hova8-Jul-03 1:38 
GeneralRe: CEditView MFC app Pin
Iain Clarke, Warrior Programmer8-Jul-03 2:03
Iain Clarke, Warrior Programmer8-Jul-03 2:03 
GeneralRe: CEditView MFC app Pin
Jay Hova8-Jul-03 2:45
Jay Hova8-Jul-03 2:45 
GeneralComboBox inside of CDialog Pin
pdunn8-Jul-03 1:37
pdunn8-Jul-03 1:37 
GeneralRe: ComboBox inside of CDialog Pin
Iain Clarke, Warrior Programmer8-Jul-03 1:59
Iain Clarke, Warrior Programmer8-Jul-03 1:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.