虫虫首页| 资源下载| 资源专辑| 精品软件
登录| 注册

add-ins

  • 定义一个复数类Complex

    定义一个复数类Complex,使得下面的代码能够工作 Complex c1(3,5); // 用复数3+5i初始化c1 Complex c2 = 4.5; // 用实参4.5初始化c2 c1.add(c2); // 将c1与c2相加,结果保存在c1中 c1.show(); // 将c1输出(这时结果应该是7.5+5i)

    标签: Complex 定义

    上传时间: 2016-05-17

    上传用户:拉梅系数

  • 透明音乐播放器

    [开源 绿色软件] [运行环境 Windows XP/7/8/10] [语言 简体/繁體/English/Unicode] A cool music player. Powered by Bass and BassVis. 极简本地音乐播放器,透明、纯文本界面。支持轻媒体库、歌词、可视化。最小化到托盘,占用资源少,适合边听音乐边工作。 应网友要求,加入了Tag编辑、自动切换列表、播放队列、鼠标手势、均衡器、音频设备选择、全局音量滚轮(托盘区域)、字体设置、极简模式、鼠标穿透、嵌入桌面、简单布局等功能。 homepage> mcool.appinn.me ==================================================== 音频格式APE、FLAC、WavPack、MP3、OGG、TTA、TAK、Musepack、AAC、AC3、WMA、Wav、CD、ALAC、Aiff、MOD、CUE ==================================================== 更新历史:     3336 -2016.3.25 点睛之笔:任意布局(追上foobar2000)。Arbitrary layout (all in one).     3330 -2016.3.10 一体布局之比例调节(初具foobar2000风貌)。Ratio adjust (all in one).     3308 -2015.11.28 歌词微调(在选项>常规>鼠标手势里设置)。Adds function of lyrics tuning.     3306 -2015.11.15 电台模式(整点时切换歌曲或列表,并非在线音乐),以及多声卡支持。Adds radio mode, and multi sound card support.     3300 -2015.10.15 完善细节,修复切歌卡住bug。完美版。Fixes some bugs.     3280 -2015.8.1   简单布局功能。Layout (all in one) function.     3260 -2015.6.1   Win10模式。Win10 mode.     3252 -2015.5.10  任务栏进度条。Taskbar progress display.     3236 -2015.4.10  点睛之笔:透明度调节。Adds function of transparency tuning.     3232 -2015.3.25  自定义软件名(请在mcool.ini中手动修改)。Adds function of customizing app name.     3230 -2015.3.12  Airplay复刻界面。Airplay interface copy.     3218 -2015.1.20  桌面歌词。Desktop lyrics.     3216 -2015.1.12  一体化界面(学习Foobar2000和豆瓣FM)。All in one interface.     3212 -2015.1.6   新增Winamp音效插件支持(学习千千静听),以及滚轮穿透功能(学习Airplay3)。Adds Winamp DSP plugins support, and adds function of wheel transparent.     Winamp音效插件下载:http://uploadgeneration.info/Winamp/www.winamp.com/plugins/dsp-effect/5/top-rated.html     3210 -2014.12.28 重要更新:本地音量调节、自定义鼠标键/手势。Adds local volume control, and adds fuction of customizing mouse control / gesture.     3208 -2014.11.25 简化右键菜单,常规项目移到选项窗口。Simplifies the popup menu, moves the general items to option window.     3206 -2014.11.22 新增文本对齐选项,重新设计导航按钮。Adds option of text alignment, and redesigns the buttons of playback.     3202 -2014.11.10 新增播放记忆、片段循环(Hotkey: Ctrl+1/2)和贴边隐藏功能。Adds functions of playback memory, AB repeat and screen side hide.     3200 -2014.11.5  新增无界面选项(先去掉托盘图标,然后Ctrl+Alt+W隐藏界面,Ctrl+Alt+X关闭)。Adds option of no interface.     3191 -2014.8.26  嵌入桌面。Pins to desktop.     3190 -2014.8.19  音乐管理第一步:列表分组。Playlists grouping.     3186 -2014.8.10  基于列表的分级系统(Hotkey:0..5)。Rating system based on playlist.     3181 -2014.8.1   启用新图标(由虹吸墨作者BGLL友情制作)。Uses the new icon.     3180 -2014.7.22  新增Win7任务栏特效。Adds windows 7 taskbar effect.     3166 -2014.6.29  重要更新:自动下载专辑封面(源于歌词迷)。Downloads album covers from geci.me.     3160 -2014.6.1   重要更新:新增极简模式,以及OGG/Opus内置封面显示功能。Adds minimalist mode, and adds function of displaying cover embedded in OGG/Opus.     3152 -2014.5.18  添加托盘右键菜单,新增MP4/M4A(ALAC)内置封面显示功能。Adds systray popup menu, and adds function of displaying cover embedded in MP4/M4A(ALAC).     3151 -2014.5.1   重新设计可视化效果,新增示波器效果。Redesigns visual effects, and adds oscilloscope effect.     3150 -2014.4.20  采用歌词迷API下载歌词。Downloads lyrics from geci.me.     3136 -2014.3.30  加入可选的按钮,以及鼠标穿透功能。Adds function of transparent window.     3132 -2014.3.6   简化界面,向Foobar2K看齐;增加正在播放面板。Simplifies the interface, and adds now playing panel.     3130 -2014.2.26  重要更新:按照专辑分组。Grouping by album.     3120 -2014.2.18  优化字体渲染(Windows7/8下)。Optimizes font rendering in Windows 7/8.     3110 -2014.1.26  点睛之笔:自定义字体颜色。Adds function of customizing font color.     3108 -2013.11.16 Last.fm同步功能(请到主页下载插件)。Last.fm scrobbler support.     3106 -2013.11.8  可回溯的随机播放(学习Airplay 2)。Random playback can be traced back.     3103 -2013.10.12 优化右键菜单。Optimizes popup menu.     3102 -2013.9.30  修改滚动条样式,增加音频缓冲选项。Modifies style of scroll bar, and adds option of audio buffer length.     3100 -2013.9.10  无边框设计;迷你模式也可以不置顶(Hotkey:T)。Borderless designs.     3086 -2013.8.20  增加歌词面板功能。Adds function of lyrics panel.     3082 -2013.8.08  增加在可视化界面显示歌词功能。Adds function of displaying lyrics on visual interface.     3080 -2013.8.01  新增设置字体功能,恢复简单的自动关机功能。Adds function of setting font, and re-adds simple function of auto shutdown.     3060 -2013.6.26  修复在迷你模式停止响应的Bug,去掉自动关机、歌词调整功能。Fixes bug of stop responding in mini mode, and removes functions of auto shutdown and lyrics trimming.     3050 -2013.5.23  增加手势功能。Adds gesture function.     3030 -2013.3.10  增加Aero磨砂玻璃效果[如需源码请联系我],XP/Win7/8无差别显示,按Insert键开启。Adds aero glass effect.     3020 -2013.2.23  增加简易Tag编辑功能(选中并单击即可,相当于资源管理器中的重命名,按照[歌手 - 歌名][专辑]格式进行编辑)。Adds function of editing audio tags (select and click, edit with [artist - title][album] format).     3010 -2013.1.23  应网友要求,加入读取内嵌CUE、歌词及专辑封面功能。Adds function of reading CUE, LRC and album cover built in media.     3002 -2012.11.03 无按钮设计;微调进度条尺寸。Buttonless design; modifies the size of the progress bar.     3001 -2012.10.15 重要改进,界面即按钮:单击 - 播放/暂停,按住 - 前进。Important update, the interface is a button: Click - Play/Pause, Hold Down - Next.     3000 -2012.9.28  增加Win8模式。Adds Win8 mode option.     2982 -2012.8.26  在Win8下使用微软雅黑字体。Uses Microsoft YaHei font in Windows 8 CHS.     2981 -2012.8.20  视频以插件提供(请到主页下载),增加单曲循环功能。Adds function of repeat track.     2980 -2012.7.26  简化代码,去掉视频和MIDI支持。Removes the video and MIDI support.     2970 -2012.7.20  增加媒体信息显示功能。Adds function of displaying media info.     2960 -2012.6.28  增加专辑封面显示功能(Hotkey:Ins)。Adds function of displaying album cover.     2956 -2012.6.01  再次简化界面。Simplifies the interface again.     2952 -2012.4.28  增加音频设备选择功能:DS、ASIO、WASAPI。Adds function of selecting playback device.     2950 -2012.3.30  *增加滚轮调节音量功能(在托盘,中键静音)和媒体键支持。Adds function of setting volume by mouse wheel (over systray, middle click to mute), and adds multimedia keys support.     2936 -2012.3.17  微调界面,修复物理删除失效的BUG。Fine-tunes the interface, and restores the physical delete function.     2930 -2012.2.27  增加TAK格式支持。Adds TAK format support.     2923 -2012.2.12  紧急修复上一版出现的字体模糊BUG(Vista/Win7下),增加在任务栏显/隐图标功能(Ctrl+T)。Fixes font vague bug for Vista/Win7, and adds showing/hiding icon on taskbar function.     2920 -2012.2.08  微调界面,优化CPU占用(启用背景图片时)。Fine-tunes the interface, and optimizes CPU utilization (while enable background image).     2912 -2012.1.12  增加播放队列功能。Adds playback queue function.     2910 -2011.12.25 改进迷你模式,增加查找功能。Improves mini mode, and adds find function.     *注:此功能对杀毒软件过敏,开启方法:按F1进入选项,勾选全局快捷键。The feature is allergic to the anti-virus software.

    标签: 透明 音乐播放器

    上传时间: 2016-06-10

    上传用户:fanghua

  • altium15pjwn

    altium15安装与破解 1.运行AD15KeyGen,点击“打开模板”,加载license.ini,如想修改注册名,只需修改: TransactorName=Your Name 其中Your Name用你自己的名字替换,其它参数在单机版的情况下无需修改; 2.点击“生成协议”,保存生成的alf文件(文件名任意,如“jack ”),并将其放到你的安装目录下; 3.将patch.exe放到你的安装目录下,运行patch,对安装目录下的dxp.exe文件补丁,注意运行破解时软件没有运行; 4.启动DXP,运行菜单DXP->My Account,点击Add Standalone License file,加载前面生成的license(.alf)文件后即能正常使用了。 注意: 1.局域网内用同一license不再提示冲突 2.仅供学习研究使用,勿用于非法用途。

    标签: altium pjwn 15

    上传时间: 2016-06-11

    上传用户:newvision

  • pcb设计出现的问题

    如何处理pcb转换时的一些问题,如果出现unknown Pin和failed to add class member等问题的详细介绍

    标签: pcb

    上传时间: 2016-07-28

    上传用户:断点PPpp

  • c#给目录树显视自定义图标

    楼术描述项:         (1).该项目中"我的电脑"是作者自定义的root节点,没有设定其路径,所以BeforeExpand事件中会从它开始依次遍历,但"我的电脑"会提示"没有指定路径".故需要if(e.Tag.ToString() != "我的电脑")判断.同时"我的文档"需要再次获取其路径,依次实现Add子节点;         (2).同时在"我的文档"和盘符中需要添加tNode.Nodes.Add("")加载空节点形成+号,如果没有该+号,BeforeExpend事件不会被调用,子目录无法获取加载,在BeforeExpand事件调用TreeViewItems.Add加载其子结点需要e.Nodes.Clear();清除该结点的子目录再加载.         (3).提供两篇类似文章供大家学习,经过对比可以发现:第一篇仅从驱动器(C盘)开始加载,所以BeforeExpend简单展开子目录即可,不需要判断"我的电脑"和"我的文档".第二篇含"桌面",因此需要判断路径:"C# TreeView磁盘文件,AfterSelect显示加号-骆驼祥子" 和"Treeview树状显示文件夹" .同时补充一篇很优秀的文章供大家学习"WinForm应用:ListView做图像浏览"         (4).补充TreeView(树视图)事件:更详细见"c# 树状视图(TreeView类)".         事件 描述         AfterCheck 在选中节点复选框后引发         AfterCollapse 在折叠一个节点后引发         AfterExpand 在扩展一个节点后引发         AfterSelect 在选中一个节点后引发         BeforeCheck 在选中节点复选框之前引发         BeforeCollapse 在折叠一个节点之前引发         BeforeExpand 在扩展一个节点之前引发         BeforeSelect 在选中一个节点之前引发         (5).补充两个关于论坛讨论"c#怎样动态读取资源文件里的图片"和"在C#中怎么调用Resources文件中的图片"         (6).在《C#典型模块与项目实战大全》(清华大学出版社-丁士锋)书中谈到,出于对程序响应性能考虑,它先加载盘符结点,没有使用递归一次性加载所有文件到树状列表中,代码通过AfterSelect事件和FileSystemWatcher控件,监听加载.并使用线程池Task更新加载TreeView,希望大家去学习.          总结         该篇通过TreeView加载了磁盘目录路径,并通过ImageList加载图标.那么怎样实现阅读文件夹下文件,获取其图标、文件大小、扩展名等信息,并双击打开文件呢?下一篇将接着讲述.最后希望该文章对大家有所帮助,文章中很多链接都可以供觉得有用的同学学习,感谢上面提到的文章及书籍作者.同时如果文章中有错误或不足之处请原谅,有问题或建议者亦可提出.希望尊重作者劳动果实勿喷.     

    标签: 目录树 自定义

    上传时间: 2016-08-15

    上传用户:baobao9437

  • 实验二须知

    实验内容: 1.利用QuartusII的"MegaWizard Plug-In Manager",   设计输入数据宽度是4bit的ADD、SUB、MULT、DIVIDE、COMPARE   把它们作为一个project,DEVICE选用EPF10K70RC240-4,对它们进行   时序仿真,将仿真波形(输入输出选用group)文件提交。 2.利用QuartusII的"MegaWizard Plug-In Manager"中的LPM_COUNTER,   设计一个20bit的up_only COUNTER,   要求该COUNTER在FE0FA和FFFFF之间自动循环计数;   分析该COUNTER在EPM7128SLC84-7、EPM7128SLC84-10、   和EPF10K70RC240-2、EPF10K70RC240-4几种芯片中的最大工作频率;     请将计数器的输出仿真波形文件提交(特别注意在0FFFFCH--0FE0FFH之间的仿真波形图)。  (仅EPF10K70RC240-4芯片,最大允许Clock频率下)。

    标签: 实验

    上传时间: 2016-10-18

    上传用户:jack

  • 学生成绩查询

    #include "string.h" #include "ctype.h" #include "stdio.h" search(char pd[]) {FILE *fp; int time=0,i=0,j=0,add[80],k=0,m; char *ch, str[900]; m=strlen(pd); if((fp=fopen("haha.txt","r"))==NULL) { printf("Cannot open this file\n"); exit(0); } for(;!feof(fp);i++) { str[i]=fgetc(fp); if(tolower(str[i])==tolower(pd[k])) {k++; if(k==m) if(!isalpha(i-m)&&!isalpha((str[i++]=fgetc(fp)))) { time++; add[j]=i-m+1; j++; k=0; } else k=0; } } if(time) { printf("The time is:%d\n",time); printf("The adders is:\n"); for(i=0;i

    标签: 查询学会少年宫

    上传时间: 2016-12-29

    上传用户:767483511

  • 学生成绩管理啊

    #include "string.h" #include "ctype.h" #include "stdio.h" search(char pd[]) {FILE *fp;  int time=0,i=0,j=0,add[80],k=0,m;  char *ch,  str[900];  m=strlen(pd);  if((fp=fopen("haha.txt","r"))==NULL)  {   printf("Cannot open this file\n");   exit(0);  } for(;!feof(fp);i++)  {  str[i]=fgetc(fp);   if(tolower(str[i])==tolower(pd[k]))    {k++;     if(k==m)     if(!isalpha(i-m)&&!isalpha((str[i++]=fgetc(fp))))     {      time++;      add[j]=i-m+1;      j++;      k=0;     }     else k=0;   }  }   if(time)  {   printf("The time is:%d\n",time);   printf("The adders is:\n");   for(i=0;i<j;i++)   printf("%5d",add[i]);   if(i%5==0)   printf("\n");   getch();   fclose(fp);   }   else   printf("Sorry!Cannot find the word(^_^)"); } main() { char pd[10],choose='y'; int flag=1;     while(flag)    {printf("In put the word you want to seqarch:");     scanf("%s",pd);     search(strlwr(pd));     printf("\nWould you want to continue?(Y/N):");     getchar();     scanf("%c",&choose);     if((tolower(choose))=='n')     flag=0;     else flag=1;    }   printf("Thanks for your using!Bye-bye!\n");   getch(); }

    标签: 学生专用

    上传时间: 2016-12-29

    上传用户:767483511

  • c#简单计算器

    // 学生管理.cpp : Defines the entry point for the application. // #include "stdafx.h" #include "resource.h" #define MAX_LOADSTRING 100 // Global Variables: HINSTANCE hInst; // current instance TCHAR szTitle[MAX_LOADSTRING]; // The title bar text TCHAR szWindowClass[MAX_LOADSTRING]; // The title bar text // Foward declarations of functions included in this code module: ATOM MyRegisterClass(HINSTANCE hInstance); BOOL InitInstance(HINSTANCE, int); LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); LRESULT CALLBACK About(HWND, UINT, WPARAM, LPARAM); struct person {   char name[10];   int ID;   int cj_yw;   int cj_sx;   struct person* next;   struct person* pro; }per; int APIENTRY WinMain(HINSTANCE hInstance,                      HINSTANCE hPrevInstance,                      LPSTR     lpCmdLine,                      int       nCmdShow) {   // TODO: Place code here. MSG msg; HACCEL hAccelTable; // Initialize global strings LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING); LoadString(hInstance, IDC_MY, szWindowClass, MAX_LOADSTRING); MyRegisterClass(hInstance); // Perform application initialization: if (!InitInstance (hInstance, nCmdShow))  { return FALSE; } hAccelTable = LoadAccelerators(hInstance, (LPCTSTR)IDC_MY); // Main message loop: while (GetMessage(&msg, NULL, 0, 0))  { if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))  { TranslateMessage(&msg); DispatchMessage(&msg); } } return msg.wParam; } // //  FUNCTION: MyRegisterClass() // //  PURPOSE: Registers the window class. // //  COMMENTS: // //    This function and its usage is only necessary if you want this code //    to be compatible with Win32 systems prior to the 'RegisterClassEx' //    function that was added to Windows 95. It is important to call this function //    so that the application will get 'well formed' small icons associated //    with it. // ATOM MyRegisterClass(HINSTANCE hInstance) { WNDCLASSEX wcex; wcex.cbSize = sizeof(WNDCLASSEX);  wcex.style = CS_HREDRAW | CS_VREDRAW; wcex.lpfnWndProc = (WNDPROC)WndProc; wcex.cbClsExtra = 0; wcex.cbWndExtra = 0; wcex.hInstance = hInstance; wcex.hIcon = LoadIcon(hInstance, (LPCTSTR)IDI_MY); wcex.hCursor = LoadCursor(NULL, IDC_ARROW); wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); wcex.lpszMenuName = (LPCSTR)IDC_MY; wcex.lpszClassName = szWindowClass; wcex.hIconSm = LoadIcon(wcex.hInstance, (LPCTSTR)IDI_SMALL); return RegisterClassEx(&wcex); } // //   FUNCTION: InitInstance(HANDLE, int) // //   PURPOSE: Saves instance handle and creates main window // //   COMMENTS: // //        In this function, we save the instance handle in a global variable and //        create and display the main program window. // BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) {    HWND hWnd;    hInst = hInstance; // Store instance handle in our global variable    hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,       CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);    if (!hWnd)    {       return FALSE;    }    ShowWindow(hWnd, nCmdShow);    UpdateWindow(hWnd);    return TRUE; } // //  FUNCTION: WndProc(HWND, unsigned, WORD, LONG) // //  PURPOSE:  Processes messages for the main window. // //  WM_COMMAND - process the application menu //  WM_PAINT - Paint the main window //  WM_DESTROY - post a quit message and return // // LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { int wmId, wmEvent; PAINTSTRUCT ps; HDC hdc; TCHAR szHello[MAX_LOADSTRING]; LoadString(hInst, IDS_HELLO, szHello, MAX_LOADSTRING); switch (message)  { case WM_COMMAND: wmId    = LOWORD(wParam);  wmEvent = HIWORD(wParam);  // Parse the menu selections: switch (wmId) { case IDM_ABOUT:   DialogBox(hInst, (LPCTSTR)IDD_ABOUTBOX, hWnd, (DLGPROC)About);   break; case IDM_EXIT:   DestroyWindow(hWnd);   break; default:   return DefWindowProc(hWnd, message, wParam, lParam); } break; case WM_PAINT: hdc = BeginPaint(hWnd, &ps); // TODO: Add any drawing code here... RECT rt; GetClientRect(hWnd, &rt); DrawText(hdc, szHello, strlen(szHello), &rt, DT_CENTER); EndPaint(hWnd, &ps); break; case WM_DESTROY: PostQuitMessage(0); break; default: return DefWindowProc(hWnd, message, wParam, lParam);    }    return 0; } // Mesage handler for about box. LRESULT CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { case WM_INITDIALOG: return TRUE; case WM_COMMAND: if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)  { EndDialog(hDlg, LOWORD(wParam)); return TRUE; } break; }     return FALSE; }

    标签: 计算器 学生

    上传时间: 2016-12-29

    上传用户:767483511

  • 简单的计算器

    // 学生管理.cpp : Defines the entry point for the application. // #include "stdafx.h" #include "resource.h" #define MAX_LOADSTRING 100 // Global Variables: HINSTANCE hInst; // current instance TCHAR szTitle[MAX_LOADSTRING]; // The title bar text TCHAR szWindowClass[MAX_LOADSTRING]; // The title bar text // Foward declarations of functions included in this code module: ATOM MyRegisterClass(HINSTANCE hInstance); BOOL InitInstance(HINSTANCE, int); LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); LRESULT CALLBACK About(HWND, UINT, WPARAM, LPARAM); struct person {   char name[10];   int ID;   int cj_yw;   int cj_sx;   struct person* next;   struct person* pro; }per; int APIENTRY WinMain(HINSTANCE hInstance,                      HINSTANCE hPrevInstance,                      LPSTR     lpCmdLine,                      int       nCmdShow) {   // TODO: Place code here. MSG msg; HACCEL hAccelTable; // Initialize global strings LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING); LoadString(hInstance, IDC_MY, szWindowClass, MAX_LOADSTRING); MyRegisterClass(hInstance); // Perform application initialization: if (!InitInstance (hInstance, nCmdShow))  { return FALSE; } hAccelTable = LoadAccelerators(hInstance, (LPCTSTR)IDC_MY); // Main message loop: while (GetMessage(&msg, NULL, 0, 0))  { if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))  { TranslateMessage(&msg); DispatchMessage(&msg); } } return msg.wParam; } // //  FUNCTION: MyRegisterClass() // //  PURPOSE: Registers the window class. // //  COMMENTS: // //    This function and its usage is only necessary if you want this code //    to be compatible with Win32 systems prior to the 'RegisterClassEx' //    function that was added to Windows 95. It is important to call this function //    so that the application will get 'well formed' small icons associated //    with it. // ATOM MyRegisterClass(HINSTANCE hInstance) { WNDCLASSEX wcex; wcex.cbSize = sizeof(WNDCLASSEX);  wcex.style = CS_HREDRAW | CS_VREDRAW; wcex.lpfnWndProc = (WNDPROC)WndProc; wcex.cbClsExtra = 0; wcex.cbWndExtra = 0; wcex.hInstance = hInstance; wcex.hIcon = LoadIcon(hInstance, (LPCTSTR)IDI_MY); wcex.hCursor = LoadCursor(NULL, IDC_ARROW); wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); wcex.lpszMenuName = (LPCSTR)IDC_MY; wcex.lpszClassName = szWindowClass; wcex.hIconSm = LoadIcon(wcex.hInstance, (LPCTSTR)IDI_SMALL); return RegisterClassEx(&wcex); } // //   FUNCTION: InitInstance(HANDLE, int) // //   PURPOSE: Saves instance handle and creates main window // //   COMMENTS: // //        In this function, we save the instance handle in a global variable and //        create and display the main program window. // BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) {    HWND hWnd;    hInst = hInstance; // Store instance handle in our global variable    hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,       CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);    if (!hWnd)    {       return FALSE;    }    ShowWindow(hWnd, nCmdShow);    UpdateWindow(hWnd);    return TRUE; } // //  FUNCTION: WndProc(HWND, unsigned, WORD, LONG) // //  PURPOSE:  Processes messages for the main window. // //  WM_COMMAND - process the application menu //  WM_PAINT - Paint the main window //  WM_DESTROY - post a quit message and return // // LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { int wmId, wmEvent; PAINTSTRUCT ps; HDC hdc; TCHAR szHello[MAX_LOADSTRING]; LoadString(hInst, IDS_HELLO, szHello, MAX_LOADSTRING); switch (message)  { case WM_COMMAND: wmId    = LOWORD(wParam);  wmEvent = HIWORD(wParam);  // Parse the menu selections: switch (wmId) { case IDM_ABOUT:   DialogBox(hInst, (LPCTSTR)IDD_ABOUTBOX, hWnd, (DLGPROC)About);   break; case IDM_EXIT:   DestroyWindow(hWnd);   break; default:   return DefWindowProc(hWnd, message, wParam, lParam); } break; case WM_PAINT: hdc = BeginPaint(hWnd, &ps); // TODO: Add any drawing code here... RECT rt; GetClientRect(hWnd, &rt); DrawText(hdc, szHello, strlen(szHello), &rt, DT_CENTER); EndPaint(hWnd, &ps); break; case WM_DESTROY: PostQuitMessage(0); break; default: return DefWindowProc(hWnd, message, wParam, lParam);    }    return 0; } // Mesage handler for about box. LRESULT CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { case WM_INITDIALOG: return TRUE; case WM_COMMAND: if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)  { EndDialog(hDlg, LOWORD(wParam)); return TRUE; } break; }     return FALSE; }

    标签: 学生 计算器

    上传时间: 2016-12-29

    上传用户:767483511