Alaska Software Inc. - xbphtmlviewer disappears on focus change
Alaska Software Inc. - xbphtmlviewer disappears on focus change
Username: Password:
AuthorTopic: xbphtmlviewer disappears on focus change
JUAN GONZALEZxbphtmlviewer disappears on focus change
on Thu, 30 Nov 2017 00:33:32 +0100
Hello friends.
I am trying to embedd an xbphtmlviewer object in a dialog window (to display a 
pdf file), and everything works fine until I switch to another application or 
simply minimize/maximize the window. When I do whatever of those actions, 
ramdomly the xbphtmlviewer appears as an empty rectangle, and when I right 
click on its areas, its parts start to be redrawn.
To test, I tried the ..\source\samples\activex\webbrowser\webbrowser.exe 
sample, and it offers the same behaviour displaying the pdf file.
I am using foxit reader to display pdf files in the IE browser. When I use IE, 
the display is always correct, no matter the number of times I switch to other 
applications.
Can you help me about where to dig to find a solution?
Thank you very much.
Juampa
JUAN GONZALEZRe: xbphtmlviewer disappears on focus change
on Thu, 30 Nov 2017 00:35:53 +0100
I wrote an error: instead of "when I right click" I should have written 
"when I left click"


JUAN GONZALEZ wrote in message news:5fb1e0f4$38d5913b$2d747@news.alaska-
software.com...
>Hello friends.
>I am trying to embedd an xbphtmlviewer object in a dialog window (to 
display a 
>pdf file), and everything works fine until I switch to another application 
or 
>simply minimize/maximize the window. When I do whatever of those actions, 
>ramdomly the xbphtmlviewer appears as an empty rectangle, and when I right 
>click on its areas, its parts start to be redrawn.
>To test, I tried the ..\source\samples\activex\webbrowser\webbrowser.exe 
>sample, and it offers the same behaviour displaying the pdf file.
>I am using foxit reader to display pdf files in the IE browser. When I use 
IE, 
>the display is always correct, no matter the number of times I switch to 
other 
>applications.
>Can you help me about where to dig to find a solution?
>Thank you very much.
>Juampa
JUAN GONZALEZRe: xbphtmlviewer disappears on focus change
on Sat, 02 Dec 2017 16:18:37 +0100
Hello friends.
Just in case somebody faces the same problem, I think I found a workaround.
Using the setInputFocus callback of the window, I call a UDF that searches the 
childlist() for Activex Controls, and then launchs the invalidateRect() method 
for each of them.
I do not know if it is the best solution, but it works by now.
With kind regards
Juampa




JUAN GONZALEZ wrote in message news:5da3b9e9$995973$2d6be@news.alaska-
software.com...
>I wrote an error: instead of "when I right click" I should have written 
>"when I left click"
>
>
>JUAN GONZALEZ wrote in message news:5fb1e0f4$38d5913b$2d747@news.alaska-
>software.com...
>>Hello friends.
>>I am trying to embedd an xbphtmlviewer object in a dialog window (to 
>display a 
>>pdf file), and everything works fine until I switch to another application 
>or 
>>simply minimize/maximize the window. When I do whatever of those actions, 
>>ramdomly the xbphtmlviewer appears as an empty rectangle, and when I right 
>>click on its areas, its parts start to be redrawn.
>>To test, I tried the ..\source\samples\activex\webbrowser\webbrowser.exe 
>>sample, and it offers the same behaviour displaying the pdf file.
>>I am using foxit reader to display pdf files in the IE browser. When I use 
>IE, 
>>the display is always correct, no matter the number of times I switch to 
>other 
>>applications.
>>Can you help me about where to dig to find a solution?
>>Thank you very much.
>>Juampa