aaApi_DocumentSelectDlg get filter on uiCommandId

aaApi_DocumentSelectDlg get filter on uiCommandId

Hi, Calling aaApi_DocumentSelectDlg

m_param.obButton.lpctstrButtonText = _T("Open from disk");

m_param.obButton.uiCommandId = IDABORT;

 

I also have m_param.lpctstrFilter set for multiple filetypes. Is it possible to get the selected file type before m_param.obButton.uiCommandId is pressed? Is there a hook for this?

Thanks :)

Parents
  • According the SDK documentation, pre, post and action hooks are available for aaApi_DocumentSelectDlg via AAHOOK_OPEN_DOCUMENTS_DLG2. However, I don't think that helps you, as the returned output values of the passed AAOPENDOCSDLG2_PARAM structure aren't populated dynamically prior to acting on the dialog (by pressing the obButton). You could run a post hook that runs data validation on the return values, and if that fails your validation, deliver a message indicating the problem and offer the user the option to try again or cancel. That's usually how I approach these types of issues.

Reply
  • According the SDK documentation, pre, post and action hooks are available for aaApi_DocumentSelectDlg via AAHOOK_OPEN_DOCUMENTS_DLG2. However, I don't think that helps you, as the returned output values of the passed AAOPENDOCSDLG2_PARAM structure aren't populated dynamically prior to acting on the dialog (by pressing the obButton). You could run a post hook that runs data validation on the return values, and if that fails your validation, deliver a message indicating the problem and offer the user the option to try again or cancel. That's usually how I approach these types of issues.

Children