Click here to Skip to main content
15,918,889 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionWhat about (_variant_t)false and _variant_t(false)? Pin
followait30-May-08 18:12
followait30-May-08 18:12 
Question[MFC] Add a CView zone into a CFormView ?? Pin
Schehaider_Aymen30-May-08 12:59
Schehaider_Aymen30-May-08 12:59 
AnswerRe: [MFC] Add a CView zone into a CFormView ?? Pin
Rajkumar R30-May-08 23:15
Rajkumar R30-May-08 23:15 
QuestionHaving trouble retreiving a integer value from the Edit Control Box. Pin
hilop30-May-08 7:32
hilop30-May-08 7:32 
AnswerRe: Having trouble retreiving a integer value from the Edit Control Box. Pin
David Crow30-May-08 7:57
David Crow30-May-08 7:57 
GeneralRe: Having trouble retreiving a integer value from the Edit Control Box. Pin
hilop30-May-08 9:07
hilop30-May-08 9:07 
GeneralRe: Having trouble retreiving a integer value from the Edit Control Box. Pin
Joe Woodbury30-May-08 11:20
professionalJoe Woodbury30-May-08 11:20 
GeneralRe: Having trouble retreiving a integer value from the Edit Control Box. [modified] Pin
Nelek1-Jun-08 5:53
protectorNelek1-Jun-08 5:53 
Joe Woodbury wrote:
only text, thus to get an integer you must get the text and convert it


Not true. If you work with a CEdit* and Get/SetWindowText then is ok what you say. But you can also associate a numeric member variable to the edit in the resource editor and it works as well.

HEADER

//{{AFX_DATA(CMyFormView)
enum { IDD = IDD_MYFORMVIEW};
	double	m_dMyDouble;


CPP
void CMyFormView::DoDataExchange(CDataExchange* pDX)
{	CFormView::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CMyFormView)
	DDX_Text(pDX, IDC_MY_EDIT, m_dMyDouble);
}


With this you will be able to work directly with numbers. And still more, if you make it like that, the edit will give you an error itself when you are introducing letters.


PS. This is under MFC (VC++ 6.0)

Greetings.
--------
M.D.V. Wink | ;)

If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Rating helpfull answers is nice, but saying thanks can be even nicer.

modified on Monday, June 2, 2008 10:37 AM

GeneralRe: Having trouble retreiving a integer value from the Edit Control Box. Pin
Joe Woodbury1-Jun-08 11:40
professionalJoe Woodbury1-Jun-08 11:40 
GeneralRe: Having trouble retreiving a integer value from the Edit Control Box. Pin
Nelek2-Jun-08 4:32
protectorNelek2-Jun-08 4:32 
AnswerRe: Having trouble retreiving a integer value from the Edit Control Box. Pin
Michael Schubert30-May-08 12:49
Michael Schubert30-May-08 12:49 
QuestionRe: Having trouble retreiving a integer value from the Edit Control Box. Pin
Rajesh R Subramanian30-May-08 21:01
professionalRajesh R Subramanian30-May-08 21:01 
AnswerRe: Having trouble retreiving a integer value from the Edit Control Box. Pin
Nelek2-Jun-08 6:22
protectorNelek2-Jun-08 6:22 
AnswerRe: Having trouble retreiving a integer value from the Edit Control Box. Pin
hilop2-Jun-08 7:00
hilop2-Jun-08 7:00 
GeneralRe: Having trouble retreiving a integer value from the Edit Control Box. Pin
Nelek3-Jun-08 21:38
protectorNelek3-Jun-08 21:38 
AnswerRe: Having trouble retreiving a integer value from the Edit Control Box. Pin
ThatsAlok20-Jul-09 1:04
ThatsAlok20-Jul-09 1:04 
QuestionCreating a .docx file programatically? Pin
ritz123430-May-08 5:12
ritz123430-May-08 5:12 
AnswerRe: Creating a .docx file programatically? Pin
Cedric Moonen30-May-08 6:05
Cedric Moonen30-May-08 6:05 
GeneralRe: Creating a .docx file programatically? Pin
led mike30-May-08 6:13
led mike30-May-08 6:13 
AnswerRe: Creating a .docx file programatically? Pin
led mike30-May-08 6:13
led mike30-May-08 6:13 
AnswerRe: Creating a .docx file programatically? Pin
David Crow30-May-08 7:56
David Crow30-May-08 7:56 
QuestionError with CArray, CMap Pin
Trupti Mehta30-May-08 4:44
Trupti Mehta30-May-08 4:44 
QuestionRe: Error with CArray, CMap Pin
David Crow30-May-08 4:59
David Crow30-May-08 4:59 
AnswerRe: Error with CArray, CMap Pin
Jijo.Raj30-May-08 5:52
Jijo.Raj30-May-08 5:52 
GeneralRe: Error with CArray, CMap Pin
Trupti Mehta30-May-08 22:41
Trupti Mehta30-May-08 22:41 

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.