BOOL CRemoteGraphForm::OnInitDialog()
{
	BOOL ret = __super::OnInitDialog();
	if (!ret) return FALSE;

	// prepare titlebar
	title.ModifyStyle(0, WS_CLIPCHILDREN);
	title.ModifyStyleEx(0, WS_EX_CONTROLPARENT);

	// create buttons
	CRect	rc;
	rc.SetRect(0, 0, 80, 25);
	btn_refresh.Create(_T("Refresh"), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, rc, &title, IDC_BUTTON_REFRESH);
	btn_refresh.SetFont(GetFont());
	btn_connect.Create(_T("Connect"), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, rc, &title, IDC_BUTTON_CONNECT);
	btn_connect.SetFont(GetFont());

	SetWindowPos(NULL, 0, 0, 400, 250, SWP_NOMOVE);

	OnRefreshClick();
	return TRUE;
}
BOOL CRemoteGraphForm::OnInitDialog()
{
	BOOL ret = __super::OnInitDialog();
	if (!ret) return FALSE;

	// prepare titlebar
	title.ModifyStyle(0, WS_CLIPCHILDREN);
	title.ModifyStyleEx(0, WS_EX_CONTROLPARENT);

    // prepare ListCtrl
    list_graphs.InsertColumn(0, _T("Process ID"), LVCFMT_RIGHT, 120);
    list_graphs.InsertColumn(1, _T("Process Name"), LVCFMT_LEFT, 150);
    list_graphs.InsertColumn(2, _T("Instance"), LVCFMT_LEFT, 80);
    list_graphs.InsertColumn(3, _T("Creation Time"), LVCFMT_LEFT, 80);
    list_graphs.InsertColumn(4, _T("Process Image File"), LVCFMT_LEFT, 350);
    list_graphs.SetExtendedStyle(list_graphs.GetExtendedStyle() | LVS_EX_GRIDLINES | LVS_EX_FULLROWSELECT | LVS_EX_LABELTIP );

	// create buttons
	CRect	rc;
	rc.SetRect(0, 0, 80, 25);
	btn_refresh.Create(_T("&Refresh"), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, rc, &title, IDC_BUTTON_REFRESH);
	btn_refresh.SetFont(GetFont());
	btn_connect.Create(_T("&Connect"), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, rc, &title, IDC_BUTTON_CONNECT);
	btn_connect.SetFont(GetFont());
	if(CanCreateSpyFilterGraphHelperInstance())
	{
		btn_properties.Create(_T("&Properties..."), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, rc, &title, IDC_BUTTON_SPY_PROPERTYFRAME);
		btn_properties.SetFont(GetFont());
	}

	SetWindowPos(NULL, 0, 0, 600, 250, SWP_NOMOVE);

	OnRefreshClick();

	return TRUE;
}