随笔分类 -  Windows程序设计

翻转数字
摘要:#include<stdio.h>#include <queue>using namespace std;int reverse(int num) { //write your code here queue<int>temp; int res=0; while(num!=num%10) { temp.push(num%10); num/=10; } num=num%10; temp.push(num); int queue_size=temp.size(); for (int i=0;i<queue_size-1;i++) { int pop=tem 阅读全文

posted @ 2013-06-18 20:45 奔跑吧,蜗牛! 阅读(256) 评论(0) 推荐(0) 编辑

关于std::vector<std::string>的操作
摘要:知识点1 std::vector<std::string>作为返回参数void GetConfigState(std::vector<std::string>&vtTemp)2 对于std::vector<std::string>取值操作std::vector<std::string>::iterator theIterator;for( theIterator = vtTemp.begin(); theIterator != vtTemp.end(); theIterator++ ) cout<<theIterator-&g 阅读全文

posted @ 2013-06-05 11:48 奔跑吧,蜗牛! 阅读(9369) 评论(0) 推荐(0) 编辑

GetObject 得 指定图形对象的信息
摘要:GetObject该函数得到指定图形对象的信息,根据图形对象,函数把填充的BITMAP,DIBSECTION,LOGBRUSH,LOGFONT, 或LOGPEN结构体放入一个指定的缓冲区。原型:int GetObject(HGDIOBJhgdiobj,intcbBuffer,LPVOIDlpvObject);参数:hgdiobj:[in] 图形对象句柄。 可以是a logical bitmap, a brush, a font, a palette, a pen, 或者调用CreateDIBSection生成的DIB。cbBuffer: [in] 指定将要写到缓冲中的信息的字节数lpvObje 阅读全文

posted @ 2013-06-04 13:39 奔跑吧,蜗牛! 阅读(383) 评论(0) 推荐(0) 编辑

GetSysColor()函数可以得到系统的颜色
摘要:GetSysColor()函数可以得到系统的颜色符号 含义COLOR_3DLIGHT 以亮色显示时立体元件的颜色COLOR_3DSHADOW 立体元件的阴影颜色COLOR_BTNSHADOW 按钮阴影颜色COLOR_ACTIVEBORDER 边界颜色COLOR_ACTIVECAPTION 标题颜色COLOR_BACKGROUND 背景颜色COLOR_BTNTEXT 按钮颜色COLOR_CAPTIONTEXT 窗口拦字符颜色COLOR_GRAYTEXT 灰色显示的文本的颜色COLOR_DESKTOP 桌面的颜色COLOR_HIGHLIGHT 选定项的背景颜色COLOR_HEGHLIGHTTEXT 阅读全文

posted @ 2013-06-04 10:11 奔跑吧,蜗牛! 阅读(574) 评论(0) 推荐(0) 编辑

Scroll2
摘要:#include <Windows.h>#include <stdio.h>#include "resource.h"//#include <afxwin.h>LRESULT CALLBACK MyWindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam ); int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd ){... 阅读全文

posted @ 2013-05-30 12:47 奔跑吧,蜗牛! 阅读(157) 评论(0) 推荐(0) 编辑

Windows Scroll Note
摘要:理解关键一iPaintBeg=max(0,iVertPos+ps.rcPaint.top/cyChar);iPaintEnd=min(iVertPos+ps.rcPaint.bottom/cyChar,LINENUMBERS-1);iVertPos是当前滚动条位置,那么开始绘制的地方就应该是滚动条所在的位置,对应到要显示的整个区域的位置也是这个iVertPos,后面的top可以去掉,因为显示区top等于0。绘制结束的地方应该是iVertPos加上绘制区的高度。这些都需要在显示屏后面的整个显示范围上看,以绘制区为尺度。理解关键二x=cxChar*(1-iHorzPos);y=cyChar*(i- 阅读全文

posted @ 2013-05-30 10:05 奔跑吧,蜗牛! 阅读(208) 评论(0) 推荐(0) 编辑

Scroll
摘要:#include <Windows.h>#include <stdio.h>#include "resource.h"//#include <afxwin.h>LRESULT CALLBACK MyWindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam ); int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd ){ HWND hwn 阅读全文

posted @ 2013-05-29 14:45 奔跑吧,蜗牛! 阅读(191) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示