没错,你没看错,又是我,惊天来一款简易计算器
老规矩,先上代码
#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
struct CreateInfo{
LPCSTR Class,Text;
UINT x,y,width,height;
short number;
HWND hWnd;
HINSTANCE hInst;
void (*fp)(vector<HWND>);
};
vector<CreateInfo> createinfo;
void push(LPCSTR Class,LPCSTR Text,UINT x,UINT y,UINT width,UINT height,
HINSTANCE hInst,void (*fp)(vector<HWND>)){
CreateInfo ci;
ci.Class=Class;
ci.Text=Text;
ci.x=x;
ci.y=y;
ci.width=width;
ci.height=height;
ci.hInst=hInst;
ci.fp=fp;
createinfo.push_back(ci);
}
HWND MakeWindow(HINSTANCE hInst,LPCSTR name,int x,int y,int width,int height,bool& err
,long long(*fp)(HWND__*,unsigned int,unsigned long long,long long)){
err=0;
WNDCLASSEX wc;
HWND hwnd;
memset(&wc,0,sizeof(wc));
wc.cbSize=sizeof(wc);
wc.lpfnWndProc=fp;
wc.hInstance=hInst