summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--PumpKINDlg.cpp84
-rw-r--r--PumpKINDlg.h13
-rw-r--r--help/pumpkin.rtf1
-rw-r--r--help/pumpkin.xml1
-rw-r--r--pumpkin.clw12
-rw-r--r--pumpkin.mak76
-rw-r--r--pumpkin.rc10
7 files changed, 124 insertions, 73 deletions
diff --git a/PumpKINDlg.cpp b/PumpKINDlg.cpp
index 4cb1633..9786ef0 100644
--- a/PumpKINDlg.cpp
+++ b/PumpKINDlg.cpp
@@ -131,2 +131,6 @@ void CPumpKINDlg::DoDataExchange(CDataExchange* pDX)
//{{AFX_DATA_MAP(CPumpKINDlg)
+ DDX_Control(pDX, ID_HELP, m_HelpCtl);
+ DDX_Control(pDX, IDC_PUT, m_PutCtl);
+ DDX_Control(pDX, IDC_GET, m_GetCtl);
+ DDX_Control(pDX, IDC_EXIT, m_ExitCtl);
DDX_Control(pDX, IDC_LISTENING, m_ListenCtl);
@@ -158,2 +162,3 @@ BEGIN_MESSAGE_MAP(CPumpKINDlg, CDialog)
ON_COMMAND(ID_TRAY_SHOWPUMPKINWINDOW, OnTrayShowpumpkinwindow)
+ ON_COMMAND(ID_TRAY_LISTEN, OnTrayListen)
ON_COMMAND(ID_TRAY_EXIT, OnTrayExit)
@@ -170,3 +175,4 @@ BEGIN_MESSAGE_MAP(CPumpKINDlg, CDialog)
ON_BN_CLICKED(IDC_LISTENING, OnListening)
- ON_COMMAND(ID_TRAY_LISTEN, OnTrayListen)
+ ON_WM_GETMINMAXINFO()
+ ON_WM_SIZE()
//}}AFX_MSG_MAP
@@ -203,3 +209,2 @@ BOOL CPumpKINDlg::OnInitDialog()
-
m_Images.Create(16,16,TRUE,2,1);
@@ -227,2 +232,16 @@ CRect listrc;
+CRect wrci, wrco;
+ GetWindowRect(&wrco);
+ GetClientRect(&wrci);
+CRect brc;
+ m_GetCtl.GetWindowRect(&brc); ScreenToClient(&brc);
+ m_rightGapButtons = wrci.right-brc.right;
+ m_List.GetWindowRect(&brc); ScreenToClient(&brc);
+ m_rightGapList = wrci.right-brc.right;
+ m_ListenCtl.GetWindowRect(&brc); ScreenToClient(&brc);
+ m_bottomGapListen = wrci.bottom-brc.bottom;
+ m_Log.GetWindowRect(&brc); ScreenToClient(&brc);
+ m_bottomGapLog = wrci.bottom-brc.bottom;
+ m_MinSize.cx = wrco.Width(); m_MinSize.cy=wrco.Height();
+
CRect rc, drc;
@@ -2079 +2098,62 @@ void CPumpKINDlg::LogLine(LPCTSTR str)
}
+
+void CPumpKINDlg::OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI)
+{
+ CDialog::OnGetMinMaxInfo(lpMMI);
+ if(m_MinSize.cx>0 && m_MinSize.cy>0){
+ lpMMI->ptMinTrackSize.x = m_MinSize.cx;
+ lpMMI->ptMinTrackSize.y = m_MinSize.cy;
+ }
+}
+
+void CPumpKINDlg::OnSize(UINT nType, int cx, int cy)
+{
+ CDialog::OnSize(nType, cx, cy);
+ if(nType==SIZE_RESTORED)
+ RecalcLayout(cx,cy);
+}
+
+void CPumpKINDlg::RecalcLayout(int,int)
+{
+ CRect wrc;
+ GetClientRect(&wrc);
+ AdjustButton(m_GetCtl,wrc);
+ AdjustButton(m_PutCtl,wrc);
+ AdjustButton(m_AbortCtl,wrc);
+ AdjustButton(m_HelpCtl,wrc);
+ AdjustButton(m_ExitCtl,wrc);
+ AdjustButton(m_OptionsCtl,wrc);
+ CRect brc;
+ m_List.GetWindowRect(&brc); ScreenToClient(&brc);
+ m_List.SetWindowPos(
+ 0,
+ brc.left, brc.top,
+ wrc.right-m_rightGapList-brc.left, brc.bottom-brc.top,
+ SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOZORDER|SWP_NOCOPYBITS );
+ m_Log.GetWindowRect(&brc); ScreenToClient(&brc);
+ m_Log.SetWindowPos(
+ 0,
+ brc.left, brc.top,
+ wrc.right-m_rightGapButtons-brc.left, wrc.bottom-m_bottomGapLog-brc.top,
+ SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOZORDER|SWP_NOCOPYBITS );
+ m_ListenCtl.GetWindowRect(&brc); ScreenToClient(&brc);
+ m_ListenCtl.SetWindowPos(
+ 0,
+ wrc.right-brc.Width()-m_rightGapButtons, wrc.bottom-brc.Height()-m_bottomGapListen,
+ 0,0,
+ SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER|SWP_NOCOPYBITS );
+ int i = m_Log.GetCount();
+ if(i!=LB_ERR)
+ m_Log.SetCurSel(i-1);
+}
+
+void CPumpKINDlg::AdjustButton(CWnd& w,CRect& wrc)
+{
+ CRect brc;
+ w.GetWindowRect(&brc); ScreenToClient(&brc);
+ w.SetWindowPos(
+ 0,
+ wrc.right-brc.Width()-m_rightGapButtons, brc.top,
+ 0, 0,
+ SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER|SWP_NOCOPYBITS );
+}
diff --git a/PumpKINDlg.h b/PumpKINDlg.h
index b247c56..c5469f1 100644
--- a/PumpKINDlg.h
+++ b/PumpKINDlg.h
@@ -369,2 +369,9 @@ class CPumpKINDlg : public CDialog
public:
+ void AdjustButton(CWnd& w,CRect& wrc);
+ void RecalcLayout(int,int);
+ CSize m_MinSize;
+ UINT m_bottomGapLog;
+ UINT m_bottomGapListen;
+ UINT m_rightGapList;
+ UINT m_rightGapButtons;
CString m_lastlogerr;
@@ -432,2 +439,6 @@ public:
enum { IDD = IDD_PUMPKIN_DIALOG };
+ CButton m_HelpCtl;
+ CButton m_PutCtl;
+ CButton m_GetCtl;
+ CButton m_ExitCtl;
CButton m_ListenCtl;
@@ -484,2 +495,4 @@ protected:
afx_msg void OnListening();
+ afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);
+ afx_msg void OnSize(UINT nType, int cx, int cy);
//}}AFX_MSG
diff --git a/help/pumpkin.rtf b/help/pumpkin.rtf
index abdca4f..505cbf2 100644
--- a/help/pumpkin.rtf
+++ b/help/pumpkin.rtf
@@ -34,2 +34,3 @@ ${\footnote What's New}
\par\pard\plain\fi0\li0\f1\fs18 \bullet Logging to file
+\par\pard\plain\fi0\li0\f1\fs18 \bullet Resizable main window
\par\pard\plain\f1\fs24\qc\cf2\b 2.6 - August 6th, 2005
diff --git a/help/pumpkin.xml b/help/pumpkin.xml
index 46e3bbc..5c951bb 100644
--- a/help/pumpkin.xml
+++ b/help/pumpkin.xml
@@ -15,2 +15,3 @@
<ni>Logging to file</ni>
+ <ni>Resizable main window</ni>
</newsfor>
diff --git a/pumpkin.clw b/pumpkin.clw
index 5344bfd..213d8c1 100644
--- a/pumpkin.clw
+++ b/pumpkin.clw
@@ -4,3 +4,3 @@
Version=1
-LastClass=CPropsServer
+LastClass=CPumpKINDlg
LastTemplate=CComboBox
@@ -18,3 +18,3 @@ Resource2=IDD_PROPS_NETWORK
Resource3=IDD_CONFIRM_RRQ
-Resource4=IDD_ABOUTBOX
+Resource4=IDD_PROPS_SERVER
Class4=CPropsServer
@@ -25,3 +25,3 @@ Class6=CConfirmRRQDlg
Class7=CConfirmWRQDlg
-Resource7=IDD_PUMPKIN_DIALOG
+Resource7=IDD_ABOUTBOX
Class8=CRequestDlg
@@ -35,3 +35,3 @@ Class13=CPropsACL
Class14=CACLTargetCombo
-Resource10=IDD_PROPS_SERVER
+Resource10=IDD_PUMPKIN_DIALOG
@@ -82,3 +82,3 @@ Control6=IDC_EXIT,button,1342259200
Control7=ID_HELP,button,1342259200
-Control8=IDC_LOG,listbox,1353728129
+Control8=IDC_LOG,listbox,1353728385
Control9=IDCANCEL,button,1073741824
@@ -136,3 +136,3 @@ Filter=D
VirtualFilter=idWC
-LastObject=IDC_LOGFILE_BROWSE
+LastObject=CPropsServer
diff --git a/pumpkin.mak b/pumpkin.mak
index 7d2ec22..a22a6fa 100644
--- a/pumpkin.mak
+++ b/pumpkin.mak
@@ -40,3 +40,3 @@ NULL=nul
# Begin Project
-# PROP Target_Last_Scanned "Install - Win32 Canned"
+# PROP Target_Last_Scanned "PumpKIN - Win32 Debug"
CPP=cl.exe
@@ -708,2 +708,3 @@ DEP_CPP_PUMPK=\
".\PumpKINDlg.h"\
+ ".\shared-code\BellsNWhistles.h"\
".\shared-code\kHelpers.h"\
@@ -740,5 +741,2 @@ DEP_CPP_PUMPK=\
SOURCE=.\PumpKINDlg.cpp
-
-!IF "$(CFG)" == "PumpKIN - Win32 Release"
-
DEP_CPP_PUMPKI=\
@@ -762,2 +760,5 @@ DEP_CPP_PUMPKI=\
+!IF "$(CFG)" == "PumpKIN - Win32 Release"
+
+
"$(INTDIR)\PumpKINDlg.obj" : $(SOURCE) $(DEP_CPP_PUMPKI) "$(INTDIR)"\
@@ -768,20 +769,2 @@ DEP_CPP_PUMPKI=\
-DEP_CPP_PUMPKI=\
- ".\ACLTargetCombo.h"\
- ".\ConfirmRRQDlg.h"\
- ".\ConfirmWRQDlg.h"\
- ".\PropsACL.h"\
- ".\PropsNetwork.h"\
- ".\PropsServer.h"\
- ".\PropsSounds.h"\
- ".\pumpkin.h"\
- ".\PumpKINDlg.h"\
- ".\RequestDlg.h"\
- ".\Resolver.h"\
- ".\Retrier.h"\
- ".\shared-code\BellsNWhistles.h"\
- ".\shared-code\kHelpers.h"\
- ".\stdafx.h"\
- ".\Trayer.h"\
-
@@ -796,20 +779,2 @@ DEP_CPP_PUMPKI=\
-DEP_CPP_PUMPKI=\
- ".\ACLTargetCombo.h"\
- ".\ConfirmRRQDlg.h"\
- ".\ConfirmWRQDlg.h"\
- ".\PropsACL.h"\
- ".\PropsNetwork.h"\
- ".\PropsServer.h"\
- ".\PropsSounds.h"\
- ".\pumpkin.h"\
- ".\PumpKINDlg.h"\
- ".\RequestDlg.h"\
- ".\Resolver.h"\
- ".\Retrier.h"\
- ".\shared-code\BellsNWhistles.h"\
- ".\shared-code\kHelpers.h"\
- ".\stdafx.h"\
- ".\Trayer.h"\
-
@@ -1043,2 +1008,3 @@ DEP_CPP_PROPS=\
".\pumpkin.h"\
+ ".\shared-code\BellsNWhistles.h"\
".\shared-code\kHelpers.h"\
@@ -1136,2 +1102,3 @@ DEP_CPP_CONFI=\
".\PumpKINDlg.h"\
+ ".\shared-code\BellsNWhistles.h"\
".\shared-code\kHelpers.h"\
@@ -1191,2 +1158,3 @@ DEP_CPP_CONFIR=\
".\PumpKINDlg.h"\
+ ".\shared-code\BellsNWhistles.h"\
".\shared-code\kHelpers.h"\
@@ -1285,2 +1253,3 @@ DEP_CPP_RESOL=\
".\Resolver.h"\
+ ".\shared-code\BellsNWhistles.h"\
".\shared-code\kHelpers.h"\
@@ -1340,2 +1309,3 @@ DEP_CPP_RETRI=\
".\Retrier.h"\
+ ".\shared-code\BellsNWhistles.h"\
".\shared-code\kHelpers.h"\
@@ -1394,2 +1364,3 @@ DEP_CPP_TRAYE=\
".\PumpKINDlg.h"\
+ ".\shared-code\BellsNWhistles.h"\
".\shared-code\kHelpers.h"\
@@ -1470,2 +1441,3 @@ DEP_CPP_PROPSS=\
".\PumpKINDlg.h"\
+ ".\shared-code\BellsNWhistles.h"\
".\shared-code\kHelpers.h"\
@@ -1503,5 +1475,2 @@ DEP_CPP_PROPSS=\
SOURCE=.\PropsACL.cpp
-
-!IF "$(CFG)" == "PumpKIN - Win32 Release"
-
DEP_CPP_PROPSA=\
@@ -1516,2 +1485,5 @@ DEP_CPP_PROPSA=\
+!IF "$(CFG)" == "PumpKIN - Win32 Release"
+
+
"$(INTDIR)\PropsACL.obj" : $(SOURCE) $(DEP_CPP_PROPSA) "$(INTDIR)"\
@@ -1522,10 +1494,2 @@ DEP_CPP_PROPSA=\
-DEP_CPP_PROPSA=\
- ".\ACLTargetCombo.h"\
- ".\PropsACL.h"\
- ".\pumpkin.h"\
- ".\PumpKINDlg.h"\
- ".\shared-code\kHelpers.h"\
- ".\stdafx.h"\
-
@@ -1540,11 +1504,2 @@ DEP_CPP_PROPSA=\
-DEP_CPP_PROPSA=\
- ".\ACLTargetCombo.h"\
- ".\PropsACL.h"\
- ".\pumpkin.h"\
- ".\PumpKINDlg.h"\
- ".\shared-code\BellsNWhistles.h"\
- ".\shared-code\kHelpers.h"\
- ".\stdafx.h"\
-
@@ -1583,2 +1538,3 @@ DEP_CPP_ACLTA=\
".\PumpKINDlg.h"\
+ ".\shared-code\BellsNWhistles.h"\
".\shared-code\kHelpers.h"\
diff --git a/pumpkin.rc b/pumpkin.rc
index 87745db..9933454 100644
--- a/pumpkin.rc
+++ b/pumpkin.rc
@@ -96,4 +96,3 @@ END
IDD_PUMPKIN_DIALOG DIALOGEX 0, 0, 362, 193
-STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION |
- WS_SYSMENU
+STYLE DS_3DLOOK | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
EXSTYLE WS_EX_ACCEPTFILES | WS_EX_APPWINDOW
@@ -115,4 +114,5 @@ BEGIN
PUSHBUTTON "&Help",ID_HELP,305,97,50,17,BS_NOTIFY,WS_EX_CLIENTEDGE
- LISTBOX IDC_LOG,7,115,348,65,LBS_USETABSTOPS | LBS_NOSEL |
- WS_VSCROLL | WS_HSCROLL,WS_EX_DLGMODALFRAME
+ LISTBOX IDC_LOG,7,115,348,64,LBS_USETABSTOPS |
+ LBS_NOINTEGRALHEIGHT | LBS_NOSEL | WS_VSCROLL |
+ WS_HSCROLL,WS_EX_DLGMODALFRAME
PUSHBUTTON "..",IDCANCEL,0,183,6,7,NOT WS_VISIBLE | NOT WS_TABSTOP
@@ -120,3 +120,3 @@ BEGIN
BS_AUTOCHECKBOX | BS_LEFTTEXT | BS_FLAT | WS_TABSTOP,286,
- 180,69,11,WS_EX_TRANSPARENT | WS_EX_STATICEDGE
+ 181,69,11,WS_EX_TRANSPARENT | WS_EX_STATICEDGE
END