/**
* Called by the MFC framework when the view is being created.
*/
int StageView::OnCreate( LPCREATESTRUCT lpCreateStruct ) {
	if( ToggleListView::OnCreate( lpCreateStruct ) == -1 ) {
		return -1;
	}
	SetToggleIcons( MAKEINTRESOURCE( IDI_ME_DISABLED_ICON ), MAKEINTRESOURCE( IDI_ME_ON_ICON ), MAKEINTRESOURCE( IDI_ME_OFF_ICON ) );
	return 0;
}
Example #2
0
/**
* Called as the window is being created and initializes icons and window styles
*/
int ToggleListView::OnCreate(LPCREATESTRUCT lpCreateStruct) {
	if (CListView::OnCreate(lpCreateStruct) == -1)
		return -1;

	CListCtrl& list = GetListCtrl();
	
	list.SetExtendedStyle(LVS_EX_FULLROWSELECT);

	//Turn off the horizontal scroll bar
	//Todo: Figure out why the damn scroll bar pops up
	list.ModifyStyle(WS_HSCROLL, 0L);
	
	
	//Insert the one column
	LVCOLUMN col;
	col.mask = 0;
	list.InsertColumn(0, &col);

	SetToggleIcons();
	
	return 0;
}