⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 server.cpp

📁 通用网络游戏开发框架
💻 CPP
字号:
// ============================================================================
// WinBattle Server Control Panel
//
// (c) 2003 Ken Reed
//
// This is free software. You can redistribute it and/or modify it under the
// terms of the GNU General Public License version 2 as published by the Free
// Software Foundation.
// ============================================================================

#include "stdafx.h"

#include "global.h"
#include "exception.h"
#include "report_error.h"
#include "resource.h"

#include <commctrl.h>

extern BOOL CALLBACK DlgProc(HWND Dlg, UINT msg, WPARAM wParam, LPARAM lParam);

static void Initialise(HINSTANCE hInstance);


// ============================================================================
// Main
// ============================================================================

int APIENTRY WinMain(HINSTANCE instance, HINSTANCE prevInstance,
                     LPSTR     commands,  int       nCmdShow)
{
   try {
      Initialise(instance);
   }
   catch (Exception & e) {
      report_text(e.get_error().c_str());
   }
   catch (...) {
      report_text("Exception thrown from WinMain");
   }

   return 0;
}


// ============================================================================
// Initialise
//
// Simply display the (modal) dialog that lets us control the game.
// ============================================================================

static void Initialise(HINSTANCE instance)
{
   INITCOMMONCONTROLSEX ccdetails;

   ccdetails.dwSize = sizeof(ccdetails);
   ccdetails.dwICC  = ICC_BAR_CLASSES;

   InitCommonControlsEx(&ccdetails);
   enable_fp_exceptions();

   DialogBox(instance, MAKEINTRESOURCE(IDD_DIALOG1), 0, DlgProc);
}


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -