Announcement

Collapse
No announcement yet.

Launch from another program

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Iain Johnstone
    replied
    Thank you gentlemen - its looks as if its going to be a long weekend!

    Iain Johnstone

    Leave a comment:


  • Michael Mattias
    replied
    To answer your question directly, no. A window's owning window must be executing in the same thread context as that window.

    That is, a toolbar owned by process "A" must be created in process "A."

    However, process "B" could create a toolbar window and when buttons are clicked or keys pressed in that toolbar send messages to process "A" to 'do something'

    But that would be silly, since it would require process "A" be modified anyway, in which case you'd just add the toolbar to process "A" instead of dinking around with interprocess communication.

    (The Autocad API sounds like a much better bet here).

    Leave a comment:


  • Eddy Van Esch
    replied
    Just checked: Autocad can call Windows APIs through VBA. So it can also call PowerBASIC dlls ...

    Kind regards

    Leave a comment:


  • Eddy Van Esch
    replied
    Iain,

    I think your AutoCad docs should be able to provide you with some help.

    Back in the stone age I used to add functions to Autocad using Lisp. That was Acad 13, 14 I think. Later Acad was enhanced with other programming languages (Visual Lisp, VBA, ActiveX...).

    So I think the easiest way is to create toolbar buttons in Acad itself. Put some code 'under' this button that calls a Lisp or VBA wrapper function and have this VBA (or whatever) wrapper function call your PB routine.

    Sorry I can't be more specific or provide an example...

    Kind regards

    Leave a comment:


  • Iain Johnstone
    started a topic Launch from another program

    Launch from another program

    Is it possible (and if so, how!) to put a button or a floating toolbar into another running program such that this new control will call up routines in the program that put it there? I need to do this in Autocad so that the user can call calculation functions in my program.

    Have had a look in POFFS, but not really sure what to type in to get started.

    Any help gratefully appreciated.

    Iain Johnstone
Working...
X