Click here to Skip to main content
16,007,111 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionsome trouble about my program to receive mails(help, help me) Pin
tanzhenlong21-Sep-06 23:47
tanzhenlong21-Sep-06 23:47 
Questiondiffernece between winsock and csocket Pin
Muhammad Azeem Azam21-Sep-06 22:56
Muhammad Azeem Azam21-Sep-06 22:56 
AnswerRe: differnece between winsock and csocket Pin
_AnsHUMAN_ 21-Sep-06 23:19
_AnsHUMAN_ 21-Sep-06 23:19 
Questionproblem with CEdit Pin
zizzzz21-Sep-06 22:56
zizzzz21-Sep-06 22:56 
AnswerRe: problem with CEdit Pin
Rinu_Raj21-Sep-06 23:12
Rinu_Raj21-Sep-06 23:12 
GeneralRe: problem with CEdit Pin
toxcct21-Sep-06 23:20
toxcct21-Sep-06 23:20 
GeneralRe: problem with CEdit Pin
Rinu_Raj21-Sep-06 23:30
Rinu_Raj21-Sep-06 23:30 
AnswerRe: problem with CEdit Pin
toxcct21-Sep-06 23:17
toxcct21-Sep-06 23:17 
you can do 3 ways :

(1) common way. you have a variable for each edit, and access it with m_edit.GetWindowText(strContent). you do that for each and then you Create a CString which is a concatenation of all of them... quite hard to do !

(2) brute way. you ensure that ever editBoxes IDs are following each others (like IDC_EDIT1 == 1001, IDC_EDIT2 == 1002, etc...). then, you can make a for loop from IDC_EDIT1 to IDC_EDIT99, read their content and contatenate like in (1).

(3) more Subtle solution. you create a list (std::vector will do) with references to the 99 editboxes. the only matter is that they are puched in the correct order in the list so that you read them good. then you do this :
std::vector<UINT> vec;
vec.push_back(IDC_EDIT1);
vec.push_back(IDC_EDIT2);
//construct the vector to the end, once. OnInitDialog() is a good place for that...
 
CString strAll = _T(""), strItem = _T("");
std::vector<UINT>::iterator iter;
for (iter = vec.begin(); iter != vec.end(); iter++) {
    GetDlgItem(*iter)->GetWindowText(strItem);
    strAll += strItem;
}



TOXCCT >>> GEII power

[VisualCalc 3.0  updated ][Flags Beginner's Guide  new! ]

GeneralRe: problem with CEdit Pin
zizzzz21-Sep-06 23:45
zizzzz21-Sep-06 23:45 
GeneralRe: problem with CEdit Pin
toxcct21-Sep-06 23:58
toxcct21-Sep-06 23:58 
AnswerRe: problem with CEdit Pin
Cedric Moonen21-Sep-06 23:26
Cedric Moonen21-Sep-06 23:26 
JokeRe: problem with CEdit Pin
toxcct21-Sep-06 23:59
toxcct21-Sep-06 23:59 
GeneralRe: problem with CEdit Pin
zizzzz22-Sep-06 0:02
zizzzz22-Sep-06 0:02 
GeneralRe: problem with CEdit Pin
Hamid_RT22-Sep-06 1:25
Hamid_RT22-Sep-06 1:25 
GeneralRe: problem with CEdit Pin
zizzzz22-Sep-06 2:12
zizzzz22-Sep-06 2:12 
Questionerror 404 Pin
AnDev21-Sep-06 22:46
AnDev21-Sep-06 22:46 
AnswerRe: error 404 Pin
toxcct21-Sep-06 22:47
toxcct21-Sep-06 22:47 
QuestionSetting the Cursor Pin
Andy20221-Sep-06 22:18
Andy20221-Sep-06 22:18 
AnswerRe: Setting the Cursor Pin
Rinu_Raj21-Sep-06 22:21
Rinu_Raj21-Sep-06 22:21 
GeneralRe: Setting the Cursor Pin
Andy20222-Sep-06 0:37
Andy20222-Sep-06 0:37 
AnswerRe: Setting the Cursor Pin
prasad_som22-Sep-06 1:04
prasad_som22-Sep-06 1:04 
GeneralRe: Setting the Cursor [modified] Pin
krmed22-Sep-06 2:09
krmed22-Sep-06 2:09 
GeneralRe: Setting the Cursor Pin
prasad_som22-Sep-06 2:20
prasad_som22-Sep-06 2:20 
AnswerRe: Setting the Cursor Pin
_AnsHUMAN_ 21-Sep-06 22:26
_AnsHUMAN_ 21-Sep-06 22:26 
AnswerRe: Setting the Cursor Pin
Hamid_RT28-Sep-06 10:04
Hamid_RT28-Sep-06 10:04 

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.