Re[2]: Slicerу [Wirkwood] !
От: Slicer [Wirkwood] Россия https://ru.linkedin.com/in/maksim-gumerov-039a701b
Дата: 22.03.03 14:25
Оценка:
void CreateRectangles(int kletki,HWND hWnd) 
{ 
HDC hdc; 
RECT r;
int width=0;
int height=0;
GetWindowRect(hWnd,&r);
hdc=GetDC(hWnd);

HBRUSH hbr=(HBRUSH)GetStockObject(WHITE_BRUSH);
OffsetRect(&r,-r.left,-r.top);
FillRect(hdc,&r,hbr);
DeleteObject((HGDIOBJ)hbr);

GetWindowRect(hWnd,&r);
for (int i=0;i<kletki-1;i++) {   
width+=(r.right-r.left) / (kletki);
height+=(r.bottom-r.top) / (kletki);
MoveToEx(hdc,width,0,(LPPOINT) NULL); 
LineTo(hdc,width,r.bottom-r.top-2);
MoveToEx(hdc,0,height,(LPPOINT) NULL); 
LineTo(hdc,r.right-r.left-2,height);
}

DeleteDC(hdc); 
ReleaseDC(hWnd,hdc);
}


Slicer
Специалист — это варвар, невежество которого не всесторонне :)
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.