摘要: HBRUSH CLogindlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor){if( CTLCOLOR_STATIC == nCtlColor && pDC ){pDC->SetBkColor( SPLASH_BKCOLOR );pDC->SetTextColor( SPLASH_TEXTCOLOR );}if( NULL == m_brushBK.GetSafeHandle() )m_brushBK.CreateSolidBrush( SPLASH_BKCOLOR );HBRUSH hbr = (HBRUSH 阅读全文
posted @ 2013-02-26 12:32 中国男孩 阅读(123) 评论(0) 推荐(0) 编辑
摘要: #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, 阅读全文
posted @ 2013-02-26 12:31 中国男孩 阅读(176) 评论(0) 推荐(0) 编辑
摘要: class CLearn18Dlg : public CDialog{// 构造public:CLearn18Dlg(CWnd* pParent = NULL);// 标准构造函数// 对话框数据enum { IDD = IDD_LEARN18_DIALOG };protected:virtual void DoDataExchange(CDataExchange* pDX);// DDX/DDV 支持public:virtual void OnOK();virtual void OnCancel();// 实现protected:HICON m_hIcon;// 生成的消息映射函数virtu 阅读全文
posted @ 2013-02-26 12:31 中国男孩 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 操作方法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(), 阅读全文
posted @ 2013-02-26 12:29 中国男孩 阅读(156) 评论(0) 推荐(0) 编辑
摘要: #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, 阅读全文
posted @ 2013-02-26 12:28 中国男孩 阅读(249) 评论(0) 推荐(0) 编辑
摘要: #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 阅读全文
posted @ 2013-02-26 12:28 中国男孩 阅读(294) 评论(0) 推荐(0) 编辑