lundi 3 mars 2014

painting over an existing window


Vote count:

0




I am attempting to paint over an existing window. Ultimately I would like to draw a border around the window. But for now I am simply attempting to paint over a window. This is what I am doing



static PAINTSTRUCT ps;
static HDC hDC;

RECT rect;
rect.left = 0;
rect.right = 100;
rect.top = 0;
rect.bottom = 100;

HBRUSH hBrush = CreateSolidBrush(RGB(50,100,255));
HWND hWnd = FindWindow("Notepad++", 0);
hDC = BeginPaint(hWnd, &ps);

FillRect(hDC, &rect, hBrush);

EndPaint(hWnd, &ps);


Unfortunately this does nothing to the notepad window. Am i missing something here ? Any suggestions ?



asked 2 mins ago

Rajeshwar

1,016





Aucun commentaire:

Enregistrer un commentaire