Click here to Skip to main content
15,917,859 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Which View subclass to use? Pin
Antony M Kancidrowski15-Sep-04 2:12
Antony M Kancidrowski15-Sep-04 2:12 
AnswerRe: Which View subclass to use? Pin
David Crow15-Sep-04 2:55
David Crow15-Sep-04 2:55 
QuestionHow can I get the element name of a Control in a Dialog? Pin
filo6515-Sep-04 1:32
filo6515-Sep-04 1:32 
QuestionHow can I get the element name of a Control in a Dialog? Pin
filo6515-Sep-04 1:31
filo6515-Sep-04 1:31 
AnswerRe: How can I get the element name of a Control in a Dialog? Pin
Arsalan Malik15-Sep-04 1:42
Arsalan Malik15-Sep-04 1:42 
GeneralRe: How can I get the element name of a Control in a Dialog? Pin
filo6515-Sep-04 1:49
filo6515-Sep-04 1:49 
GeneralRe: How can I get the element name of a Control in a Dialog? Pin
Cedric Moonen15-Sep-04 2:19
Cedric Moonen15-Sep-04 2:19 
GeneralRe: How can I get the element name of a Control in a Dialog? Pin
filo6515-Sep-04 3:20
filo6515-Sep-04 3:20 
I would like to "standardize" a procedure that make easy to display in different dialogs a certain number of values.

I have i.e. two (indipendent) Database tables, one containing first and last name and age (first_name,last_name, age), the other containing i.e company names and adresses (company_name,company_address).

In my App i have two dialog boxes containing each two EditBoxes with CString m_first_name, CString m_last_name, int m_age in the first one , and CString m_company_name and CString m_company_address in the second one.

I could write for every control its assigning value instructions, but what happen if my dialogs have ten's of EBoxes?
With a loop looking like:

CString elemName= "";
for (long i=0; i <mydlg.controlcount(); i++)="" {
="" mydlg.controlname(i)="" -=""> m_first_name
elemName.Format(Mid(myDlg.ControlName(i),2,99)); // first_name
switch (myDlg.ControlType(i)){
case dbText: // write in i.e. m_first_name the value of first_name
myDlg.ControlName(i).SetValueAsString(elemName);
break;
case dbInt: // i.e. Age
myDlg.ControlName(i).SetValueAsInt(elemName);
break;
etc...
}
}

Does it look somehow clear?





Filippo
GeneralRe: How can I get the element name of a Control in a Dialog? Pin
Cedric Moonen15-Sep-04 3:44
Cedric Moonen15-Sep-04 3:44 
GeneralRe: How can I get the element name of a Control in a Dialog? Pin
User 21559715-Sep-04 2:43
User 21559715-Sep-04 2:43 
GeneralRe: How can I get the element name of a Control in a Dialog? Pin
BlackDice15-Sep-04 3:01
BlackDice15-Sep-04 3:01 
GeneralRe: How can I get the element name of a Control in a Dialog? Pin
vcplusplus15-Sep-04 3:39
vcplusplus15-Sep-04 3:39 
GeneralRe: How can I get the element name of a Control in a Dialog? Pin
rotu15-Sep-04 17:16
rotu15-Sep-04 17:16 
GeneralVertical scroll bar in a dynamically created combo box Pin
PrashantJ15-Sep-04 1:25
PrashantJ15-Sep-04 1:25 
GeneralScreen capture + recording, JPEGS's to movies Pin
neil20915-Sep-04 0:41
neil20915-Sep-04 0:41 
GeneralRe: Screen capture + recording, JPEGS's to movies Pin
Alexander M.,16-Sep-04 10:06
Alexander M.,16-Sep-04 10:06 
QuestionZ Order of controls on Dialog? Pin
kriaz15-Sep-04 0:11
kriaz15-Sep-04 0:11 
AnswerRe: Z Order of controls on Dialog? Pin
Arsalan Malik15-Sep-04 0:22
Arsalan Malik15-Sep-04 0:22 
AnswerRe: Z Order of controls on Dialog? Pin
Antony M Kancidrowski15-Sep-04 2:21
Antony M Kancidrowski15-Sep-04 2:21 
GeneralCrystal Reports thru VC++ Pin
SANJAY7615-Sep-04 0:07
SANJAY7615-Sep-04 0:07 
GeneralRe: Crystal Reports thru VC++ Pin
PrashantJ15-Sep-04 2:01
PrashantJ15-Sep-04 2:01 
GeneralRe: Crystal Reports thru VC++ Pin
SANJAY7615-Sep-04 22:47
SANJAY7615-Sep-04 22:47 
GeneralRunning an Exe file in hidden mode Pin
ita_cas14-Sep-04 23:53
ita_cas14-Sep-04 23:53 
GeneralRe: Running an Exe file in hidden mode Pin
Arsalan Malik15-Sep-04 0:25
Arsalan Malik15-Sep-04 0:25 
GeneralRe: Running an Exe file in hidden mode Pin
ita_cas15-Sep-04 0:33
ita_cas15-Sep-04 0:33 

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.