摘要:
SYSMETS.H#define NUMLINES ((int) (sizeof sysmetrics / sizeof sysmetrics [0]))struct{ int iIndex ; TCHAR * szLabel ; TCHAR * szDesc ;} sysmetrics [] ={ SM_CXSCREEN, TEXT ("SM_CXSCREEN"), TEXT ("Screen width in pixels"), SM... 阅读全文
posted @ 2012-11-28 19:48
github.com/starRTC
阅读(331)
评论(0)
推荐(0)
摘要:
类的组合:对象充当成员在创建对象时,也要对内嵌对象初始化组合类构造函数定义类名::类名(形参):内嵌对象1(形参),内嵌对象2(形参){ }Circle:: Circle(float r){radius=r;}等价于Circle:: Circle(float r):radius(r) {}//效率更高此时构造函数调用顺序:1、调用内嵌对象的构造函数,按定义中出现的次序2、自己的组合类的拷贝构造函数,要为内嵌对象的拷贝构造函数传递参数,若C类中包含B类的对象b,则C类的拷贝构造函数形式为C::C(C &c1):b(c1.b) {…}全局变量和加static声明的,都具有静态生存期类的静态 阅读全文
posted @ 2012-11-28 18:33
github.com/starRTC
阅读(297)
评论(0)
推荐(0)
摘要:
//需要添加winmm.lib#include <windows.h> LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ;//LRESULT等价于Longint WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow){ static TCHAR szAppName[] = TEXT ("HelloWin") ; HWND hwnd ; ... 阅读全文
posted @ 2012-11-28 14:38
github.com/starRTC
阅读(175)
评论(0)
推荐(0)
摘要:
#include <windows.h>#include <tchar.h> #include <stdio.h> int CDECL MessageBoxPrintf (TCHAR * szCaption, TCHAR * szFormat, ...){ TCHAR szBuffer [1024] ; va_list pArgList ; // The va_start macro (defined in STDARG.H) is usually equivalent to: // pArgList = (char *... 阅读全文
posted @ 2012-11-28 13:21
github.com/starRTC
阅读(208)
评论(0)
推荐(0)
摘要:
#include <windows.h>int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow){ MessageBox (NULL, TEXT ("Hello, World!"), TEXT ("HelloMsg"), 0) ;//0为OK return 0 ;} 阅读全文
posted @ 2012-11-28 09:56
github.com/starRTC
阅读(183)
评论(0)
推荐(0)

浙公网安备 33010602011771号