Ok, thanks.
It works fine that way I do it, but it is probably not the best way to do it (hide and show the window every time something happens in the editbox)
The best way would to look the brush somehow, then the user cud use the box as normal.
I will try to paint it again in WM_PAINT and try to repaint the pic on EN_SETFOCUS and EN_VSCROLL, that way the user can use the box to copy.
But I have a dumb question, How do I update/repaint the hbitmap?
Code:
case WM_PAINT:{
BITMAP bm;
PAINTSTRUCT ps;
hdc = BeginPaint(hwnd, &ps);
HDC hdcMem = CreateCompatibleDC(hdc);
HBITMAP hbmOld = (HBITMAP)SelectObject(hdcMem, hbMG);
GetObject(hbMG, sizeof(bm), &bm);
BitBlt(hdc, 7, 91, bm.bmWidth, bm.bmHeight, hdcMem, 0, 0, SRCCOPY);
SelectObject(hdcMem, hbmOld);
DeleteDC(hdcMem);
EndPaint(hwnd, &ps);
}
Code:
case IDC_INFOBOX:
if (HIWORD(wParam) == EN_SETFOCUS) {
REPAINT THE IMG HERE?! BUT HOW?
}
if (HIWORD(wParam) == EN_VSCROLL) {
REPAINT THE IMG HERE?! BUT HOW?
}