int GameLoop::InitInstance() { int code = App::InitInstance(); InitCommonControls(); //img_pacman = ImageList_LoadBitmap(App::GetInstance(), MAKEINTRESOURCE(IDB_BITMAP1),32, 0, RGB(255, 0, 255)); XString title; title.LoadFromResource(IDS_APP_TITLE); XString wclass; wclass.LoadFromResource(IDC_OOPACMAN); RECT rect = game->get_map()->get_rect(); DWORD style = WS_OVERLAPPEDWINDOW & ~WS_THICKFRAME; AdjustWindowRect(&rect, style, FALSE); if (!window.CreateWnd(title, style, CW_USEDEFAULT, 0, rect.right-rect.left, rect.bottom-rect.top, NULL, LPCTSTR(NULL)) ) return 1; SetMainWindow(&window); window.ShowWindow(_cmdShow); window.UpdateWindow(); return code; }