摘要:
操作方法private:CBitmap m_bitmap;BOOL CModify::OnInitDialog(){if(!CDialog::OnInitDialog()){return FALSE;}m_bitmap.LoadBitmap(IDB_BITMAP_MODIFY);return TRUE;}void CModify::OnPaint(){CPaintDC dc(this);CRect rect;GetClientRect(&rect);if(m_bitmap.GetSafeHandle()){DrawTransparentBitmap( dc.GetSafeHdc(), 阅读全文
摘要:
#include "stdafx.h"#include "resource.h"void DrawTransparentBitmap(HDC hdc,HBITMAP hBitmap, int xStart, int yStart,int xBitmap, int yBitmap, int xWidth, int yHeight,COLORREF cTransparentColor){ COLORREF cColor; HBITMAP bmAndBack, bmAndObject, bmAndMem, bmSave; HBITMAP bmBackOld, 阅读全文
摘要:
#include <afxwin.h>#include <afxdb.h>int _tmain(int argc,TCHAR *argv[],TCHAR *envp[]){AfxWinInit(GetModuleHandle(NULL),NULL,GetCommandLine(),0);CDatabase db;try{db.OpenEx("DSN=user1;",CDatabase::noOdbcDialog);}catch(CDBException *pDBEx){pDBEx->ReportError();}catch(CMemoryExc 阅读全文