ActiveX focus issue

This forum is for eXpress++ general support.
Message
Author
User avatar
rdonnay
Site Admin
Posts: 4728
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: ActiveX focus issue

#21 Post by rdonnay »

Ok, now I'm starting to understand more about your problem after running the sample. It appears that this OCX is meant to run as it's own dialog and not as a control on another dialog, therefore your original code seems to be best and I have removed the @ DCACTIVEXCONTROL command because it fails to embed itself in the parent dialog anyway.

There needs to be a way to display the OCX screen in an appmodal state. I think this is the problem. Can you send me docs on the OCX?
The eXpress train is coming - and it has more cars.

Stuart.Fraser
Posts: 17
Joined: Thu Jan 28, 2010 10:07 am
Location: Victoria, BC Canada
Contact:

Re: ActiveX focus issue

#22 Post by Stuart.Fraser »

rdonnay wrote:Ok, now I'm starting to understand more about your problem after running the sample. It appears that this OCX is meant to run as it's own dialog and not as a control on another dialog, therefore your original code seems to be best and I have removed the @ DCACTIVEXCONTROL command because it fails to embed itself in the parent dialog anyway.

There needs to be a way to display the OCX screen in an appmodal state. I think this is the problem. Can you send me docs on the OCX?

Alternately (and I know this is a kludge), you could force the window to the foreground by figuring out it's window handle. The function WinIsRunning( ) contained in the attached PRG will do this for you. Requires BAP but worth a try.

HTH,

Stu

Stuart.Fraser
Posts: 17
Joined: Thu Jan 28, 2010 10:07 am
Location: Victoria, BC Canada
Contact:

Re: ActiveX focus issue

#23 Post by Stuart.Fraser »

hmm, file attachment didn't seem to work.

trying again....


Ahhh, it doesn't like the extension PRG. Changed it to TXT.

Ok it doesn't like TXT... Changed it to STU

Nope doesn't like that either... I'm guessing it doesn't like anything, last try with a zip file... Yay! it worked.
Attachments
WindowsFunctions.zip
2nd try on this file
(7.53 KiB) Downloaded 839 times

Cliff Wiernik
Posts: 605
Joined: Thu Jan 28, 2010 9:11 pm
Location: Steven Point, Wisconsin USA
Contact:

Re: ActiveX focus issue

#24 Post by Cliff Wiernik »

I have a similar type application. I have a activeX Tiff file document viewer. I to have it as the child of a dialog window and static drawn on that window. I have dialogs appwindows set not to the main windows drawingarea but the appdesktop. It is not modal. Thus, when this dialog is opened, it appears as another application showing in the bottom task list. Likewise, it does not show on the main menu Window dialog list. If I click off the activeX controls dialog on another dialog tied to the mainwindow:drawingarea, the activeX control does disappear the main application window. However, since it is in the bottom task bar, it can easily be clicked on by the user. I also have a "Document" push button on the top button bar area that if clicked, also brings the document viewer automatically to the front. That code is shown below.

Code: Select all

  DCREAD GUI ;
    TITLE m->sCompCode+'-'+cTitle ;
    OPTIONS GetOptions ;
    SETFOCUS oBrowse ;    
;//    APPWINDOW m->G_MainWindow:drawingArea ;
    APPWINDOW AppDeskTop() ;
;//    SETAPPWINDOW;
;//    MODAL;
    FIT  ;
    EVAL {|o| d_oDialog := o,               ;
              m->g_lDocViewOpen := .T.,     ;
              m->G_oDocViewer := d_oDialog}

Code: Select all

SetAppFocus(m->G_oDocViewer)
Maybe the above will be helpful.

Cliff Wiernik

User avatar
rdonnay
Site Admin
Posts: 4728
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: ActiveX focus issue

#25 Post by rdonnay »

I can't do any more testing until I get the docs for the OCX. I can't even read the TypeLib info in the OCX with my favorite tools. I've never seen this before. I use the Jace31Wizard.exe to write out wrappers for an ActiveX control but it thinks there is nothing in the OCX.
The eXpress train is coming - and it has more cars.

BruceN
Posts: 280
Joined: Thu Jan 28, 2010 7:46 am
Location: Slidell, LA

Re: ActiveX focus issue

#26 Post by BruceN »

Here's everything I have.... hope it makes sense to you. I understand about 20% of it. If you need more info, Il'l get you the email of their developer. PDF files zipped up (your board would accept a pdf extension).

Thanks to A L L of you for the help!

bruce
Attachments
docs.zip
(933.68 KiB) Downloaded 850 times
There are only 10 kinds of people - those who understand binary and those who don't :)

BruceN
Posts: 280
Joined: Thu Jan 28, 2010 7:46 am
Location: Slidell, LA

Re: ActiveX focus issue

#27 Post by BruceN »

Stu:

Got your prg/zip. Am late for a soccer game (youngest son playing). Will look at it tomorrow in my 'copious free time'.

thanks, as always....

bruce
There are only 10 kinds of people - those who understand binary and those who don't :)

Post Reply