摘要:#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
阅读全文
摘要:知识点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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要:#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 ){...
阅读全文
摘要:理解关键一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-
阅读全文
摘要:#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
阅读全文