摘要:#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
阅读全文
摘要:/***============================================================================= ======== D C U t i l i t y ======== ...
阅读全文
摘要:【函数】LoadImage【操作系统】Win9x:YWinNT:Y【声明】Function ulong LoadImage(ulong hInst,ref string lpsz,ulong un1,ulong n1,ulong n2,ulong un2) LIBRARY "user32.dll" ALIAS FOR "LoadImageA"【说明】 载入一个位图、图标或指针 函数功能:该函数装载目标,光标,或位图。 函数原型:HANDLE LoadImage(NINSTANCE hinst,LPCTSTR lpszName,UINT uType,int
阅读全文
摘要:知识点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
阅读全文
摘要:1 对于未定义的风格进行自定义 #define WS_EX_LAYERED 0x00080000 #define LWA_COLORKEY 0x000000012 动态链接函数typedefBOOL(WINAPI *PFN_SETLAYEREDWINDOWATTRIBUTES)( HWND hwnd, COLORREF crKey, BYTE bAlpha, DWORD dwFlags);PFN_SETLAYEREDWINDOWATTRIBUTES SetLayeredWindowAttributes = NULL;HMODULE m_hUser32 = LoadLibrary(_T(&quo
阅读全文
摘要:#include <windows.h>#include <WinUser.h>#include <stdio.h>//#include "resource.h"//#include <afxwin.h>#include <math.h>#define TWO_PI (2.0*3.1415926) #define WS_EX_LAYERED 0x00080000 #define LWA_COLORKEY 0x00000001LRESULT CALLBACK MyWindowProc( HWND hwnd, UINT
阅读全文
摘要: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
阅读全文
摘要:#include <Windows.h>#include <stdio.h>//#include "resource.h"//#include <afxwin.h>#include <math.h>#define TWO_PI (2.0*3.1415926)LRESULT CALLBACK MyWindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam ); void DrawRectangle(HWND hwnd);int cxClient...
阅读全文
摘要:LOGFONT是Windows内部字体的逻辑结构,主要用于设置字体格式,其定义如下:typedef struct tagLOGFONTA{LONGlfHeight;LONGlfWidth;LONGlfEscapement;LONGlfOrientation;LONGlfWeight;BYTElfItalic;BYTElfUnderline;BYTElfStrikeOut;BYTElfCharSet;BYTElfOutPrecision;BYTElfClipPrecision;BYTElfQuality;BYTElfPitchAndFamily;CHARlfFaceName[LF_FACESIZ
阅读全文
摘要:SetBkColor是背景颜色,SetBkMode是背景模式。SetBkMode(hdc,TRANSPARENT);This function sets the background mix mode of the specified device context. The background mix mode is used with text, hatched brushes, and with non-solid pen styles.这个函数设置指定设备上下文的背景混合模式,背景混合模式被用于文本,阴影画刷,和non-solid pen风格(勉强翻译,见笑了)int SetBkMod
阅读全文
摘要: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>#include <math.h>#define TWO_PI (2.0*3.1415926)LRESULT CALLBACK MyWindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam ); void DrawRectangle(HWND hwnd);int cxClient...
阅读全文