mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-10 19:33:28 +00:00
fix some broken stuff
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@232 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -46,6 +46,7 @@ static LRESULT CALLBACK wndproc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) {
|
||||
p.y = HIWORD(lp);
|
||||
|
||||
SetCapture(hWnd);
|
||||
SetFocus(hWnd);
|
||||
MwLLDispatch(u->ll, down, &p);
|
||||
} else if(msg == WM_LBUTTONUP) {
|
||||
MwPoint p;
|
||||
@@ -71,6 +72,10 @@ static LRESULT CALLBACK wndproc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) {
|
||||
PostQuitMessage(0);
|
||||
} else if(msg == WM_CLOSE) {
|
||||
DestroyWindow(hWnd);
|
||||
} else if(msg == WM_CHAR) {
|
||||
int n = wp;
|
||||
|
||||
MwLLDispatch(u->ll, key, &n);
|
||||
} else {
|
||||
return (u->old == NULL) ? DefWindowProc(hWnd, msg, wp, lp) : CallWindowProc(u->old, hWnd, msg, wp, lp);
|
||||
}
|
||||
@@ -389,3 +394,8 @@ void MwLLDetach(MwLL handle, MwPoint* point) {
|
||||
|
||||
SetWindowLongPtr(handle->hWnd, GWL_STYLE, style);
|
||||
}
|
||||
|
||||
void MwLLShow(MwLL handle, int show) {
|
||||
ShowWindow(handle->hWnd, show ? SW_NORMAL : SW_HIDE);
|
||||
if(show) SetFocus(handle->hWnd);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user