资源简介

初学时不知道做些什么 那么就来做些游戏吧 内附有源代码 清楚明了

资源截图

代码片段和文件信息

//-----------------------------------------------------------------
// Skeleton Application
// C++ Source - Skeleton.cpp
//-----------------------------------------------------------------

//-----------------------------------------------------------------
// Include Files
//-----------------------------------------------------------------
#include “Skeleton.h“

//-----------------------------------------------------------------
// Global Function Declarations
//-----------------------------------------------------------------
LRESULT CALLBACK  WndProc(HWND hWindow UINT msg WPARAM wParam LPARAM lParam);

//-----------------------------------------------------------------
// Global Functions
//-----------------------------------------------------------------
int WINAPI WinMain(HINSTANCE hInstance HINSTANCE hPrevInstance
  PSTR szCmdLine int iCmdShow)
{
  static TCHAR  szAppName[] = TEXT(“Skeleton“);
  WNDCLASSEX    wndclass;
  HWND          hWindow;
  MSG           msg;

  // Create the window class for the main window
  wndclass.cbSize         = sizeof(wndclass);
  wndclass.style          = CS_HREDRAW | CS_VREDRAW;
  wndclass.lpfnWndProc    = WndProc;
  wndclass.cbClsExtra     = 0;
  wndclass.cbWndExtra     = 0;
  wndclass.hInstance      = hInstance;
  wndclass.hIcon          = LoadIcon(hInstance
    MAKEINTRESOURCE(IDI_SKELETON));
  wndclass.hIconSm        = LoadIcon(hInstance
    MAKEINTRESOURCE(IDI_SKELETON_SM));
  wndclass.hCursor        = LoadCursor(NULL IDC_ARROW);
  wndclass.hbrBackground  = (HBRUSH)(COLOR_WINDOW + 1);
  wndclass.lpszMenuName   = NULL;
  wndclass.lpszClassName  = szAppName;

  // Register the window class
  if (!RegisterClassEx(&wndclass))
    return 0;

  // Create the window
  hWindow = CreateWindow(szAppName szAppName WS_OVERLAPPEDWINDOW CW_USEDEFAULT
    CW_USEDEFAULT CW_USEDEFAULT CW_USEDEFAULT NULL NULL hInstance NULL);

  // Show and update the window
  ShowWindow(hWindow iCmdShow);
  UpdateWindow(hWindow);

  // Enter the main message loop
  while (GetMessage(&msg NULL 0 0))
  {
    // Process the message
    TranslateMessage(&msg);
    DispatchMessage(&msg);
  }
  return (int)msg.wParam;
}

LRESULT CALLBACK WndProc(HWND hWindow UINT msg WPARAM wParam LPARAM lParam)
{
  HDC         hDC;
  PAINTSTRUCT ps;
  RECT        rect;

  switch (msg) 
  {
    case WM_PAINT:
      // Draw some text centered in the client area of the main window
      hDC = BeginPaint(hWindow &ps);
      GetClientRect(hWindow &rect);
      DrawText(hDC TEXT(“This is a skeleton application!“) -1 &rect
        DT_SINGLELINE | DT_CENTER | DT_VCENTER);
      EndPaint(hWindow &ps);
      return 0;

    case WM_DESTROY:
      // Exit the application
      PostQuitMessage(0);
      return 0;
  }
  return DefWindowProc(hWindow msg wParam lParam);
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        766  1995-07-12 13:08  VisualCPP\AppC\Skeleton\Res\Skeleton.ico

     文件        318  2002-04-24 11:44  VisualCPP\AppC\Skeleton\Res\Skeleton_sm.ico

    ..A.SH.      4608  2007-10-16 15:15  VisualCPP\AppC\Skeleton\Res\Thumbs.db

     文件        457  2002-04-24 10:46  VisualCPP\AppC\Skeleton\Resource.h

     文件       2918  2002-05-28 01:02  VisualCPP\AppC\Skeleton\Skeleton.cpp

     文件       4132  2007-10-16 15:15  VisualCPP\AppC\Skeleton\Skeleton.dsp

     文件        522  2007-10-16 15:15  VisualCPP\AppC\Skeleton\Skeleton.dsw

     文件        410  2002-07-01 11:25  VisualCPP\AppC\Skeleton\Skeleton.h

     文件        629  2004-01-07 19:53  VisualCPP\AppC\Skeleton\Skeleton.rc

     文件     668463  2004-02-15 00:13  VisualCPP\AppD\Background.ai

     文件      19932  2004-02-15 02:43  VisualCPP\AppD\Background.gif

     文件     233154  2004-02-15 03:37  VisualCPP\AppD\GameOver.ai

     文件     927761  2004-02-15 02:38  VisualCPP\AppD\Jumper.ai

     文件     375614  2004-02-15 03:04  VisualCPP\AppD\Splash.ai

     文件       2032  2004-01-07 23:54  VisualCPP\Chap02\Blizzard\Blizzard.cpp

     文件       4264  2007-10-15 17:02  VisualCPP\Chap02\Blizzard\Blizzard.dsp

     文件        522  2007-10-15 17:02  VisualCPP\Chap02\Blizzard\Blizzard.dsw

     文件        618  2004-01-07 23:50  VisualCPP\Chap02\Blizzard\Blizzard.h

     文件        629  2004-01-07 23:47  VisualCPP\Chap02\Blizzard\Blizzard.rc

     文件       5854  2004-02-12 01:13  VisualCPP\Chap02\Blizzard\GameEngine.cpp

     文件       2886  2002-07-01 15:31  VisualCPP\Chap02\Blizzard\GameEngine.h

     文件       2238  2004-01-07 23:43  VisualCPP\Chap02\Blizzard\Res\Blizzard.ico

     文件       1406  2004-01-07 23:45  VisualCPP\Chap02\Blizzard\Res\Blizzard_sm.ico

    ..A.SH.      4608  2007-10-16 14:53  VisualCPP\Chap02\Blizzard\Res\Thumbs.db

     文件        457  2004-01-07 23:49  VisualCPP\Chap02\Blizzard\Resource.h

     文件       3231  2004-01-08 00:34  VisualCPP\Chap03\CropCircles\CropCircles.cpp

     文件       4346  2007-10-15 17:06  VisualCPP\Chap03\CropCircles\CropCircles.dsp

     文件        528  2007-10-15 17:02  VisualCPP\Chap03\CropCircles\CropCircles.dsw

     文件        653  2004-01-06 12:57  VisualCPP\Chap03\CropCircles\CropCircles.h

     文件        642  2004-01-07 19:53  VisualCPP\Chap03\CropCircles\CropCircles.rc

............此处省略640个文件信息

评论

共有 条评论