DLLEXPORT FPDF_BOOL STDCALL FORM_ForceToKillFocus(FPDF_FORMHANDLE hHandle) { CPDFSDK_Document* pSDKDoc = CPDFSDK_Document::FromFPDFFormHandle(hHandle); if (!pSDKDoc) return FALSE; return pSDKDoc->KillFocusAnnot(0); }
DLLEXPORT FPDF_BOOL STDCALL FORM_ForceToKillFocus(FPDF_FORMHANDLE hHandle) { if(!hHandle) return FALSE; CPDFSDK_Document* pSDKDoc = ((CPDFDoc_Environment*)hHandle)->GetCurrentDoc(); if(!pSDKDoc) return FALSE; //Kill the current focus. return pSDKDoc->KillFocusAnnot(0); }
int FXJS_MsgBox(CPDFDoc_Environment* pApp, CPDFSDK_PageView* pPageView, FX_LPCWSTR swMsg, FX_LPCWSTR swTitle, FX_UINT nType, FX_UINT nIcon) { int nRet = 0; if(pApp) { CPDFSDK_Document* pDoc = pApp->GetCurrentDoc(); if(pDoc) pDoc->KillFocusAnnot(); nRet = pApp->JS_appAlert(swMsg, swTitle, nType, nIcon); } return nRet; }