Some runtime error fixes.

This commit is contained in:
Pietro Gagliardi 2015-09-01 07:47:29 -04:00
parent 993cb67ba4
commit c4103afb49
2 changed files with 4 additions and 2 deletions

View File

@ -21,7 +21,8 @@ void uiWindowsControlQueueRelayout(uiWindowsControl *c)
uiWindowsControl *d;
// resizing a control requires us to reocmpute the sizes of everything in the top-level window
c = uiWindowsControl(toplevelOwning(uiControl(c)));
// TODO use conversion
c = (uiWindowsControl *) toplevelOwning(uiControl(c));
if (c == NULL)
return;
// make sure we're only queued once

View File

@ -29,7 +29,8 @@ static LRESULT CALLBACK windowWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARA
WINDOWPOS *wp = (WINDOWPOS *) lParam;
LRESULT lResult;
w = uiWindow((void *) GetWindowLongPtrW(hwnd, GWLP_USERDATA));
// TODO change to our conversion syntax
w = (uiWindow *) GetWindowLongPtrW(hwnd, GWLP_USERDATA);
if (w == NULL) {
if (uMsg == WM_CREATE)
SetWindowLongPtrW(hwnd, GWLP_USERDATA, (LONG_PTR) (cs->lpCreateParams));