The follwing codes doesn't work:
Code:
TCHAR must_be_str;
TCHAR entered[MAX}PATH];
strcpy(must_be_str,"b");
GetDlgItemText(hDlg, IDC_ENTER, entered, 5);
itoa(must_be, must_be_two, 10);
if(entered == must_be_str)
{
MessageBox(NULL, "It worked", "yay", MB_OK);
}
else
{
MessageBox(NULL, "Failed", "Damn", MB_OK);
MessageBox(NULL, entered, "Value of 'entered'", MB_OK);
MessageBox(NULL, must_be_str, "Value of 'must_be_str", MB_OK);
}
When this code runs, 'entered' shows up as blank and 'must_be_str' shows up as 0. Whats goin on?
I put this on the Windows Programming board becuase there is obviously a problem with what I did with GetDlgItemText()...
Thanks