home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / winfe / dlghtmrp.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  3.1 KB  |  112 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18.  
  19. // dlghtmrp.h : header file
  20. //
  21.  
  22. /////////////////////////////////////////////////////////////////////////////
  23. // CHtmlRecipientsDlg dialog
  24.  
  25. #ifndef __dlghtmrp__
  26. #define __dlghtmrp__
  27.  
  28. //Recipients List box:  We need to due extra sorting on the data we display
  29. //so we are having to do an ownerdraw list box.
  30.  
  31. class CListBoxRecipients : public CListBox
  32. {
  33. public:
  34.     int    m_iPosIndex;
  35.     int m_iPosName;
  36.     int m_iPosStatus;
  37.  
  38. protected:
  39.     virtual int CompareItem( LPCOMPAREITEMSTRUCT lpCompareItemStruct);
  40.     virtual void DeleteItem( LPDELETEITEMSTRUCT lpDeleteItemStruct);
  41.  
  42.     virtual void DrawItem( LPDRAWITEMSTRUCT lpDrawItemStruct );
  43.  
  44.     virtual void MeasureItem( LPMEASUREITEMSTRUCT lpMeasureItemStruct )
  45.     {
  46.             lpMeasureItemStruct->itemHeight = 16;
  47.     }
  48.  
  49. public:
  50.     CListBoxRecipients();
  51.  
  52.     void SetColumnPositions(int iPosIndex, int iPosName, int iPosStatus);
  53. };
  54.  
  55.  
  56.  
  57. //Recipients Dialog class
  58.  
  59. class CHtmlRecipientsDlg : public CDialog
  60. {
  61. // Construction
  62. public:
  63.     CHtmlRecipientsDlg(MSG_Pane* pComposePane,
  64.                        MSG_RecipientList* nohtml,
  65.                        MSG_RecipientList* htmlok,
  66.                        CWnd* pParent = NULL);   // standard constructor
  67.  
  68. // Dialog Data
  69.     //{{AFX_DATA(CHtmlRecipientsDlg)
  70.     enum { IDD = IDD_HTML_RECIPIENTS };
  71.         // NOTE: the ClassWizard will add data members here
  72.     //}}AFX_DATA
  73.     MSG_Pane* m_pComposePane;
  74.     MSG_RecipientList *m_pNoHtml;
  75.     MSG_RecipientList *m_pHtmlOk;
  76.  
  77.     CListBoxRecipients m_ListBox1; //Doesn't prefer HTML list
  78.     CListBoxRecipients m_ListBox2; //Pefers HTML list
  79.  
  80.  
  81. // Overrides
  82.     // ClassWizard generated virtual function overrides
  83.     //{{AFX_VIRTUAL(CHtmlRecipientsDlg)
  84.     protected:
  85.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  86.     //}}AFX_VIRTUAL
  87.  
  88. // Implementation
  89. protected:
  90.     BOOL PopulateLists();
  91.  
  92.     // Generated message map functions
  93.     //{{AFX_MSG(CHtmlRecipientsDlg)
  94.     virtual void OnOK();
  95.     virtual void OnCancel();
  96.     afx_msg void OnHelp();
  97.     afx_msg void OnBtnAdd();
  98.     afx_msg void OnBtnRemove();
  99.     virtual BOOL OnInitDialog();
  100.     afx_msg void OnSetfocusList1();
  101.     afx_msg void OnSetfocusList2();
  102.     //}}AFX_MSG
  103.     DECLARE_MESSAGE_MAP()
  104. };
  105.  
  106. //Used to launch the dialog when passed in as a callback
  107. int CreateRecipientsDialog(MSG_Pane* composepane, void* closure,
  108.                                   MSG_RecipientList* nohtml,
  109.                                   MSG_RecipientList* htmlok,void *pWnd);
  110.  
  111. #endif
  112.