@@ -42,11 +42,11 @@ { //it appears this is actually EnumAncestorWindows, and not EnumDirectChildWindows //so make sure child.parent == use HWND parent = (HWND)lparam; if(GetParent(child) != parent) return 1; - + RECT rc; GetClientRect(parent, &rc); SetWindowPos(child, NULL, 0, 0, rc.right, rc.bottom, SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOZORDER); return 1; @@ -65,21 +65,21 @@ { self = [super init]; SetWindowLong(widget, GWL_EXSTYLE, WS_EX_OVERLAPPEDWINDOW); //"event connections" are handled in MessageReceived - + [self retain]; return self; } //---------------------------------------------------------------------------------------------------------------------------------- - (OFString*)title { int tlen = GetWindowTextLength(widget); char *buff = (char *)malloc(tlen + 1); GetWindowText(widget, buff, tlen+1); - + OFString *ret = [OFString stringWithUTF8String : buff]; free(buff); return ret; } //---------------------------------------------------------------------------------------------------------------------------------- @@ -136,11 +136,11 @@ } //---------------------------------------------------------------------------------------------------------------------------------- - (int)MessageReceived : (HWND)hwnd : (UINT)msg : (WPARAM)wparam : (LPARAM)lparam { HWND ctrlHwnd; - + switch(msg) { case WM_COMMAND: //NOTE: TODO: IMPLEMENT: this may need revised later for Menus and Accelerators ctrlHwnd = (HWND)lparam; @@ -148,22 +148,22 @@ if(chd == NULL) return DefWindowProc(hwnd, msg, wparam, lparam); if(chd->funct == NULL) return DefWindowProc(hwnd, msg, wparam, lparam); chd->funct(chd->object, wparam); return 0; break; - + case WM_CLOSE: if([self OG_willClose] == YES) og_destroy(hwnd, self); return 0; break; - + case WM_SIZE: //act like GTK; expand our child(ren) to fit EnumChildWindows(widget, Resize_EnumChildren, (LPARAM)widget); break; - + case WM_SIZING: //act like GTK; expand our child(ren) to fit EnumChildWindows(widget, Resize_EnumChildren, (LPARAM)widget); break; }