摘要: 工作环境:WIN7,VS2005:最近一个项目中,程序退出后,每次都出现内存泄漏,每次退出的时候泄露的内存块都是1654,1650。Detected memory leaks!Dumping objects ->{1654} normal block at 0x01CC1B28, 40 bytes long. Data: 54 00 69 00 63 00 6B 00 65 00 74 00 20 00 69 00 {1650} normal block at 0x01CC1BF0, 16 bytes long. Data: 64 6B E8 95 68 79 0D 4E FD 80 7 阅读全文
posted @ 2012-02-08 11:46 夜雨無聲 阅读(193) 评论(0) 推荐(0) 编辑
摘要: headerctrl.hpp#ifndef headerctrlH#define headerctrlH#include <Windows.h>#include <commctrl.h>#include <assert.h>//#pragma comment (lib, "comctl32.lib")namespace NSTS {class CHeaderCtrl {public: CHeaderCtrl (void) { m_hSelf = NULL; m_hInst = NULL;}; ~CHeaderCtrl (void) {}; 阅读全文
posted @ 2012-02-06 09:58 夜雨無聲 阅读(496) 评论(0) 推荐(0) 编辑
摘要: propertysheet.hpp#ifndef propertysheetH#define propertysheetH#include <windows.h>#include <commctrl.h>#include <assert.h>#include <vector>#pragma comment (lib, "comctl32.lib")namespace NSTS {#define WIZARD_NONE 0#define WIZARD_HEADERTITLE 1#define WIZARD_WATERMARK 2 阅读全文
posted @ 2012-02-06 09:54 夜雨無聲 阅读(662) 评论(0) 推荐(0) 编辑
摘要: listviewctrl.hpp#ifndef listviewctrlH#define listviewctrlH#include <windows.h>#include <commctrl.h>#pragma comment (lib, "ws2_32.lib")namespace NSTS {enum EListViewType { eListViewIcon = LVS_ICON, eListViewList = LVS_LIST, eListViewSmallIcon = LVS_SMALLICON, ... 阅读全文
posted @ 2012-02-01 17:45 夜雨無聲 阅读(486) 评论(0) 推荐(0) 编辑
摘要: ipaddressctrl.hpp#ifndef ipaddressctrlH#define ipaddressctrlHnamespace NSTS {#include <windows.h>#include <commctrl.h>#include <string.h>//#include <winsock2.h>#pragma comment (lib, "ws2_32.lib")#pragma comment (lib, "comctl32.lib")class CIpAddressCtrl {#d 阅读全文
posted @ 2012-01-31 00:54 夜雨無聲 阅读(1929) 评论(0) 推荐(0) 编辑
摘要: SHIT--Usage:NSTS::CProgressBar g_pb;NSTS::CProgressBar g_pb2;WM_INITDIALOG:RECT rcpb = { 0, 0, 100, 20 };assert (g_pb.Init (hInst, hwndDlg, &rcpb));assert (g_pb2.Attach (GetDlgItem (hwndDlg, IDC_PROGRESS1)));assert (g_pb2.SetStep (5));// 背景颜色assert (g_pb2.SetBkColor (RGB (128, 128, 255)));// 进度条 阅读全文
posted @ 2012-01-28 01:47 夜雨無聲 阅读(740) 评论(0) 推荐(0) 编辑
摘要: Tooltips.hpp#ifndef tooltipsH#define tooltipsH#include <commctrl.h>#include <windows.h>namespace NSTS {struct ToolTipsItem{ HWND hwnd; TCHAR* pszTip;};class CToolTips {public: CToolTips (void) { m_hSelf = NULL; m_hInst = NULL; }; ~CToolTips (void) { Destroy ... 阅读全文
posted @ 2012-01-18 15:48 夜雨無聲 阅读(598) 评论(0) 推荐(0) 编辑
摘要: toolbar.hpp#ifndef toolbarH#define toolbarH#include <commctrl.h>#include <windows.h>#include <vector>using std::vector;namespace NSTS {struct ToolBarButton { UINT uCmdId; int iIconSize; int iColor; UINT uDefaultIconId; UINT uHotIconId; UINT uDisableIconId;... 阅读全文
posted @ 2012-01-18 14:58 夜雨無聲 阅读(435) 评论(0) 推荐(0) 编辑
摘要: statusbar.hpp#ifndef statusbarH#define statusbarH#include <Windows.h>#include <list>namespace NSTS {class CStatusBar {public: CStatusBar (void); ~CStatusBar (void); public: bool Init (HWND hParent, int iSize, int agiParts[], HINSTANCE hInst); void Destroy (void); bool ... 阅读全文
posted @ 2012-01-09 15:54 夜雨無聲 阅读(414) 评论(0) 推荐(0) 编辑
摘要: SaveDC (HDC hdc);保存设备上下文栈上。它的目的是,在不改变设备上下文的情况下,对HDC进行其它的操作,当这些操作完成后,再对HDC进行恢复。RestoreDC (HDC hdc, int id) 则是从设备上下文栈中对HDC进行恢复。典型的用法是:voidGraphics::Draw (HDC hdc) { SaveDC (hdc);TextOut (hdc, ....); /** do more things */RestoreDC (hdc, -1);}如上函数,在进入Draw函数中时进行SaveDC, 退出时RestoreDC。这样,不论外面怎么调用Draw函数,它总能保 阅读全文
posted @ 2011-12-27 09:21 夜雨無聲 阅读(3610) 评论(0) 推荐(0) 编辑