GME  13
RegistryPanel.cpp
Go to the documentation of this file.
00001 // RegistryPanel.cpp : implementation file
00002 //
00003 
00004 #include "stdafx.h"
00005 #include "mgautil.h"
00006 #include "RegistryPanel.h"
00007 
00008 #ifdef _DEBUG
00009 #define new DEBUG_NEW
00010 #undef THIS_FILE
00011 static char THIS_FILE[] = __FILE__;
00012 #endif
00013 
00015 // CRegistryPanel
00016 
00017 CRegistryPanel::CRegistryPanel()
00018 {
00019 }
00020 
00021 CRegistryPanel::~CRegistryPanel()
00022 {
00023 }
00024 
00025 
00026 BEGIN_MESSAGE_MAP(CRegistryPanel, CButton)
00027         //{{AFX_MSG_MAP(CRegistryPanel)
00028         ON_WM_SIZE()
00029         //}}AFX_MSG_MAP
00030 END_MESSAGE_MAP()
00031 
00033 // CRegistryPanel message handlers
00034 
00035 void CRegistryPanel::OnSize(UINT nType, int cx, int cy) 
00036 {
00037         CButton::OnSize(nType, cx, cy);
00038         
00039         // TODO: Add your message handler code here
00040         
00041         CDialog *prnt = (CDialog*)(GetParent());
00042 
00043         CWnd *label;
00044                 
00045         label = prnt->GetDlgItem(IDC_STATIC_PATH);
00046         if (label->GetSafeHwnd()) {
00047                 CRect origRect(10,20,28,28);
00048                 prnt->MapDialogRect(&origRect);
00049                 ClientToScreen(&origRect);
00050                 prnt->ScreenToClient(&origRect);
00051                 label->MoveWindow(&origRect);
00052         }
00053 
00054         label = prnt->GetDlgItem(IDC_STATIC_STATUS);
00055         if (label->GetSafeHwnd()) {
00056                 CRect origRect(10,40,33,48);
00057                 prnt->MapDialogRect(&origRect);
00058                 ClientToScreen(&origRect);
00059                 prnt->ScreenToClient(&origRect);
00060                 label->MoveWindow(&origRect);
00061         }
00062 
00063         label = prnt->GetDlgItem(IDC_STATIC_VALUE);
00064         if (label->GetSafeHwnd()) {
00065                 CRect origRect(10,60,31,68);
00066                 prnt->MapDialogRect(&origRect);
00067                 ClientToScreen(&origRect);
00068                 prnt->ScreenToClient(&origRect);
00069                 label->MoveWindow(&origRect);
00070         }
00071 
00072         label = prnt->GetDlgItem(IDC_REGNODE_PATH);
00073         if (label->GetSafeHwnd()) {
00074                 CRect origRect(35,17,190,31);
00075                 CRect origRect2(190,17,200,31);
00076                 prnt->MapDialogRect(&origRect);
00077                 prnt->MapDialogRect(&origRect2);
00078                 origRect.right = cx - (origRect2.right - origRect2.left);
00079 
00080                 ClientToScreen(&origRect);
00081                 prnt->ScreenToClient(&origRect);
00082                 label->MoveWindow(&origRect);
00083         }
00084 
00085         label = prnt->GetDlgItem(IDC_REGNODE_STATUS);
00086         if (label->GetSafeHwnd()) {
00087                 CRect origRect(35,37,190,51);
00088                 CRect origRect2(190,37,200,51);
00089                 prnt->MapDialogRect(&origRect);
00090                 prnt->MapDialogRect(&origRect2);
00091                 origRect.right = cx - (origRect2.right - origRect2.left);
00092 
00093                 ClientToScreen(&origRect);
00094                 prnt->ScreenToClient(&origRect);
00095                 label->MoveWindow(&origRect);
00096         }       
00097         
00098         label = prnt->GetDlgItem(IDC_REGNODE_VALUE);
00099         if (label->GetSafeHwnd()) {
00100                 CRect origRect(35,57,190,172);
00101                 CRect origRect2(190,57,200,172);
00102                 CRect origRect3(35,172,200,182);
00103                 prnt->MapDialogRect(&origRect);
00104                 prnt->MapDialogRect(&origRect2);
00105                 prnt->MapDialogRect(&origRect3);
00106                 origRect.right = cx - (origRect2.right - origRect2.left);
00107                 origRect.bottom = cy - (origRect3.bottom - origRect3.top);
00108 
00109                 ClientToScreen(&origRect);
00110                 prnt->ScreenToClient(&origRect);
00111                 label->MoveWindow(&origRect);
00112         }       
00113 }