C Source Code
- TEXT_Handle hTxt = WM_GetDialogItem(hWinMain, TEXT_TITLE);
- char s[64];
- GUI_RECT rect;
- printf("\n\n\n");
- TEXT_GetText(hTxt, s, sizeof(s));
- printf("TEXT_GetText(%ld)=%s\n", hTxt, s);
- if (WM_GetInvalidRect(hTxt, &rect) == 0) {
- printf("WM_GetInvalidRect(%ld)=0\n", hTxt);
- } else {
- printf("WM_GetInvalidRect(%ld)=1\n", hTxt);
- }
- TEXT_printf(hTxt, "Registro %d..%d/%d", first_entry + 1, first_entry + num_entries, log_size);
- TEXT_GetText(hTxt, s, sizeof(s));
- printf("TEXT_GetText(%ld)=%s\n", hTxt, s);
- if (WM_GetInvalidRect(hTxt, &rect) == 0) {
- printf("WM_GetInvalidRect(%ld)=0\n", hTxt);
- } else {
- printf("WM_GetInvalidRect(%ld)=1\n", hTxt);
- }
- printf("\n\n\n");
If I call WM_InvalidateWindow() on the widget, the behaviour is correct and I see the new text in the TEXT widget.
It's an oddy behaviour, because it may depend on the first text set during TEXT_CreateEx(). I create the TEXT widget with the following code:
C Source Code
It seems to me it depends of the length of the old and new string: if they are the same, TEXT_SetText() sometimes decides to not invalidate the text area.