![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
1. Programming windows 学习笔记
文章平均质量分 76
梦幻DUO
游戏开发爱好者
展开
-
windows程序设计 你的第一个windows程序
The Windows EquivalentThe Windows equivalent to the "hello, world" program has exactly the same components as the character-mode version. It has an includestatement, a program entry point, a functio原创 2015-03-28 18:25:38 · 479 阅读 · 0 评论 -
windows程序设计 TextOut
TextOut: The DetailsTextOutisthe most common GDI function for displaying text. Its syntax isTextOut(hdc, x, y, psText, iLength) ;The firstargument is the handle to the device context—either the原创 2015-04-11 19:16:25 · 527 阅读 · 0 评论 -
windows程序设计 System Metrics Display Program No. 1
Putting It All TogetherSYSMETS.H/*-----------------------------------------------SYSMETS.H-- System metrics display structure-----------------------------------------------*/#define NUMLINES (原创 2015-04-11 19:18:00 · 549 阅读 · 0 评论 -
windows程序设计 更好的滚动条
Building a Better ScrollThe syntaxof the SetScrollInfoand GetScrollInfofunctions isSetScrollInfo (hwnd, iBar, &si,bRedraw) ;GetScrollInfo (hwnd, iBar, &si) ;The thirdargument to both functions原创 2015-04-11 19:27:49 · 536 阅读 · 0 评论 -
windows 程序设计 System Metrics Display Program No. 3
/*---------------------------------------------------- SYSMETS3.C -- System Metrics Display Program No. 3 (c) Charles Petzold, 1998 ----------------------------------------------原创 2015-04-11 19:28:29 · 723 阅读 · 0 评论 -
windows程序设计 System Metrics Display Program No. 2
The SYSMETS2 programSYSMETS2.C/*---------------------------------------------------- SYSMETS2.C -- System Metrics Display Program No. 2 (c) Charles Petzold, 1998 --------原创 2015-04-11 19:26:33 · 814 阅读 · 0 评论 -
windows程序设计 滚动条
Scroll BarsIt is easyto include a horizontal or vertical scroll bar in your application window.All you need do is include the window style (WS)identifier WS_VSCROLL (vertical scroll) or WS_HSCROLL原创 2015-04-11 19:21:40 · 564 阅读 · 0 评论 -
windows程序设计 设备上下文
The Device ContextThedevice context (also called simply the "DC") is really just a datastructure maintained internally by GDI. Some of the values in the device context are graphics"attributes." Th原创 2015-04-11 18:36:06 · 438 阅读 · 0 评论 -
windows程序设计 客户端区域大小
The Size of the Client AreaThe dimensionsof a maximized client area are, in fact, available from theGetSystemMetricscall by using arguments of SM_CXFULLSCREEN and SM_CYFULLSCREEN(assuming that the w原创 2015-04-11 19:20:04 · 693 阅读 · 0 评论 -
windows程序设计 GDI简介
An Introduction to GDITo paint theclient area of your window, you use Windows' Graphics Device Interface (GDI)functions. Windows provides several GDI functions for writing text strings tothe client原创 2015-04-06 21:50:14 · 618 阅读 · 0 评论 -
nafxcw.lib与LIBCMT.lib在vs2008中链接冲突解决方案
1>正在链接… 1>nafxcw.lib(afxmem.obj) : error LNK2005: “void * __cdecl operator new(unsigned int)” (??2@YAPAXI@Z) 已经在 LIBCMT.lib(new.obj) 中定义 1>nafxcw.lib(afxmem.obj) : error LNK2005: “void __cdecl operat转载 2015-11-19 15:48:31 · 513 阅读 · 0 评论 -
QueryPerformanceFrequency、QueryPerformanceCounter作用
QueryPerformanceFrequency是操作系统的性能统计分辨率,也就是每秒钟统计多少次的意思。 性能统计频率和应用程序性能没有关系。 顺便说说 QueryPerformanceCounter 是系统性能统计计数器,表示统计了多少次,除以QueryPerformanceFrequency,得到系统运行时间(秒数)。 QueryPerformanceCounter2-QueryPe转载 2015-12-04 19:04:29 · 1450 阅读 · 0 评论 -
windows程序设计 处理消息
Processing the MessagesGenerally,Windows programmers use a switchand caseconstruction to determine what messagethe window procedure is receiving and how to process it accordingly. When awindow proce原创 2015-04-03 19:45:07 · 498 阅读 · 0 评论 -
windows程序设计 窗口过程函数
The Window ProcedureIn HELLOWIN,the window procedure is the function named WndProc. A window procedure can haveany name (as long as it doesn't conflict with some other name, of course). AWindows pro原创 2015-04-02 22:50:00 · 504 阅读 · 0 评论 -
windows程序设计 架构概述
An Architectural OverviewEvery windowthat a program creates has an associated window procedure. This windowprocedure is a function that could be either in the program itself or in adynamic-link libr原创 2015-03-31 09:47:06 · 481 阅读 · 0 评论 -
windows程序设计 宽字符库函数
Wide-Character Library FunctionsNow let'stry defining a pointer to a string of wide characters:wchar_t * pw= L"Hello!" ;And now wecall strlenagain:iLength =strlen (pw) ;Now thetroubles begin原创 2015-03-31 09:45:34 · 728 阅读 · 0 评论 -
windows程序设计 Unicode简介
An Introduction to UnicodeVery simply,Unicode is an extension of ASCII character encoding. Rather than the 7 bitsused to represent each character in strict ASCII, or the 8 bits per characterthat hav原创 2015-03-31 09:42:35 · 453 阅读 · 0 评论 -
windows程序设计 注册窗口类
Registering the Window ClassA window isalways created based on a window class. The window class identifies the windowprocedure that processes messages to the window.Before youcreate an application原创 2015-04-02 22:46:48 · 651 阅读 · 0 评论 -
windows程序设计 创建窗口
Creating the WindowWhile theinformation passed to the RegisterClassfunction is specified in a data structure,the information passed to the CreateWindowfunction is specified as separatearguments to t原创 2015-04-02 22:48:33 · 486 阅读 · 0 评论 -
windows程序设计 宽字符
Wider CharactersWidecharacters in C are based on the wchar_tdata type, which is defined in severalheader files, including WCHAR.H,like so:typedef unsigned short wchar_t ;Thus,the wchar_tdata t原创 2015-03-31 09:43:43 · 468 阅读 · 0 评论 -
windows程序设计 匈牙利命名法
Hungarian NotationHungariannotation helps you avoid errors in your code before they turn into bugs.Because the name of a variable describes both the use of a variable and itsdata type, you are much原创 2015-04-02 22:12:18 · 519 阅读 · 0 评论 -
windows程序设计 HELLOWIN程序
The HELLOWIN Program#include LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ;int WINAPI WinMain (HINSTANCE hInstance, HINSTANCEhPrevInstance,PSTR szCmdLine, int iCmdShow){static TCH原创 2015-04-02 22:06:11 · 639 阅读 · 0 评论 -
windows程序设计 显示窗口
Displaying the WindowHowever, thewindow does not yet appear on the video display. Two more calls are needed. Thefirst isShowWindow (hwnd, iCmdShow) ;TheShowWindow function puts the window on the原创 2015-04-02 22:48:22 · 409 阅读 · 0 评论 -
windows程序设计 大写标识符与缩写
Uppercase IdentifiersYou'llnotice the use of quite a few uppercase identifiers in HELLOWIN.C. Theseidentifiers are defined in theWindowsheader files. Several of these identifiers contain a two-let原创 2015-04-02 22:10:31 · 600 阅读 · 0 评论 -
windows程序设计 消息循环
The Message LoopA programretrieves these messages from the message queue by executing a block of codeknown as the "message loop":while (GetMessage (&msg, NULL, 0,0)){TranslateMessage (&msg) ;原创 2015-04-02 22:49:54 · 487 阅读 · 0 评论 -
进程间通信(Interprocess Communications)
https://msdn.microsoft.com/en-us/library/aa365574(v=vs.85).aspx转载 2016-09-17 08:16:46 · 379 阅读 · 0 评论