Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
MdDlg.cpp
Package: ebd_src.zip [view]
Upload User: kelijie
Upload Date: 2007-01-01
Package Size: 123k
Code Size: 3k
Category:
Graph program
Development Platform:
Visual C++
- // MdDlg.cpp : implementation file
- //
- #include "stdafx.h"
- #include "main.h"
- #include "MdDlg.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CModuleDlg dialog
- CModuleDlg::CModuleDlg(CWnd* pParent /*=NULL*/)
- : CDialog(CModuleDlg::IDD, pParent)
- {
- //{{AFX_DATA_INIT(CModuleDlg)
- // NOTE: the ClassWizard will add member initialization here
- //}}AFX_DATA_INIT
- m_ListInfo.RemoveAll();
- }
- CModuleDlg::~CModuleDlg()
- {
- m_ListInfo.RemoveAll();
- m_ListInfo.FreeExtra();
- }
- void CModuleDlg::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CModuleDlg)
- DDX_Control(pDX, IDC_MODULLIST, m_WindowList);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(CModuleDlg, CDialog)
- //{{AFX_MSG_MAP(CModuleDlg)
- ON_LBN_DBLCLK(IDC_MODULLIST, OnDblclkModullist)
- ON_BN_CLICKED(IDC_SETTING, OnSetting)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CModuleDlg message handlers
- void CModuleDlg::SetListData(CString name, WNDINFO wInfo)
- {
- static CInfo* temp = NULL;
- temp = new CInfo;
- temp->m_wInfo.m_iID = wInfo.m_iID;
- temp->m_wInfo.m_iPin = wInfo.m_iPin;
- temp->m_nickname = name;
- m_ListInfo.Add(temp);
- }
- void CModuleDlg::OnDblclkModullist()
- {
- // TODO: Add your control notification handler code here
- OnOK();
- }
- void CModuleDlg::OnSetting()
- {
- // TODO: Add your control notification handler code here
- OnOK();
- }
- void CModuleDlg::OnOK()
- {
- // TODO: Add extra validation here
- int lsel = m_WindowList.GetCurSel();
- if(lsel != LB_ERR)
- {
- m_wInfo.m_iID = m_ListInfo[lsel]->m_wInfo.m_iID;
- m_wInfo.m_iPin = m_ListInfo[lsel]->m_wInfo.m_iPin;
- CDialog::OnOK();
- return;
- }
- CDialog::OnCancel();
- }
- BOOL CModuleDlg::OnInitDialog()
- {
- CDialog::OnInitDialog();
- // TODO: Add extra initialization here
- SetActiveWindow();
- for(int i = 0; i < m_ListInfo.GetSize(); i++)
- {
- m_WindowList.InsertString(i, m_ListInfo[i]->m_nickname);
- }
- m_WindowList.SetCurSel(0);
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
- }
- BOOL CModuleDlg::PreCreateWindow(CREATESTRUCT& cs)
- {
- // TODO: Add your specialized code here and/or call the base class
- cs.dwExStyle = WS_EX_TOPMOST;
- return CDialog::PreCreateWindow(cs);
- }