hello
i have downloaded the latest viewer SDK which was released last week
i have a problem with getting the name of the field that i have just set the focus on. not sure if there is a bug in the implementation or my code which i suspect it is
the return code from the DoDocumentVerb is S_OK however the data back from the GetSelected Field vDataOut is returning EMPTY
help would be appreciated
here is the changes i have made to the fulldemo source code
HRESULT __stdcall CMainDlg::OnEvent(/*[in]*/ LONG Type, /*[in]*/ BSTR Name, /*[in]*/ VARIANT DataIn, /*[out]*/ VARIANT*
DataOut, /*[in]*/ LONG Flags)
{
HRESULT hRes = 0;
CString strName;
//
switch (Type)
{
case PXCVA_OnPropertyChanged:
{
hRes = OnPropertyChanged(Name);
break;
}
case PXCVA_OnNamedNotify:
{
ATLTRACE(_T("CMainDlg::OnNamedNotify(\"%ls\")\n"), (LPCWSTR)Name);
// get full name of focused field:
strName = (LPCWSTR)Name;
if (strName.Right(11) == "FocusGained") {
CComVariant vDataIn;
CComVariant vDataOut;
BSTR cmd;
BSTR hRes4;
HRESULT hRes;
cmd = SysAllocString(L"GetSelectedField");
const LONG nActiveDocID = GetActiveDocID();
hRes = m_spView->DoDocumentVerb(nActiveDocID, NULL, cmd, vDataOut, NULL, 0);
if (hRes != S_OK) {
DisplayErrorMessage(m_spView, hRes);
} else {
CString strName;
strName = vDataOut.bstrVal;
}
SysFreeString(cmd);
}
break;
}
}
return hRes;
}
GetSelectField does not return field name
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
-
- User
- Posts: 89
- Joined: Wed Dec 29, 2010 8:50 am
-
- User
- Posts: 89
- Joined: Wed Dec 29, 2010 8:50 am
Re: GetSelectField does not return field name
PLEASE IGNORE AS I HAVE SORTED MY MISTAKE
TOO MANY LATE NIGHTS
TOO MANY LATE NIGHTS
-
- Site Admin
- Posts: 19885
- Joined: Mon Jan 12, 2009 8:07 am
Re: GetSelectField does not return field name

OK - fully ignoring this

Cheers,
Stfan