x = pane->positions[col] + cx;
- for(; col<COLUMNS; ) {
+ for(; col<COLUMNS-1; ) {
pane->positions[++col] = x;
x += pane->widths[col];
}
}
-static void show_frame(HWND hwndParent, int cmdshow, LPCTSTR path)
+static BOOL show_frame(HWND hwndParent, int cmdshow, LPCTSTR path)
{
static const TCHAR sMDICLIENT[] = {'M','D','I','C','L','I','E','N','T','\0'};
CLIENTCREATESTRUCT ccs;
if (Globals.hMainWnd)
- return;
+ return TRUE;
opts = load_registry_settings();
hMenuFrame = LoadMenu(Globals.hInstance, MAKEINTRESOURCE(IDM_WINEFILE));
child->pos.rcNormalPosition.right = 320;
child->pos.rcNormalPosition.bottom = 280;
- if (!create_child_window(child))
+ if (!create_child_window(child)) {
HeapFree(GetProcessHeap(), 0, child);
+ return FALSE;
+ }
SetWindowPlacement(child->hwnd, &child->pos);
UpdateWindow(Globals.hMainWnd);
- if (path && path[0])
+ if (child->hwnd && path && path[0])
{
int index,count;
TCHAR drv[_MAX_DRIVE+1], dir[_MAX_DIR], name[_MAX_FNAME], ext[_MAX_EXT];
}
}
}
+ return TRUE;
}
static void ExitInstance(void)
InitInstance(hinstance);
- show_frame(0, cmdshow, path);
+ if( !show_frame(0, cmdshow, path) )
+ {
+ ExitInstance();
+ return 1;
+ }
while(GetMessage(&msg, 0, 0, 0)) {
if (Globals.hmdiclient && TranslateMDISysAccel(Globals.hmdiclient, &msg))