随笔分类 -  C++

摘要:GDI(Graphics Device Interface): 图形设备接口: 负责在显示器和打印机上显示图形 。 我们的重点是在显示器上显示图形。 计算机图形输出设备分为两大类: 光栅设备(Raster devices) 矢量设备(Vector devices) 。 我们的重点是在光栅设备上显示图形GDI函数(约几百个) 从功能上分为几大类: 1.取得(或者建立)和释放(或者清除)设备描述表的函数。 2.取得有关设备描述表信息的函数。 3.绘图函数 。 4.设置和取得设备描述表参数的函数。 5.使用GDI对象的函数 。取得设备描述表句柄1.在处理WM_... 阅读全文
posted @ 2014-03-11 23:13 Albert_C 阅读(577) 评论(0) 推荐(0)
摘要:#include LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ;int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow){ static TCHAR szAppName[] = TEXT ("HelloWin") ; HWND hwnd ; MSG msg ; WNDCLASS wndclass ; wndclass.st... 阅读全文
posted @ 2014-03-11 14:19 Albert_C 阅读(238) 评论(0) 推荐(0)
摘要:#include #include"resource.h"LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ;int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow){ static TCHAR szAppName[] = TEXT ("Bricks") ; HWND hwnd ; MSG msg ; WNDCLASS wndclas... 阅读全文
posted @ 2014-03-11 14:19 Albert_C 阅读(956) 评论(0) 推荐(0)
摘要:方法一: 使用stringstreamstringstream在int或float类型转换为string类型的方法中已经介绍过, 这里也能用作将string类型转换为常用的数值类型。#include #include //使用stringstream需要引入这个头文件using namespace std;//模板函数:将string类型变量转换为常用的数值类型(此方法具有普遍适用性)template Type stringToNum(const string& str){ istringstream iss(str); Type num; iss >> num; ... 阅读全文
posted @ 2014-03-03 16:26 Albert_C 阅读(1005) 评论(0) 推荐(0)