隨想錄(最簡單的windows圖形程式設計之Easyx)
【 宣告:版權所有,歡迎轉載,請勿用於商業用途。 聯絡信箱:feixiaoxing @163.com】
對於很多使用過Turbo C的同學來說,以前使用編譯器進行圖形程式設計是一件非常容易的事情。但是在win32之後,使用windows提供的SDK進行影象方面的程式設計就顯得很麻煩,於是就有人想,是不是可以用win32 SDK仿照過去的graphics API的方法,讓過去程式設計的方法也可以繼續發揮作用。Easyx就是做了這麼一件事情。
Easyx的官方網站在這裡。其實它的原理也不復雜,如果你除錯的時候,開啟threads option就會發現,其實easyx就是利用win32 SDK封裝一層graphics的API,整個應用其實是雙執行緒的。當然,它的安裝也非常簡單,是我比較喜歡的那種。基本上你下載了壓縮包解壓之後,將標頭檔案或者lib檔案拷貝到對應的位置就可以了。
為了說明怎麼使用,我這邊就寫了幾個最簡單的demo,方便大家快速入門。
1)demo程式
#include <graphics.h>
#include <conio.h>
int
main(int argc, char* argv[]){
initgraph(600, 800);
getch();
closegraph();
return 0;
}
2)畫直線
#include <graphics.h> #include <conio.h> int main(int argc, char* argv[]){ initgraph(600, 800); line(100,100, 300, 300); getch(); closegraph(); return 0; }
3)畫圓
#include <graphics.h>
#include <conio.h>
int
main(int argc, char* argv[]){
initgraph(600, 800);
circle(100, 100, 50);
getch();
closegraph();
return 0;
}
4)畫矩形
#include <graphics.h> #include <conio.h> int main(int argc, char* argv[]){ initgraph(600, 800); rectangle(10, 10, 200,200); getch(); closegraph(); return 0; }
5)畫橢圓
#include <graphics.h>
#include <conio.h>
int
main(int argc, char* argv[]){
initgraph(600, 800);
ellipse(100, 100, 300,200);
getch();
closegraph();
return 0;
}
6) 更詳細的api,直接檢視easyx.h
/******************************************************
* EasyX Library for C++ (Ver:20151015(beta))
* http://www.easyx.cn
*
* EasyX.h
* 在 VC 下實現簡單的繪圖
******************************************************/
#pragma once
#ifndef WINVER
#define WINVER 0x0400 // Specifies that the minimum required platform is Windows 95 and Windows NT 4.0.
#endif
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0500 // Specifies that the minimum required platform is Windows 2000.
#endif
#ifndef _WIN32_WINDOWS
#define _WIN32_WINDOWS 0x0410 // Specifies that the minimum required platform is Windows 98.
#endif
#if defined(UNICODE) && (_MSC_VER > 1200)
#pragma comment(lib,"easyxw.lib")
#elif !defined(UNICODE) && (_MSC_VER > 1200)
#pragma comment(lib,"easyx.lib")
#elif defined(UNICODE)
#pragma comment(lib,"easyxw6.lib")
#elif !defined(UNICODE)
#pragma comment(lib,"easyx6.lib")
#endif
#ifndef __cplusplus
#error EasyX is only for C++
#endif
#include <windows.h>
#include <tchar.h>
// 繪圖視窗初始化引數
#define SHOWCONSOLE 1 // 建立圖形視窗時,保留控制檯的顯示
#define NOCLOSE 2 // 沒有關閉功能
#define NOMINIMIZE 4 // 沒有最小化功能
// 顏色
#define BLACK 0
#define BLUE 0xAA0000
#define GREEN 0x00AA00
#define CYAN 0xAAAA00
#define RED 0x0000AA
#define MAGENTA 0xAA00AA
#define BROWN 0x0055AA
#define LIGHTGRAY 0xAAAAAA
#define DARKGRAY 0x555555
#define LIGHTBLUE 0xFF5555
#define LIGHTGREEN 0x55FF55
#define LIGHTCYAN 0xFFFF55
#define LIGHTRED 0x5555FF
#define LIGHTMAGENTA 0xFF55FF
#define YELLOW 0x55FFFF
#define WHITE 0xFFFFFF
// 定義顏色轉換巨集
#define BGR(color) ( (((color) & 0xFF) << 16) | ((color) & 0xFF00FF00) | (((color) & 0xFF0000) >> 16) )
class IMAGE;
// 定義線的樣式
class LINESTYLE
{
public:
LINESTYLE();
LINESTYLE(const LINESTYLE &style);
LINESTYLE& operator = (const LINESTYLE &style); // 賦值運算子過載函式
virtual ~LINESTYLE();
DWORD style;
DWORD thickness;
DWORD *puserstyle;
DWORD userstylecount;
};
class FILLSTYLE
{
public:
FILLSTYLE();
FILLSTYLE(const FILLSTYLE &style);
FILLSTYLE& operator = (const FILLSTYLE &style); // 賦值運算子過載函式
virtual ~FILLSTYLE();
int style; // 填充形式
long hatch; // 填充圖案樣式
IMAGE* ppattern; // 填充影象
};
// 定義影象物件
class IMAGE
{
public:
int getwidth() const; // 獲取物件的寬度
int getheight() const; // 獲取物件的高度
private:
int width, height; // 物件的寬高
HBITMAP m_hBmp;
HDC m_hMemDC;
int m_MemCurX; // 當前點X座標
int m_MemCurY; // 當前點Y座標
float m_data[6];
COLORREF m_LineColor; // 當前線條顏色
COLORREF m_FillColor; // 當前填充顏色
COLORREF m_TextColor; // 當前文字顏色
COLORREF m_BkColor; // 當前背景顏色
DWORD* m_pBuffer; // 繪圖區的記憶體
LINESTYLE m_LineStyle; // 畫線樣式
FILLSTYLE m_FillStyle; // 填充樣式
virtual void SetDefault(); // 設定為預設狀態
public:
IMAGE(int _width = 0, int _height = 0); // 建立影象
IMAGE(const IMAGE &img); // 拷貝建構函式
IMAGE& operator = (const IMAGE &img); // 賦值運算子過載函式
virtual ~IMAGE();
virtual void Resize(int _width, int _height); // 調整尺寸
};
// 繪圖模式相關函式
HWND initgraph(int width, int height, int flag = NULL); // 初始化圖形環境
void closegraph(); // 關閉圖形環境
// 繪圖環境設定
void cleardevice(); // 清屏
void setcliprgn(HRGN hrgn); // 設定當前繪圖裝置的裁剪區
void clearcliprgn(); // 清除裁剪區的螢幕內容
void getlinestyle(LINESTYLE* pstyle); // 獲取當前畫線樣式
void setlinestyle(const LINESTYLE* pstyle); // 設定當前畫線樣式
void setlinestyle(int style, int thickness = 1, const DWORD *puserstyle = NULL, DWORD userstylecount = 0); // 設定當前畫線樣式
void getfillstyle(FILLSTYLE* pstyle); // 獲取當前填充樣式
void setfillstyle(const FILLSTYLE* pstyle); // 設定當前填充樣式
void setfillstyle(int style, long hatch = NULL, IMAGE* ppattern = NULL); // 設定當前填充樣式
void setfillstyle(BYTE* ppattern8x8); // 設定當前填充樣式
void setorigin(int x, int y); // 設定座標原點
void getaspectratio(float *pxasp, float *pyasp); // 獲取當前縮放因子
void setaspectratio(float xasp, float yasp); // 設定當前縮放因子
int getrop2(); // 獲取前景的二元光柵操作模式
void setrop2(int mode); // 設定前景的二元光柵操作模式
int getpolyfillmode(); // 獲取多邊形填充模式
void setpolyfillmode(int mode); // 設定多邊形填充模式
void graphdefaults(); // 重置所有繪圖設定為預設值
COLORREF getlinecolor(); // 獲取當前線條顏色
void setlinecolor(COLORREF color); // 設定當前線條顏色
COLORREF gettextcolor(); // 獲取當前文字顏色
void settextcolor(COLORREF color); // 設定當前文字顏色
COLORREF getfillcolor(); // 獲取當前填充顏色
void setfillcolor(COLORREF color); // 設定當前填充顏色
COLORREF getbkcolor(); // 獲取當前繪圖背景色
void setbkcolor(COLORREF color); // 設定當前繪圖背景色
int getbkmode(); // 獲取背景混合模式
void setbkmode(int mode); // 設定背景混合模式
// 顏色模型轉換函式
COLORREF RGBtoGRAY(COLORREF rgb);
void RGBtoHSL(COLORREF rgb, float *H, float *S, float *L);
void RGBtoHSV(COLORREF rgb, float *H, float *S, float *V);
COLORREF HSLtoRGB(float H, float S, float L);
COLORREF HSVtoRGB(float H, float S, float V);
// 繪圖函式
COLORREF getpixel(int x, int y); // 獲取點的顏色
void putpixel(int x, int y, COLORREF color); // 畫點
void moveto(int x, int y); // 移動當前點(絕對座標)
void moverel(int dx, int dy); // 移動當前點(相對座標)
void line(int x1, int y1, int x2, int y2); // 畫線
void linerel(int dx, int dy); // 畫線(至相對座標)
void lineto(int x, int y); // 畫線(至絕對座標)
void rectangle (int left, int top, int right, int bottom); // 畫矩形
void fillrectangle (int left, int top, int right, int bottom); // 畫填充矩形(有邊框)
void solidrectangle(int left, int top, int right, int bottom); // 畫填充矩形(無邊框)
void clearrectangle(int left, int top, int right, int bottom); // 清空矩形區域
void circle (int x, int y, int radius); // 畫圓
void fillcircle (int x, int y, int radius); // 畫填充圓(有邊框)
void solidcircle(int x, int y, int radius); // 畫填充圓(無邊框)
void clearcircle(int x, int y, int radius); // 清空圓形區域
void ellipse (int left, int top, int right, int bottom); // 畫橢圓
void fillellipse (int left, int top, int right, int bottom); // 畫填充橢圓(有邊框)
void solidellipse(int left, int top, int right, int bottom); // 畫填充橢圓(無邊框)
void clearellipse(int left, int top, int right, int bottom); // 清空橢圓形區域
void roundrect (int left, int top, int right, int bottom, int ellipsewidth, int ellipseheight); // 畫圓角矩形
void fillroundrect (int left, int top, int right, int bottom, int ellipsewidth, int ellipseheight); // 畫填充圓角矩形(有邊框)
void solidroundrect(int left, int top, int right, int bottom, int ellipsewidth, int ellipseheight); // 畫填充圓角矩形(無邊框)
void clearroundrect(int left, int top, int right, int bottom, int ellipsewidth, int ellipseheight); // 清空圓角矩形區域
void arc (int left, int top, int right, int bottom, double stangle, double endangle); // 畫橢圓弧(起始角度和終止角度為弧度制)
void pie (int left, int top, int right, int bottom, double stangle, double endangle); // 畫橢圓扇形(起始角度和終止角度為弧度制)
void fillpie (int left, int top, int right, int bottom, double stangle, double endangle); // 畫填充橢圓扇形(有邊框)
void solidpie(int left, int top, int right, int bottom, double stangle, double endangle); // 畫填充橢圓扇形(無邊框)
void clearpie(int left, int top, int right, int bottom, double stangle, double endangle); // 清空橢圓扇形區域
void polyline (const POINT *points, int num); // 畫多條連續的線
void polygon (const POINT *points, int num); // 畫多邊形
void fillpolygon (const POINT *points, int num); // 畫填充的多邊形(有邊框)
void solidpolygon(const POINT *points, int num); // 畫填充的多邊形(無邊框)
void clearpolygon(const POINT *points, int num); // 清空多邊形區域
void floodfill(int x, int y, int border); // 填充區域
// 文字相關函式
void outtext(LPCTSTR str); // 在當前位置輸出字串
void outtext(TCHAR c); // 在當前位置輸出字元
void outtextxy(int x, int y, LPCTSTR str); // 在指定位置輸出字串
void outtextxy(int x, int y, TCHAR c); // 在指定位置輸出字元
int textwidth(LPCTSTR str); // 獲取字串佔用的畫素寬
int textwidth(TCHAR c); // 獲取字元佔用的畫素寬
int textheight(LPCTSTR str); // 獲取字串佔用的畫素高
int textheight(TCHAR c); // 獲取字元佔用的畫素高
int drawtext(LPCTSTR str, RECT* pRect, UINT uFormat); // 在指定區域內以指定格式輸出字串
int drawtext(TCHAR c, RECT* pRect, UINT uFormat); // 在指定區域內以指定格式輸出字元
// 設定當前字型樣式(詳見幫助)
// nHeight: 字元的平均高度;
// nWidth: 字元的平均寬度(0 表示自適應);
// lpszFace: 字型名稱;
// nEscapement: 字串的書寫角度(單位 0.1 度);
// nOrientation: 每個字元的書寫角度(單位 0.1 度);
// nWeight: 字元的筆畫粗細(0 表示預設粗細);
// bItalic: 是否斜體;
// bUnderline: 是否下劃線;
// bStrikeOut: 是否刪除線;
// fbCharSet: 指定字符集;
// fbOutPrecision: 指定文字的輸出精度;
// fbClipPrecision: 指定文字的剪輯精度;
// fbQuality: 指定文字的輸出質量;
// fbPitchAndFamily: 指定以常規方式描述字型的字體系列。
void settextstyle(int nHeight, int nWidth, LPCTSTR lpszFace);
void settextstyle(int nHeight, int nWidth, LPCTSTR lpszFace, int nEscapement, int nOrientation, int nWeight, bool bItalic, bool bUnderline, bool bStrikeOut);
void settextstyle(int nHeight, int nWidth, LPCTSTR lpszFace, int nEscapement, int nOrientation, int nWeight, bool bItalic, bool bUnderline, bool bStrikeOut, BYTE fbCharSet, BYTE fbOutPrecision, BYTE fbClipPrecision, BYTE fbQuality, BYTE fbPitchAndFamily);
void settextstyle(const LOGFONT *font); // 設定當前字型樣式
void gettextstyle(LOGFONT *font); // 獲取當前字型樣式
// 影象處理函式
void loadimage(IMAGE *pDstImg, LPCTSTR pImgFile, int nWidth = 0, int nHeight = 0, bool bResize = false); // 從圖片檔案獲取影象(bmp/jpg/gif/emf/wmf)
void loadimage(IMAGE *pDstImg, LPCTSTR pResType, LPCTSTR pResName, int nWidth = 0, int nHeight = 0, bool bResize = false); // 從資原始檔獲取影象(bmp/jpg/gif/emf/wmf)
void saveimage(LPCTSTR pImgFile, IMAGE* pImg = NULL); // 儲存影象
void getimage(IMAGE *pDstImg, int srcX, int srcY, int srcWidth, int srcHeight); // 從當前繪圖裝置獲取影象
void putimage(int dstX, int dstY, const IMAGE *pSrcImg, DWORD dwRop = SRCCOPY); // 繪製圖像到螢幕
void putimage(int dstX, int dstY, int dstWidth, int dstHeight, const IMAGE *pSrcImg, int srcX, int srcY, DWORD dwRop = SRCCOPY); // 繪製圖像到螢幕(指定寬高)
void rotateimage(IMAGE *dstimg, IMAGE *srcimg, double radian, COLORREF bkcolor = BLACK, bool autosize = false, bool highquality = true);// 旋轉影象
void Resize(IMAGE* pImg, int width, int height); // 調整繪圖裝置的大小
DWORD* GetImageBuffer(IMAGE* pImg = NULL); // 獲取繪圖裝置的視訊記憶體指標
IMAGE* GetWorkingImage(); // 獲取當前繪圖裝置
void SetWorkingImage(IMAGE* pImg = NULL); // 設定當前繪圖裝置
HDC GetImageHDC(IMAGE* pImg = NULL); // 獲取繪圖裝置控制代碼(HDC)
// 其它函式
int getwidth(); // 獲取繪圖區寬度
int getheight(); // 獲取繪圖區高度
int getx(); // 獲取當前 x 座標
int gety(); // 獲取當前 y 座標
void BeginBatchDraw(); // 開始批量繪製
void FlushBatchDraw(); // 執行未完成的繪製任務
void FlushBatchDraw(int left, int top, int right, int bottom); // 執行指定區域內未完成的繪製任務
void EndBatchDraw(); // 結束批量繪製,並執行未完成的繪製任務
void EndBatchDraw(int left, int top, int right, int bottom); // 結束批量繪製,並執行指定區域內未完成的繪製任務
HWND GetHWnd(); // 獲取繪圖視窗控制代碼(HWND)
TCHAR* GetEasyXVer(); // 獲取 EasyX 當前版本
// 獲取使用者輸入
bool InputBox(LPTSTR pString, int nMaxCount, LPCTSTR pPrompt = NULL, LPCTSTR pTitle = NULL, LPCTSTR pDefault = NULL, int width = 0, int height = 0, bool bOnlyOK = true);
// 滑鼠訊息
// 支援如下訊息:
// WM_MOUSEMOVE 滑鼠移動
// WM_MOUSEWHEEL 滑鼠滾輪撥動
// WM_LBUTTONDOWN 左鍵按下
// WM_LBUTTONUP 左鍵彈起
// WM_LBUTTONDBLCLK 左鍵雙擊
// WM_MBUTTONDOWN 中鍵按下
// WM_MBUTTONUP 中鍵彈起
// WM_MBUTTONDBLCLK 中鍵雙擊
// WM_RBUTTONDOWN 右鍵按下
// WM_RBUTTONUP 右鍵彈起
// WM_RBUTTONDBLCLK 右鍵雙擊
struct MOUSEMSG
{
UINT uMsg; // 當前滑鼠訊息
bool mkCtrl; // Ctrl 鍵是否按下
bool mkShift; // Shift 鍵是否按下
bool mkLButton; // 滑鼠左鍵是否按下
bool mkMButton; // 滑鼠中鍵是否按下
bool mkRButton; // 滑鼠右鍵是否按下
short x; // 當前滑鼠 x 座標
short y; // 當前滑鼠 y 座標
short wheel; // 滑鼠滾輪滾動值 (120 的倍數)
};
bool MouseHit(); // 檢查是否存在滑鼠訊息
MOUSEMSG GetMouseMsg(); // 獲取一個滑鼠訊息。如果沒有,就等待
void FlushMouseMsgBuffer(); // 清空滑鼠訊息緩衝區
再次感謝easyx的作者,提供了這麼好的一個lib,方便了大家進行影象影象的程式設計。:-)
補充:
後面還看到了ege庫,也不錯,網址在這。
複雜一點的應用,可以選擇使用duilib,用的也很多。
相關推薦
隨想錄(最簡單的windows圖形程式設計之Easyx)
【 宣告:版權所有,歡迎轉載,請勿用於商業用途。 聯絡信箱:feixiaoxing @163.com】 對於很多使用過Turbo C的同學來說,以前使用編譯器進行圖形程式設計是一件非常容易的事情。但是在win32之後,使用windows提供的SDK進行影象方面的程式
ajax 非同步請求和同步請求的區別?(最簡單的例子讓你明白)
注意:Jquery中的ajax在預設不寫async情況下,請求為非同步請求;即:async:true;一、最簡單的例子如下:當需要返回return false,且內部許可權不足時,需要初始化引數並驗證,從而判斷是否返回false。1、同步請求:當ajax執行完畢之後可給str
驗證碼識別(最簡單之印刷體數字)
轉化 end double show ray app def 藍色 代碼實現 # -*- coding: utf-8 -*- import numpy from PIL import Image image = Image.open("5.gif") heigh
C#版 Socket程式設計(最簡單的Socket通訊功能)
示例程式是同步套接字程式,功能很簡單,只是客戶端發給伺服器一條資訊,伺服器向客戶端返回一條資訊;這裡只是一個簡單的示例,是一個最基本的socket程式設計流程,在接下來的文章中,會依次記錄套接字的同步和非同步,以及它們的區別。 下面是示例程式的簡單步驟說明 伺服器端:
第四章 最簡單的C程式設計—順序程式設計 (答案)
putchar 函式是字元輸出函式,其功能是在顯示器上輸出單個字元。 其一般形式為: putchar(字元變數) 例如: putchar('A'); (輸出大寫字母A) putchar(x); (輸出字元變數x的值) putchar(‘\101’
windows介面程式設計之自繪窗體(模仿騰訊qq)
1.建立win32專案2.在專案屬性 中設定為使用MFC動態連結庫3.建立CMyApp類,該類從CWinApp派生4.建立CMainWnd類,可以直接從CFrameWnd類派生,也可以自己註冊一個CWnd類,從CWnd類中派生5.WM_NCPAIN處理非客戶區繪製6.處理WM
windows圖形程式設計 學習雜談 之 高效率視窗背景
剛開始學習windows下的圖形程式設計,只會用API建立視窗和最簡單的訊息函式。 總想給視窗畫個背景圖片,那麼就開始吧。程式設計只看不動手是不會提高的。 開始從網上找資料,主要看的是GDI+_SDK參考手冊。看了畫圖片的部分,很簡單的嘛。 做了個最簡單的OnPaint函式
eclipse下的tomcat配置https(最簡單得配置https)
如果 希望 alias lib connector connect eclipse cnblogs itl 近期公司列出一大堆的東西,其中包括https,啥也不想說,你們是無法理解的苦逼的我的 關於https這些通道可以去百度Google其原理,不廢話,自動生成秘鑰,需要使
AD 腳本kixtart運用之三(添加windows共享打印機)
windows kixtart 腳本ad 打印機在http://windyma.blog.51cto.com/661702/1967027文章,已做好用戶腳本基礎上 在腳本文件kixtart.kix裏添加如下內容:---------------------------------------IF INGROU
【轉】使用git將項目上傳到github(最簡單方法)
名稱 posit gitignore nor this strong 共享 window mas 原文地址:http://www.cnblogs.com/cxk1995/p/5800196.html 首先你需要一個github賬號,所有還沒有的話先去註冊吧! https:/
source insight4.0破解(最簡單版)
經驗 com 4.0 nbsp 文件 文件替換 https 忘記 選擇 破解步驟很簡單:1、安裝好source insight4.0 ,官網下載就可以了 。官網網址:https://www.sourceinsight.com/ 2、下載壓縮文件,解壓。 鏈接:htt
Linux socket編程示例(最簡單的TCP和UDP兩個例子)
步驟 proto 詳解 dto 應該 pro sock bind ram 一、socket編程 網絡功能是Uinux/Linux的一個重要特點,有著悠久的歷史,因此有一個非常固定的編程套路。 基於TCP的網絡編程: 基於連接, 在交互過程中, 服務器
docker創建sshd服務(最簡單)
tool latest ubunt bsp board test 服務 shee title 1、下載所需鏡像:sshd鏡像查看鏡像:$docker search sshd下載鏡像$docker pull rastasheep/ubuntu-sshd查看docker鏡像$d
編程之法:面試和算法心得(最大連續子數組和)
參考 否則 ++ 例子 返回 log 遍歷 方法 時間 內容全部來自編程之法:面試和算法心得一書,實現是自己寫的使用的是java 題目描述 輸入一個整形數組,數組裏有正數也有負數。數組中連續的一個或多個整數組成一個子數組,每個子數組都有一個和。 求所有子數組的和的最大值,要
中英文切換導航欄(最簡單)
body ali fan center href pla 20px meta hover 使用ul li標簽構建導航欄,在li中設置兩個並列標簽<a>和<span>,分別裝有中文和英文,利用css:hover偽類設置顯示隱藏。 代碼如下: <
MongoDB最簡單的入門教程之五-通過Restful API訪問MongoDB
rest creat 操作 database internal 進行 作用 shu 公眾 通過前面四篇的學習,我們已經在本地安裝了一個MongoDB數據庫,並且通過一個簡單的Spring boot應用的單元測試,插入了幾條記錄到MongoDB中,並通過MongoDB Com
PSV破解流程+軟體遊戲安裝(最簡單/最快的方法整理,已測支援3.65~3.68,理論上支援全系列版本)
1.下載相關工具:下載qcma https://codestation.github.io/qcma/ 下載破解自動打包工具(懶人包,能夠根據使用者AIDKEY自動生成破解包) 新地址連結:https://pan.baidu.com/s/1gjwfsxupsxiCgCWNgC7F8Q
Windows核心程式設計之執行緒
執行緒組成兩部分: 1. 一個執行緒的核心物件,作業系統用它管理執行緒。 2. 一個執行緒棧,用於維護執行緒執行時所需的所有函式引數和區域性變數。 何時建立執行緒?舉例: 作業系統的Windows Indexing Services,磁碟碎片整理程式等,都是使用多執行緒進行效能優化的
windows核心程式設計之程序
什麼是程序? 程序是一個正在執行程式的例項。由兩部分組成:一個核心物件,用於管理程序以及一個地址空間,包含所有可執行檔案或DLL模組的程式碼和資料,此外還包含動態記憶體分配。 在分析程序之前,先看下windows程式是如何建立的? Windows應用程式分為CUI和GUI程式,即控
使用git將專案上傳到github(最簡單方法) - 轉
方法如下 https://www.cnblogs.com/cxk1995/p/5800196.html 唯一需要注意的地方: 紅線框起來的地方,一定要改成"first commit" 或者其他內容,例如 git commit