hello im causing my program to output strange results when i use SetDlgItemText() GetDlgItemText() and equating char strings together... here is my code:
CODE
HWND hwnd
LPCTSTR StrBmpFileName = "SavedImage";
char temp[128];
SetDlgItemText(hwnd, IDC_SAVEFILE, StrBmpFileName);
GetDlgItemText(hwnd, IDC_SAVEFILE, temp, 128);
StrBmpFileName = temp; // <--------------arrow1
MessageBox(hwnd, StrBmpFileName, "Output", MB_OK);
When executing my code, the first messagebox properly displays text: SavedImage. But if it runs through again, the messagebox outputs something strange like: Ô,e . What i think happens is the StrBmpFileName is being converted into some other datatype at the arrow1 pointed out in code. Then when the SetDlgItemText is run for a second time, its unable to set the IDC_SAVEFILE correctly. How would I fix this problem? thanks in advance