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

📄 proj.c

📁 allows the user to select files containing objects and draw them using one of the available project
💻 C
字号:
#define STRICT
#include <windows.h>
#include <windowsx.h>

#include "main.h"
#include "resource.h"


#define CLASS_NAME "ProjClass"


/*
 * Initializes the application
 */

BOOL InitApplication(HANDLE hInstance)
{
   WNDCLASS wc;
   
   wc.style = CS_HREDRAW | CS_VREDRAW;
   wc.lpfnWndProc = (WNDPROC) Proj_WndProc;
   wc.cbClsExtra = 0;
   wc.cbWndExtra = 0;
   wc.hInstance = hInstance;
   wc.hIcon = NULL;
   wc.hCursor = LoadCursor(NULL, IDC_ARROW);
   wc.hbrBackground = GetStockObject(WHITE_BRUSH);
   wc.lpszMenuName = MAKEINTRESOURCE (IDR_MAIN_MENU);
   wc.lpszClassName = CLASS_NAME;

   return RegisterClass(&wc);
}


/*
 * Initializes the instance
 */
BOOL InitInstance(HANDLE hInstance, int CmdShow)
{
  HWND hWnd;
  
  hWnd = CreateWindow(CLASS_NAME,
                      "Projetions",
                      WS_OVERLAPPEDWINDOW,
                      CW_USEDEFAULT,
                      CW_USEDEFAULT,
                      CW_USEDEFAULT,
                      CW_USEDEFAULT,
                      NULL,
                      NULL,
                      hInstance,
                      NULL);
  if(!hWnd)
    return FALSE;


  ShowWindow(hWnd, CmdShow);
  UpdateWindow(hWnd);

  return TRUE;

}




/*
 * Main function
 */
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrev, LPSTR CmdLine, int CmdShow)
{
  MSG msg;
  
  if(!InitApplication (hInstance))
    return FALSE;
  
  if(!InitInstance (hInstance, CmdShow))
    return FALSE;

  while(GetMessage (&msg, NULL, 0, 0)) {
    TranslateMessage(&msg);
    DispatchMessage(&msg);
  }
  
  return msg.wParam;
}

⌨️ 快捷键说明

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