When I run this section of code in my program, Windows XP comes up and says "program.exe has encountered a problem and needs to close. We are sorry for the inconvenience". Now, I dont know if this is just XP or if I'm doing something wrong. Here's the code:
NOTE: ProcessCommand() is called everything the program recieves an IDOK message (this is inoked in my program every time the user presses [ENTER]) so TCHAR temp; is delared then destroyed a few times, but i dont know if it has anyting to do with this.Code:void ProcessCommand(HWND hDlg) { TCHAR temp[MAX_PATH]; if(strcmp(command, "about") == 0) { GetDlgItemText(hDlg, IDC_OUTPUT, temp, MAX_PATH); strcat(temp, "sample text\n"); SetDlgItemText(hDlg, IDC_OUTPUT, temp); } }
Thanks
-Chris



LinkBack URL
About LinkBacks



Have a nice day.