原创 MFC DLL技巧

MFC DLL嚮導(二)(使用接口類,使用創建和銷燬類的靜態函數)   使用DLL的一個比較嚴重的問題就是編譯器之間的兼容性問題。不同的編譯器對c++函數在二進制級別的實現方式是不同的。所以對基於C++的DLL,如果編譯器不同就有很麻煩的

原创 16進制字符串轉換成int型

// Char16ToInt.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> us

原创 圖片透明函數的實現MyTransparentBlt

bool MyTransparentBlt(HDC backDC,int x1,int y1,int w1,int h1,HDC foreDC,int x2,int y2,int w2,int h2,UINT TransColor){ H

原创 繪製透明圖片GDI和GDI+結合

hdc = BeginPaint(hWnd, &ps);    RECT rt;    GetClientRect(hWnd, &rt);    HDC hdcClient = GetDC(hWnd);    HDC hdcDraw =

原创 加密解密算法1

int Password(const char* str){ FILE* pf = NULL; pf = fopen(str,"rb"); if (pf == NULL) {  return 0; } char buf[MAX_BUFFE

原创 ImageFromIDResource

bool ImageFromIDResource(UINT nID, LPCTSTR sTR,Bitmap * &pImg) {     HINSTANCE hInst = AfxGetResourceHandle();     HRS

原创 CListCtrlCl::DrawItem

void CListCtrlCl::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) { TCHAR lpBuffer[256]; LV_ITEM lvi; lvi.mask = LVIF_TEXT

原创 CopyBitmap

HBITMAP CopyBitmap( HBITMAP hbm) {    HDC hdcSrc = CreateCompatibleDC(NULL);    HDC hdcDst = CreateCompatibleDC(NULL); 

原创 屏幕截圖軟件說明

 屏幕截圖軟件源碼1.0運行本程序:按Alt+A鍵啓動截屏鼠標左鍵按下拖動開始選擇截屏區域鼠標右鍵點擊將保存截圖到程序目錄,並可以從剪貼板複製粘貼圖片