Hi, @Wojciech Sobiesiak
I noticed you are using dev c++ 6.3. Will the code work fine in VS2022?
Use hide and show to refresh editbox content
case WM_CREATE:
{HWND textfield = CreateWindow(L"EDIT", L"Editable Text!", WS_CHILD | WS_VISIBLE | WS_VSCROLL |
ES_LEFT | ES_MULTILINE | ES_AUTOVSCROLL|WS_BORDER, 500, 100, 300, 300, hWnd, (HMENU)ID, NULL, NULL); }
break;
case WM_CTLCOLOREDIT:
SetBkMode((HDC)wParam, TRANSPARENT);
return (LRESULT)GetStockObject(NULL_BRUSH);
case WM_COMMAND:
{
if (HIWORD(wParam) == EN_CHANGE)
{
ShowWindow(HWND(lParam), SW_HIDE);
ShowWindow(HWND(lParam), SW_SHOW);
SetFocus(HWND(lParam));
}
Best regards,
Minxin Yu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.