GME
13
|
00001 // InspectorSheet.cpp : implementation file 00002 // 00003 00004 #include "stdafx.h" 00005 #include "objectinspector.h" 00006 #include "InspectorSheet.h" 00007 00008 #ifdef _DEBUG 00009 #define new DEBUG_NEW 00010 #undef THIS_FILE 00011 static char THIS_FILE[] = __FILE__; 00012 #endif 00013 00015 // CInspectorSheet 00016 00017 CInspectorSheet::CInspectorSheet() 00018 { 00019 } 00020 00021 CInspectorSheet::~CInspectorSheet() 00022 { 00023 } 00024 00025 00026 void CInspectorSheet::SetInspectorLists(CInspectorList **inspectorList) { 00027 m_inspectorLists = inspectorList; 00028 } 00029 00030 BEGIN_MESSAGE_MAP(CInspectorSheet, CTabCtrl) 00031 //{{AFX_MSG_MAP(CInspectorSheet) 00032 ON_WM_SIZE() 00033 ON_MESSAGE(LBN_ON_ITEM_CHANGED, OnItemChanged) 00034 //}}AFX_MSG_MAP 00035 END_MESSAGE_MAP() 00036 00038 // CInspectorSheet message handlers 00039 00040 void CInspectorSheet::OnSize(UINT nType, int cx, int cy) 00041 { 00042 CTabCtrl::OnSize(nType, cx, cy); 00043 00044 CRect listRect; 00045 GetClientRect(&listRect); 00046 AdjustRect(FALSE, &listRect); 00047 for (int i = 0; i < INSP_PANEL_NUM; i++) { 00048 m_inspectorLists[i]->MoveWindow(listRect); 00049 } 00050 } 00051 00052 LRESULT CInspectorSheet::OnItemChanged(WPARAM wParam, LPARAM /*lParam*/) 00053 { 00054 /* 00055 #ifdef _DEBUG 00056 CString strTemp; 00057 strTemp.Format(_T("Item Changed: %u"),wParam); 00058 MessageBox(strTemp,_T("Item Changed")); 00059 #endif 00060 */ 00061 GetParent()->SendMessage(LBN_ON_ITEM_CHANGED,wParam,GetCurFocus()); 00062 00063 return TRUE; 00064 }