Patch level :
Files correlati : Ricompilazione Demo : [ ] Commento : Migliorati controlli sulla chiusura del progrqamma Aggiunti facciotti e pallotoliere git-svn-id: svn://10.65.10.50/trunk@7687 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
82ff5d5694
commit
ecd44500ea
Binary file not shown.
@ -2,7 +2,7 @@
|
||||
|
||||
[General Info]
|
||||
Version=1
|
||||
LastClass=CMainFrame
|
||||
LastClass=CFrontEndView
|
||||
LastTemplate=CDialog
|
||||
NewFileInclude1=#include "stdafx.h"
|
||||
NewFileInclude2=#include "FrontEnd.h"
|
||||
@ -17,10 +17,10 @@ Class4=CMainFrame
|
||||
ResourceCount=3
|
||||
Resource1=IDD_ABOUTBOX
|
||||
Class5=CAboutDlg
|
||||
Resource2=IDD_STATUS
|
||||
Resource2=IDR_MAINFRAME
|
||||
Class6=CStatusDlg
|
||||
Class7=TConnectionsDlg
|
||||
Resource3=IDR_MAINFRAME
|
||||
Resource3=IDD_STATUS
|
||||
|
||||
[CLS:CFrontEndApp]
|
||||
Type=0
|
||||
@ -42,7 +42,7 @@ Type=0
|
||||
HeaderFile=frontvw.h
|
||||
ImplementationFile=frontvw.cpp
|
||||
BaseClass=CTreeView
|
||||
LastObject=CFrontEndView
|
||||
LastObject=ID_VIEW_TRACE
|
||||
Filter=C
|
||||
VirtualFilter=VWC
|
||||
|
||||
@ -146,7 +146,7 @@ Type=1
|
||||
Class=TConnectionsDlg
|
||||
ControlCount=9
|
||||
Control1=IDCANCEL,button,1342242816
|
||||
Control2=IDC_TREE,SysTreeView32,1350631424
|
||||
Control2=IDC_TREE,SysTreeView32,1350631431
|
||||
Control3=IDC_UPDATE,button,1342242816
|
||||
Control4=IDC_STATIC,static,1342308352
|
||||
Control5=IDC_USERS,static,1342312448
|
||||
|
@ -65,8 +65,11 @@ END
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
IDR_LOGTYPE ICON DISCARDABLE "res\\Log.ico"
|
||||
IDR_MAINFRAME ICON DISCARDABLE "res\\Prassi.ico"
|
||||
IDR_LOGTYPE ICON DISCARDABLE "res\\Log.ico"
|
||||
Tree_Computer ICON DISCARDABLE "res\\computer.ico"
|
||||
Tree_User ICON DISCARDABLE "res\\user.ico"
|
||||
Tree_Program ICON DISCARDABLE "res\\program.ico"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@ -177,7 +180,8 @@ CAPTION "Connections"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
PUSHBUTTON "Close",IDCANCEL,210,153,50,14
|
||||
CONTROL "Tree1",IDC_TREE,"SysTreeView32",WS_BORDER | WS_TABSTOP,
|
||||
CONTROL "Tree1",IDC_TREE,"SysTreeView32",TVS_HASBUTTONS |
|
||||
TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP,
|
||||
7,7,195,160
|
||||
PUSHBUTTON "Update Now",IDC_UPDATE,210,7,50,14
|
||||
LTEXT "Connessioni",IDC_STATIC,207,102,53,8
|
||||
|
@ -35,22 +35,12 @@ END_MESSAGE_MAP()
|
||||
|
||||
CFrontEndView::CFrontEndView()
|
||||
{
|
||||
// TODO: add construction code here
|
||||
|
||||
}
|
||||
|
||||
CFrontEndView::~CFrontEndView()
|
||||
{
|
||||
}
|
||||
|
||||
BOOL CFrontEndView::PreCreateWindow(CREATESTRUCT& cs)
|
||||
{
|
||||
// TODO: Modify the Window class or styles here by modifying
|
||||
// the CREATESTRUCT cs
|
||||
|
||||
return CTreeView::PreCreateWindow(cs);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CFrontEndView drawing
|
||||
|
||||
@ -114,4 +104,3 @@ void CFrontEndView::OnUpdateViewTrace(CCmdUI* pCmdUI)
|
||||
{
|
||||
pCmdUI->SetCheck(TracingEnabled());
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,6 @@ public:
|
||||
//{{AFX_VIRTUAL(CFrontEndView)
|
||||
public:
|
||||
virtual void OnDraw(CDC* pDC); // overridden to draw this view
|
||||
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
|
@ -29,7 +29,7 @@
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 135
|
||||
#define _APS_NEXT_RESOURCE_VALUE 139
|
||||
#define _APS_NEXT_COMMAND_VALUE 32779
|
||||
#define _APS_NEXT_CONTROL_VALUE 1013
|
||||
#define _APS_NEXT_SYMED_VALUE 105
|
||||
|
@ -59,8 +59,9 @@ static int add_to_tree(TConnection& rConnection, void* pJolly)
|
||||
if (tree.GetItemText(hPeer) == conn.PeerName())
|
||||
break;
|
||||
}
|
||||
|
||||
if (!hPeer)
|
||||
hPeer = tree.InsertItem(conn.PeerName());
|
||||
hPeer = tree.InsertItem(conn.PeerName(), 0, 0);
|
||||
|
||||
for (HTREEITEM hUser = tree.GetChildItem(hPeer); hUser;
|
||||
hUser = tree.GetNextSiblingItem(hUser))
|
||||
@ -71,13 +72,13 @@ static int add_to_tree(TConnection& rConnection, void* pJolly)
|
||||
if (!hUser)
|
||||
{
|
||||
BOOL bNewPeer = !tree.ItemHasChildren(hPeer);
|
||||
hUser = tree.InsertItem(conn.User(), hPeer);
|
||||
hUser = tree.InsertItem(conn.User(), 1, 1, hPeer);
|
||||
if (bNewPeer)
|
||||
tree.Expand(hPeer, TVE_EXPAND);
|
||||
}
|
||||
|
||||
BOOL bNewUser = !tree.ItemHasChildren(hUser);
|
||||
HTREEITEM hApp = tree.InsertItem(conn.Application(), hUser);
|
||||
HTREEITEM hApp = tree.InsertItem(conn.Application(), 2, 2, hUser);
|
||||
if (hApp) tree.SetItemData(hApp, conn.Id());
|
||||
|
||||
if (bNewUser)
|
||||
@ -104,11 +105,17 @@ BOOL TConnectionsDlg::OnInitDialog()
|
||||
{
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
HINSTANCE hInst = AfxGetResourceHandle();
|
||||
m_Images.Create(24, 24, ILC_MASK, 3, 0);
|
||||
m_Images.Add(::LoadIcon(hInst, "Tree_Computer"));
|
||||
m_Images.Add(::LoadIcon(hInst, "Tree_User"));
|
||||
m_Images.Add(::LoadIcon(hInst, "Tree_Program"));
|
||||
m_tree.SetImageList(&m_Images,TVSIL_NORMAL);
|
||||
|
||||
UpdateStatus();
|
||||
m_nTimerId = SetTimer(1, 10000, NULL); // Ogni dieci secondi
|
||||
|
||||
return TRUE; // return TRUE unless you set the focus to a control
|
||||
// EXCEPTION: OCX Property Pages should return FALSE
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void TConnectionsDlg::OnClose()
|
||||
|
@ -45,6 +45,7 @@ protected:
|
||||
DECLARE_MESSAGE_MAP()
|
||||
|
||||
private:
|
||||
CImageList m_Images;
|
||||
UINT m_nTimerId;
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user