SourceCodeSky QQ客服 SourceCodeSky 400电话 客服电话 暂无
首页 » 源代码 » 虚拟桌面 » /property.cpp

property.cpp ( 文件浏览 )

文件源自: 虚拟桌面
  • keepall 发布于 2016-08-28 09:36
  • 浏览次数:333
  • 下载次数: 2
  • 下载需 10 积分
  • 侵权举报
/* 
   File: property.cpp - Implementation of the Property dialog.

   Implements the ZDDesk property dialog.  This dialog allows the user to
   configure the number of virtual desktops and to name each desktop.

   Author: Steven E. Sipe
   
*/

#include "stdafx.h"
#include "zddesk.h"
#include "frame.h"
#include "property.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CZDDeskProperties dialog


// Constructor
CZDDeskProperties::CZDDeskProperties(CZDDeskFrame *pFrame, CWnd* pParent /*=NULL*/)
   : CDialog(CZDDeskProperties::IDD, pParent)
{
   //{{AFX_DATA_INIT(CZDDeskProperties)
      // NOTE: the ClassWizard will add member initialization here
   //}}AFX_DATA_INIT

   // Save the frame pointer
   m_pFrame = pFrame;
}

// Binds the class data members to the dialog's controls
void CZDDeskProperties::DoDataExchange(CDataExchange* pDX)
{
   CDialog::DoDataExchange(pDX);
   //{{AFX_DATA_MAP(CZDDeskProperties)
   DDX_Control(pDX, IDC_SPIN, m_Spin);
   DDX_Control(pDX, IDC_DESKCOUNT, m_DeskCount);
   //}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CZDDeskProperties, CDialog)
   //{{AFX_MSG_MAP(CZDDeskProperties)
   ON_BN_CLICKED(IDC_HELPBTN, OnHelpBtn)
   //}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CZDDeskProperties message handlers

// Handles dialog initialization -- Loads the desk name fields and sets the spin
// control to the number of configured desks
BOOL CZDDeskProperties::OnInitDialog() 
{
   // Call the base class
   CDialog::OnInitDialog();

   // Set the current number of desks and set the spin control range: 2 - MAX_DESKS
   m_Spin.SetPos(m_pFrame->m_nDeskCount);
   m_Spin.SetRange(2,CZDDeskFrame::MAX_DESKS);

   CEdit *pEdit;
   for(int i = 0; i < CZDDeskFrame::MAX_DESKS; i++)
   {
      // Load the edit control with the desk name
      SetDlgItemText(IDC_NAME1+i,m_pFrame->m_arrStrDeskName[i]);
      pEdit = (CEdit *) GetDlgItem(IDC_NAME1+i);

      // Limit the desk name
      if(pEdit)
         pEdit->LimitText(CZDDeskFrame::MAX_NAME);
   }
   
   return TRUE;  // return TRUE unless you set the focus to a control
                 // EXCEPTION: OCX Property Pages should return FALSE
}

// Handles the OK button -- does some error checking for the number of
// desks then saves the number and desktop names
void CZDDeskProperties::OnOK() 
{
   // Get the number of desks
   int nNewDeskCount = m_Spin.GetPos();

   // Reducing the number of desks...
   if(nNewDeskCount < m_pFrame->m_nDeskCount)
   {
      // Can't remove the current desk
      if(nNewDeskCount <= m_pFrame->m_nCurrDesk)
      {
         // Display an error message
         AfxMessageBox(IDS_DESK_CANTREMOVE,MB_ICONWARNING|MB_OK);
         return;
      }

      // Get the number of glue[!==More==!]			
...
展开> <收缩

下载源码到电脑,阅读使用更方便

1 积分

快速下载
还剩0行未阅读,继续阅读
免费下载源码
Sponsored links

源码文件列表

温馨提示: 点击源码文件名可预览文件内容哦 ^_^
...
名称 大小 修改日期
/registry.cpp 3.17 KB 1997-06-30 21:14:32
/property.cpp 4.19 KB 1997-06-30 21:14:32
/arrange.cpp 11.46 KB 1997-06-30 21:14:32
/zddesk.dsp 6.86 KB 1997-05-29 09:39:32
/zddesk.aps 71.35 KB 1997-06-30 21:24:34
/zddesk.rc 10.53 KB 1997-06-30 21:24:34
/resource.h 3.14 KB 1997-06-30 21:14:36
/frame.h 4.61 KB 1997-06-30 21:14:36
/arrange.h 2.16 KB 1997-06-30 21:14:36
/tray.h 1.20 KB 1997-06-30 21:14:36
/registry.h 913 Bytes 1997-06-30 21:14:36
/property.h 1.32 KB 1997-06-30 21:14:36
/zddesk.mak 9.55 KB 1997-06-11 23:49:46
/zddesk.mdp 36.00 KB 1997-06-25 22:26:02
/zddesk.clw 3.26 KB 1997-06-30 21:21:12
/zddesk.dsw 535 Bytes 1997-05-12 20:15:20
/zddesk.plg 1.65 KB 1997-06-02 09:38:16
/splash.h 1.17 KB 1997-06-30 21:14:36
/debug/ 0 Bytes 1997-05-26 17:03:26
/release/ 0 Bytes 1997-05-26 17:03:26
/res/ 0 Bytes 1997-05-26 17:03:26
/stdafx.h 471 Bytes 1997-06-30 21:14:36
/splash.cpp 3.30 KB 1997-06-30 21:14:32
/stdafx.cpp 208 Bytes 1997-06-30 21:14:32
/tray.cpp 2.60 KB 1997-06-30 21:14:32
/frame.cpp 20.43 KB 1997-06-30 21:14:32
/zddesk.h 2.08 KB 1997-06-30 21:14:36
/zddesk.cpp 5.66 KB 1997-06-30 21:14:32
/res/zddesk5.ico 1.05 KB 1997-05-02 22:48:26
/res/zddesk4.ico 1.05 KB 1997-05-02 22:56:50
/res/zddesk3.ico 1.05 KB 1997-05-02 22:43:30
/res/zddesk2.ico 1.05 KB 1997-05-02 22:56:50
/res/zddesk1.ico 1.05 KB 1997-05-02 22:56:50
/res/zddesk9.ico 1.05 KB 1997-05-02 22:55:12
/res/zddesk8.ico 1.05 KB 1997-05-02 22:53:34
/res/zddesk7.ico 1.05 KB 1997-05-02 22:51:36
/res/zddesk6.ico 1.05 KB 1997-05-02 22:49:50
/res/zddesk.ico 1.05 KB 1997-06-11 23:36:14
/res/list.bmp 358 Bytes 1997-05-01 00:39:54
/res/splsh16.bmp 18.09 KB 1997-06-30 21:24:34
/res/zddesk.rc2 397 Bytes 1997-01-30 11:35:14
/res/nodrop.cur 326 Bytes 1997-05-02 22:00:26
/res/drop.cur 326 Bytes 1997-05-02 22:00:26
Sponsored links
正在加载中……

Switch to the English version?

Yes
SourceCodeSky 英文版
No
SourceCodeSky 中文版

完善个人资料,获价值¥30元积分奖励!