Skip to content

Commit

Permalink
update issue #255 : removed fixed height OnMeasureItem override that …
Browse files Browse the repository at this point in the history
…was corrupting the layout of filters and schedule windows.
  • Loading branch information
mikecopperwhite committed Mar 4, 2019
1 parent 86f6ad0 commit 3a8105c
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 33 deletions.
17 changes: 0 additions & 17 deletions src/FiltersForm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ IMPLEMENT_DYNAMIC(CFiltersForm, CGraphStudioModelessDialog)
BEGIN_MESSAGE_MAP(CFiltersForm, CGraphStudioModelessDialog)
ON_CBN_SELCHANGE(IDC_COMBO_CATEGORIES, &CFiltersForm::OnComboCategoriesChange)
ON_WM_SIZE()
ON_WM_MEASUREITEM()
ON_BN_CLICKED(IDC_BUTTON_INSERT, &CFiltersForm::OnBnClickedButtonInsert)
ON_CBN_SELCHANGE(IDC_COMBO_MERIT, &CFiltersForm::OnComboMeritChange)
ON_NOTIFY(LVN_ITEMCHANGED, IDC_LIST_FILTERS, &CFiltersForm::OnFilterItemClick)
Expand Down Expand Up @@ -420,22 +419,6 @@ void CFiltersForm::OnSize(UINT nType, int cx, int cy)
check_favorite.Invalidate();
}

void CFiltersForm::OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT item)
{
if (item->CtlType == ODT_LISTVIEW) {
if (item->CtlID == IDC_LIST_FILTERS) {

// fixed height
item->itemHeight = 18;
return ;

}
}

// base clasu
__super::OnMeasureItem(nIDCtl, item);
}

void CFiltersForm::OnItemDblClk(int item)
{
OnBnClickedButtonInsert();
Expand Down
1 change: 0 additions & 1 deletion src/FiltersForm.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ class CFiltersForm :
CRect GetDefaultRect() const;
void OnInitialize();
void OnSize(UINT nType, int cx, int cy);
void OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT item);
BOOL PreTranslateMessage(MSG *pmsg);
virtual BOOL OnInitDialog( );

Expand Down
14 changes: 0 additions & 14 deletions src/ScheduleForm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ IMPLEMENT_DYNAMIC(CScheduleForm, CGraphStudioModelessDialog)

BEGIN_MESSAGE_MAP(CScheduleForm, CGraphStudioModelessDialog)
ON_WM_SIZE()
ON_WM_MEASUREITEM()
ON_WM_ERASEBKGND()
ON_WM_TIMER()
ON_BN_CLICKED(IDC_BUTTON_CLOSE, &CScheduleForm::OnBnClickedButtonClose)
Expand Down Expand Up @@ -82,19 +81,6 @@ CRect CScheduleForm::GetDefaultRect() const
return CRect(50, 200, 450, 450);
}

void CScheduleForm::OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT item)
{
if (item->CtlType == ODT_LISTVIEW) {
if (item->CtlID == IDC_LIST_SCHEDULE) {
item->itemHeight = 18;
return ;
}
}

// base clasu
__super::OnMeasureItem(nIDCtl, item);
}

void CScheduleForm::OnSize(UINT nType, int cx, int cy)
{
// resize our controls along...
Expand Down
1 change: 0 additions & 1 deletion src/ScheduleForm.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ class CScheduleForm : public CGraphStudioModelessDialog
BOOL DoCreateDialog(CWnd* parent);

void OnSize(UINT nType, int cx, int cy);
void OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT item);

void OnBnClickedButtonClose();
void OnBnClickedButtonAdd();
Expand Down

0 comments on commit 3a8105c

Please sign in to comment.