LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { static DWORD st = 0; static DWORD dt = 0; static DWORD update_dt = 0; static DWORD update_delay = 10; static Point ptMouse; static int save_member; static int counts; static ui user_interface; if (uMsg == WM_CREATE) { Rect rc; ::GetClientRect(hWnd, &rc); backbuffer.Attach(hWnd); // TODO std::fstream file; file.open(_T("save1.data"), std::ios_base::in); user_interface.attach(hWnd); user_interface.Load_interface_map(_T("ui2.bmp")); file >> save_member; for (int i = 0; i < save_member; i++){ character_inform* pchar = new character_inform; int LV; int HP; int ATK; int DEF; int ATR; int SPD; int CLS; file >> LV >> HP >> ATK >> DEF >> ATR >> SPD >> CLS; pchar->set_inform(LV, HP, ATK, DEF, ATR, SPD, CLS); pchar->transition(SEE_STATE); char_man_depot.AddEntry(i, pchar); } file.close(); st = ::GetTickCount(); ::SetTimer(hWnd, 0, 10, NULL); return 0; }