• 大小: 15KB
    文件类型: .c
    金币: 1
    下载: 0 次
    发布日期: 2021-06-10
  • 语言: 其他
  • 标签:

资源简介

基于MINIGUI平台开发的计算器,如何Window下的标准计算器功能一样。

资源截图

代码片段和文件信息

#include 
#include 
#include 
#include 

#include 
#include 
#include 
#include 
#include 
#include 

#define NO1_IU_SLEDIT 701
#define NO1_IU_BUTTON1 702
#define NO1_IU_BUTTON2 703
#define NO1_IU_BUTTON3 704
#define NO1_IU_BUTTON4 705
#define NO1_IU_BUTTON5 706
#define NO1_IU_BUTTON6 707
#define NO1_IU_BUTTON7 708
#define NO1_IU_BUTTON8 709
#define NO1_IU_BUTTON9 710
#define NO1_IU_BUTTON10 711
#define NO1_IU_BUTTON11 712
#define NO1_IU_BUTTON12 713
#define NO1_IU_BUTTON13 714
#define NO1_IU_BUTTON14 715
#define NO1_IU_BUTTON15 716
#define NO1_IU_BUTTON16 717
#define NO1_IU_BUTTON17 718
#define NO1_IU_BUTTON18 720
#define NO1_IU_BUTTON19 721
#define NO1_IU_BUTTON20 722
#define NO1_IU_BUTTON21 723
#define NO1_IU_BUTTON22 724
#define NO1_IU_BUTTON23 725
#define NO1_IU_BUTTON24 726

#define   Max  40

static int flag1=0;//判断是否是 第二个参数0表示第一个参数,1表示第二个参数

static int CalculatorWinProc(HWND hcwdint messageWPARAM wParamLPARAM lParam)
{
HDC hdc;
RECT rc;

static int time=0;
int longsize;
char buffer1[Max];
char buffer2[Max];
char *str=NULL;
char *ptr=NULL;
static char signal;
   static float tal=0.0;
   static float tall=0.0;
  static float sum=0.0;

switch(message){
case MSG_CREATE:
CreateWindow(CTRL_EDIT““WS_VISIBLE|WS_BORDER|ES_RIGHTNO1_IU_SLEDIT
             352025030hcwd0);

CreateWindow(CTRL_BUTTON“Backspace“WS_TABSTOP|WS_VISIBLE|BS_DEFPUSHBUTTONNO1_IU_BUTTON1
             35606530hcwd0);
CreateWindow(CTRL_BUTTON“CE“WS_TABSTOP|WS_VISIBLE|BS_DEFPUSHBUTTONNO1_IU_BUTTON2
             100606030hcwd0);
CreateWindow(CTRL_BUTTON“C“WS_TABSTOP|WS_VISIBLE|BS_DEFPUSHBUTTONNO1_IU_BUTTON3
             160606030hcwd0);
  CreateWindow(CTRL_BUTTON“返回“WS_TABSTOP|WS_VISIBLE|BS_DEFPUSHBUTTONNO1_IU_BUTTON24
             220606030hcwd0);

CreateWindow(CTRL_BUTTON“7“WS_TABSTOP|WS_VISIBLE|BS_DEFPUSHBUTTONNO1_IU_BUTTON4
             35905030hcwd0);
CreateWindow(CTRL_BUTTON“8“WS_TABSTOP|WS_VISIBLE|BS_DEFPUSHBUTTONNO1_IU_BUTTON5
             85905030hcwd0);
CreateWindow(CTRL_BUTTON“9“WS_TABSTOP|WS_VISIBLE|BS_DEFPUSHBUTTONNO1_IU_BUTTON6
             135905030hcwd0);
CreateWindow(CTRL_BUTTON“/“WS_TABSTOP|WS_VISIBLE|BS_DEFPUSHBUTTONNO1_IU_BUTTON7
             185905030hcwd0);
CreateWindow(CTRL_BUTTON“sqrt“WS_TABSTOP|WS_VISIBLE|BS_DEFPUSHBUTTONNO1_IU_BUTTON8
             235905030hcwd0);

CreateWindow(CTRL_BUTTON“4“WS_TABSTOP|WS_VISIBLE|BS_DEFPUSHBUTTONNO1_IU_BUTTON9
             351205030hcwd0);
CreateWindow(CTRL_BUTTON“5“WS_TABSTOP|WS_VISIBLE|BS_DEFPUSHBUTTONNO1_IU_BUTTON10
             851205030hcwd0);
CreateWindow(CTRL_BUTTON“6“WS_TABSTOP|WS_VISIBL

评论

共有 条评论

相关资源