Problem/Issue 5075
 
Query for PDR ID
Example: search for PDR ID 109-9999 , just enter 9999 into the entry field and press ENTER.
Open Build: Open Date: Language:
1.80.284 22.08.2002 (All)
Closed Build: Close Date: Platform:
1.90.322 10.10.2005 WIN32
State: Reference PDR ID: Hotfix Rollup No.:
CLOSED    
Symptom:
HOWTO: set focus to XbpHTMLView control
Description:
The plain XbpHTMLView implementation does not work correctly with
SetAppFocus(). When SetAppFocus( oHTML ) is called, then this will
not set the focus to the control.

This PDR is closed due to the fact that XbpOcx is declared legacy and
thus no longer be supported.

It is recommended to use the ActivX support built-in Xbase++ 1.90 and
above instead

Solution:
#include "Gra.ch"
#include "Xbp.ch"
#include "Common.ch"
#include "Appevent.ch"
#include "Font.ch"
#include "dll.ch"
#pragma library("xppocx.lib")

PROCEDURE AppSys
RETURN

PROCEDURE Main
   LOCAL nEvent, mp1, mp2
   LOCAL oDlg, oXbp, drawingArea, oBrowser, nHWND

   oDlg := XbpDialog():new( AppDesktop(), , {100,100}, {600,400})
   oDlg:taskList := .T.
   oDlg:title := "html help test"
   oDlg:close := {||Appquit()}
   drawingArea := oDlg:drawingArea
   oDlg:create()

   oBrowser := XbpHTMLViewer():New( drawingArea, drawingArea, {10,10
},{580,340} )
   oBrowser:Create()
   oBrowser:Navigate( "http://www.alaska-software.com" )

   SetAppWindow(oDlg)

   // workaround: set the focus to the html viewer
#define GW_CHILD 5
   nHWND := DllCall("user32.dll",DLL_STDCALL,"GetWindow", ;
                    oBrowser:XbpStatic:GetHWND(),GW_CHILD)
   nHWND := DllCall("user32.dll",DLL_STDCALL,"GetWindow",nHWND,GW_CHILD)
   DllCall("user32.dll",DLL_STDCALL,"SetFocus",nHWND)

   AppEventLoop()
RETURN

PROCEDURE AppQuit()
   CLOSE ALL
   QUIT
RETURN



 
(C) Copyright Alaska Software Inc. 2008, All rights reserved!
Disclaimer, Limitation of Liability, no Warranty: THE INFORMATION, DOCUMENTS, FILES AND MATERIALS CONTAINED IN THIS SITE ARE PROVIDED "AS IS". ALASKA SOFTWARE DOES NOT WARRANT THE ACCURACY, ADEQUACY OR COMPLETENESS OF THIS INFORMATION AND MATERIALS; THUS EXPRESSLY DISCLAIMS LIABILITY FOR ERRORS OR OMISSIONS IN THIS INFORMATION AND MATERIALS.
WARRANTIES OF ANY KIND, IMPLIED, EXPRESSED OR STATUTORY, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF NON-INFRINGEMENT OF THIRD PARTY RIGHTS, TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR RESOLVEMENT-CLAIMS, ARE DISCLAIMED.