{
LoadString(Globals.hInstance, STRING_UNTITLED, szCaption, SIZEOF(szCaption));
}
-
+
StringCchCat(szCaption, SIZEOF(szCaption), _T(" - "));
StringCchCat(szCaption, SIZEOF(szCaption), szNotepad);
SetWindowText(Globals.hMainWnd, szCaption);
DWORD dwStyle;
int iSize;
LPTSTR pTemp = NULL;
+ BOOL bModified = FALSE;
iSize = 0;
// Recover the text into the control.
GetWindowText(Globals.hEdit, pTemp, iSize + 1);
+
+ if (SendMessage(Globals.hEdit, EM_GETMODIFY, 0, 0))
+ bModified = TRUE;
}
// Restore original window procedure
{
SetWindowText(Globals.hEdit, pTemp);
HeapFree(GetProcessHeap(), 0, pTemp);
+
+ if (bModified)
+ SendMessage(Globals.hEdit, EM_SETMODIFY, TRUE, 0);
}
// Sub-class a new window callback for row/column detection.