mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-07 01:49:47 +00:00
better rendering
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@99 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -17,6 +17,7 @@ static LRESULT CALLBACK wndproc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) {
|
||||
HBITMAP hbmp;
|
||||
HDC dc, hbdc;
|
||||
|
||||
if(u->ll->copy_buffer) {
|
||||
GetClientRect(hWnd, &rc);
|
||||
|
||||
dc = GetDC(hWnd);
|
||||
@@ -34,6 +35,11 @@ static LRESULT CALLBACK wndproc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) {
|
||||
|
||||
DeleteDC(hbdc);
|
||||
DeleteObject(hbmp);
|
||||
} else {
|
||||
u->ll->hDC = BeginPaint(hWnd, &ps);
|
||||
MwLLDispatch(u->ll, draw);
|
||||
EndPaint(hWnd, &ps);
|
||||
}
|
||||
} else if(msg == WM_LBUTTONDOWN) {
|
||||
SetCapture(hWnd);
|
||||
MwLLDispatch(u->ll, down);
|
||||
@@ -82,6 +88,7 @@ MwLL MwLLCreate(MwLL parent, int x, int y, int width, int height) {
|
||||
|
||||
RegisterClassEx(&wc);
|
||||
|
||||
r->copy_buffer = 1;
|
||||
r->hWnd = CreateWindow(parent == NULL ? "milsko" : "STATIC", "Milsko", parent == NULL ? (WS_OVERLAPPEDWINDOW) : (WS_CHILD | WS_VISIBLE), x, y, width, height, parent == NULL ? NULL : parent->hWnd, 0, wc.hInstance, NULL);
|
||||
|
||||
u->ll = r;
|
||||
|
||||
Reference in New Issue
Block a user