1 /* Copyright 2000, International Business Machines Corporation and others.
4 This software has been released under the terms of the IBM Public
5 License. For details, see the LICENSE file in the top-level source
6 directory or online at http://www.openafs.org/dl/license10.html
8 // Datalog.cpp : implementation file
12 #include "WinAfsLoad.h"
13 #include "WinAfsLoadDlg.h"
19 static char THIS_FILE[] = __FILE__;
22 /////////////////////////////////////////////////////////////////////////////
26 CDatalog::CDatalog(CWnd* pParent /*=NULL*/)
27 : CDialog(CDatalog::IDD, pParent)
29 //{{AFX_DATA_INIT(CDatalog)
36 void CDatalog::DoDataExchange(CDataExchange* pDX)
38 CDialog::DoDataExchange(pDX);
39 //{{AFX_DATA_MAP(CDatalog)
40 DDX_Control(pDX, IDC_EDIT, m_cEdit);
41 DDX_Text(pDX, IDC_EDIT, m_sEdit);
46 BEGIN_MESSAGE_MAP(CDatalog, CDialog)
47 //{{AFX_MSG_MAP(CDatalog)
52 /////////////////////////////////////////////////////////////////////////////
53 // CDatalog message handlers
55 void CDatalog::PostNcDestroy()
57 // TODO: Add your specialized code here and/or call the base class
62 BOOL CDatalog::Create()
64 return CDialog::Create(IDD, m_pParent);
67 void CDatalog::OnCancel()
73 BOOL CDatalog::OnInitDialog()
75 CDialog::OnInitDialog();
77 // TODO: Add extra initialization here
79 CMenu* pSysMenu = GetSystemMenu(FALSE);
83 strAboutMenu.LoadString(IDM_CLEAR);
84 if (!strAboutMenu.IsEmpty())
86 pSysMenu->AppendMenu(MF_SEPARATOR);
87 pSysMenu->AppendMenu(MF_STRING, IDM_CLEAR, strAboutMenu);
90 return TRUE; // return TRUE unless you set the focus to a control
91 // EXCEPTION: OCX Property Pages should return FALSE
96 // Responds to system menu calls (best make menu mod 16 value because lower 4 bits are used by os
97 // Select Menu item on system menu (title bar) will end up here
98 void CDatalog::OnSysCommand(UINT nID, LPARAM lParam)
100 switch (nID & 0xFFF0)
102 case IDM_VISIBLE: // make current application visible
103 AfxGetApp()->m_pMainWnd->PostMessage(WM_COMMAND,IDM_APP_OPEN,0);
106 CWnd *PrevCWnd, *ChildCWnd;
107 PrevCWnd=CWnd::FromHandle(m_hAfsDialog);
108 DWORD s=PrevCWnd->GetStyle();
109 if (!(WS_VISIBLE & s) )
110 PrevCWnd->ShowWindow(SW_RESTORE); // If iconic, restore the main window
111 ChildCWnd=PrevCWnd->GetLastActivePopup(); // if so, does it have any popups?
112 PrevCWnd->BringWindowToTop(); // Bring the main window to the top
113 if (PrevCWnd != ChildCWnd)
114 ChildCWnd->BringWindowToTop(); // If there are popups, bring them along too!
121 SendMessage(WM_PAINT);
125 CDialog::OnSysCommand(nID, lParam);