DlgFindConditions.cpp
资源名称:GGBT.rar [点击查看]
上传用户:lds876
上传日期:2013-05-25
资源大小:567k
文件大小:2k
源码类别:
P2P编程
开发平台:
Visual C++
- // DlgFindConditions.cpp : implementation file
- //
- #include "stdafx.h"
- #include "testbt.h"
- #include "DlgFindConditions.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CDlgFindConditions dialog
- CDlgFindConditions::CDlgFindConditions(CWnd* pParent /*=NULL*/)
- : CDialog(CDlgFindConditions::IDD, pParent)
- {
- //{{AFX_DATA_INIT(CDlgFindConditions)
- // NOTE: the ClassWizard will add member initialization here
- //}}AFX_DATA_INIT
- }
- void CDlgFindConditions::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CDlgFindConditions)
- DDX_Control(pDX, IDCANCEL, m_btnCancel);
- DDX_Control(pDX, IDOK, m_btnOK);
- DDX_Control(pDX, IDC_COMBOBOX_FIND, m_cbFindCondition);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(CDlgFindConditions, CDialog)
- //{{AFX_MSG_MAP(CDlgFindConditions)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CDlgFindConditions message handlers
- BOOL CDlgFindConditions::OnInitDialog()
- {
- CDialog::OnInitDialog();
- //
- // Create BitmapList
- //
- HBITMAP hbm = (HBITMAP)::LoadImage(AfxGetInstanceHandle(),
- MAKEINTRESOURCE(IDB_BITMAP_DLG_ICONS),
- IMAGE_BITMAP,
- 0,0, // cx,cy
- LR_CREATEDIBSECTION); // | LR_LOADMAP3DCOLORS );
- CBitmap bm;
- bm.Attach(hbm);
- m_ctlImage.Create(16,15, ILC_COLOR8|ILC_MASK, 3, 4);
- m_ctlImage.SetBkColor(RGB(255, 255,255));
- m_ctlImage.Add(&bm, (COLORREF)RGB(255,0,255));
- //
- // set button image.
- //
- // m_btnBrowseDir.Create(m_ctlImage.ExtractIcon(2), true, "选择保存路径");
- m_btnOK.Create(m_ctlImage.ExtractIcon(0));
- m_btnCancel.Create(m_ctlImage.ExtractIcon(1));
- // load DirectorySave history
- m_cbFindCondition.LoadHistory("FindConditions", "Condition");
- m_cbFindCondition.SetFocus();
- return FALSE;
- }
- void CDlgFindConditions::OnOK()
- {
- m_cbFindCondition.GetWindowText(m_strFindCondition);
- if (!m_strFindCondition.IsEmpty())
- {
- m_cbFindCondition.SaveHistory();
- }
- CDialog::OnOK();
- }