コード例 #1
0
void CCSHPropertySheet::OnContextMenu(CWnd*pWnd, CPoint pt)
{
  m_pwndContext=WndFromPoint(this,pWnd,pt);
  if(NULL==m_pwndContext || !CCSHCommon::OnContextMenu(this,pt,HelpID(m_pwndContext->GetDlgCtrlID()))){
    CPropertySheet::OnContextMenu(pWnd,pt);
  }
}
コード例 #2
0
BOOL CCSHPropertySheet::OnInitDialog() 
{
  CPropertySheet::OnInitDialog();
  if(0==HelpID(IDOK)){
    // Dynamically add/remove the question mark button to the title bar of the dialog box:
    ModifyStyleEx(WS_EX_CONTEXTHELP,0,0);
  } else {
    ModifyStyleEx(0,WS_EX_CONTEXTHELP,0);
  }
  
  if(CSHFile().IsEmpty()){
    // All of the following mess happens because Microsoft decided to show a help button by 
    // default to every Property sheet constructed by Visual C++ 6.In the following lines, 
    // I hide the help button and move the other three buttons to where they should be.
    CWnd *pwndHelpButton=GetDlgItem(IDHELP);
    if(pwndHelpButton){
      static const int _afxPropSheetButtons[] = { IDOK, IDCANCEL, ID_APPLY_NOW, IDHELP };
    
      for (int i = 0; i < sizeof _afxPropSheetButtons/sizeof _afxPropSheetButtons[0] - 1; i++){
        // Shunt button   
        CRect rect;
        GetDlgItem(_afxPropSheetButtons[i+1])->GetWindowRect(&rect);
        ScreenToClient(&rect);
        GetDlgItem(_afxPropSheetButtons[i])->MoveWindow(&rect);
      }
      pwndHelpButton->DestroyWindow();    
    }    
  }
  return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
コード例 #3
0
ファイル: tipsdlg.cpp プロジェクト: Amadiro/xara-cairo
/********************************************************************************************

>	HelpID TipsDlg::GetTipHelpID()

	Author:		Colin_Barfoot (Xara Group Ltd) <*****@*****.**>
	Created:	03/08/96
	Returns:	The HelpID associated with the current tip
	Purpose:	Allows the user to be given further information regarding the current tip.
	See Also:	OnMoreHelp()

********************************************************************************************/
HelpID TipsDlg::GetTipHelpID()
{
	INT32 iHashPosition = m_iHashPosition + 2;	// +1 for an annoying quote marks
	// Convert the right hand side to a HelpID
	HelpID helpID = HelpID(m_strTip.ConvertToInteger(iHashPosition));
	return helpID;
}
コード例 #4
0
ファイル: CSHDialog.cpp プロジェクト: Robertysc/ecos
BOOL CCSHDialog::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
  if(0==HelpID(IDOK)){
    // Dynamically add/remove the question mark button to the title bar of the dialog box:
    ModifyStyleEx(WS_EX_CONTEXTHELP,0,0);
  } else {
    ModifyStyleEx(0,WS_EX_CONTEXTHELP,0);
  }

  CWnd *pHelpButton=GetDlgItem(IDHELP);
  if(NULL!=pHelpButton){
    pHelpButton->EnableWindow(!CSHFile().IsEmpty());
  }
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
コード例 #5
0
UINT CeCosDialog::HelpID (DWORD dwCtrlID) const
{
  return HelpID((UINT)m_lpszTemplateName,dwCtrlID);
}
コード例 #6
0
BOOL CCSHPropertySheet::OnHelpInfo(HELPINFO* pHelpInfo) 
{
  DisplayHelp((HWND)pHelpInfo->hItemHandle,HelpID((HWND)pHelpInfo->hItemHandle),GetInstanceHandle());
  return TRUE;
}
コード例 #7
0
void CCSHPropertySheet::OnWhatsThis()
{
  DisplayHelp(m_pwndContext->m_hWnd,HelpID(m_pwndContext->m_hWnd),GetInstanceHandle());
}
コード例 #8
0
ファイル: CSHDialog.cpp プロジェクト: Robertysc/ecos
void CCSHDialog::OnWhatsThis()
{
  DisplayHelp(m_pwndContext->m_hWnd,HelpID(m_pwndContext->m_hWnd),GetInstanceHandle());
}