Is there anyway to create a Edit Box that will read a int Variable, to appear empty at run time instead of appearing with a 0 ??
Printable View
Is there anyway to create a Edit Box that will read a int Variable, to appear empty at run time instead of appearing with a 0 ??
Try something like:
I think that will work!Code:SetWindowText ( hdlg, NULL);
Thanks for the help, but I've alredy tried that and it didn't work....
I tried:
and it didn't work.... well, if there's no easy way to do it, can someone just help me to evaluate if a string value is beteween two Integer values.... something like 0< string <100 ????Code:GetDlgItem(IDC_BSIC_B)->SetWindowText(NULL);
Thanks
<i>evaluate if a string value is beteween two Integer values.... </i>
I don't get it. Is the string a number??. Just use GetDlgItemInt() to get the integer on the edit box and compare it.
Works fine for me. Where did you call the function?Quote:
Originally Posted by dhrodrigues
My bad.... I tryed that while doing some other stuff at the same time and ended up calling the function in the wrong place.... Thanks erikj for calling that to my attention. It's working now.
Regarding your question ganonl, yes, the string is a number.... and as I never used GetDlgItemInt , could you supply me some example on how to use GetDlgItemInt .... I belive that it should look likebut I still don't know how to evaluate the variable extracted from the IDC_BSIC_B Edit Box... sorry for my basic questions, but this is the only way to learn the subject and stop making mistakes..Code:GetDlgItemInt(IDC_BSIC_B,NULL,TRUE)
Thanks in advance for your support.
Nevermind ganonl, I manage to figure that out...
Thanks for the Idea ganonl, i belive I'll prefer to use this instead of changing my project to receive ints instead of strings.Code:if ((GetDlgItemInt(IDC_BSIC_A, NULL, FALSE)<=10) || (GetDlgItemInt(IDC_BSIC_A, NULL, FALSE) >= 70))
thanks once again for pointing me the right direction.
Your getdlgitemint only has 3 parameters. The one I use has 4.
Code:UINT GetDlgItemInt(
HWND hDlg, // handle to dialog box
int nIDDlgItem, // control identifier
BOOL* lpTranslated, // points to variable to receive success/failure indicator
BOOL bSigned // specifies whether value is signed or unsigned
);