Announcement

Collapse
No announcement yet.

Embedding Destinator in Delphi?

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

  • Embedding Destinator in Delphi?

    Any Delphi gurus here? (or the ME guys who have dome similar in VB).

    I use my own software for MP3 etc, and I've been playing around with the Destinator SDK. I can easily make my application launch Destinator, and it gets its own window), but I want to embed it within my application windows. I assume I should use an OLE container for this (excuse me, but I'm not a programming guru but a UNIX sysadmin, I just play a bit when I get a chance).

    Problem is I can't figure out what name to embed for ME. For example when embedding MapPoint control you would do something like this: -

    OleContainer.CreateObject('MapPoint.Map.EU.9', False);

    but I can't figure out doing the same with Destinator. I've searched the registry and TLB files etc to find an equivelant OLE application string or whatever you'd call it, but to no avail.

    Any ideas?

    Cheers



    Sy

    GingerPrince

    Car changed for TVR Griffith 500, so computer de-installed. Using a Dension 100ix w/60Gb HD unit in the interim.

    Carputer Install - http://www.stuffandting.com/carputer/
    CarBox Software -- http://www.stuffandting.com/carbox/

  • #2
    Exactly the thing that I'm looking at!

    Cool another delphi coder I'm not alone...

    try this: (it's using the app handle)

    http://www.experts-exchange.com/Prog..._20617397.html

    I'll try to do some test with the destinator sdk...

    there's a lot of handle tracker prog to help you

    Agree to start some cowork for destinator integration?

    (I'm also writting my own prog in delphi =>mediacruiser)
    Epia M9000, lili 7" vga&touch & 2xTM-7002S compo, camera with reversed image, 2.5" 60 GB, 256Mb DDR, Opus 90W, GPS usb... AND MEDIACRUISER of course!

    Comment


    • #3
      Originally posted by PTCruiser
      Exactly the thing that I'm looking at!

      Cool another delphi coder I'm not alone...

      try this: (it's using the app handle)

      http://www.experts-exchange.com/Prog..._20617397.html

      I'll try to do some test with the destinator sdk...

      there's a lot of handle tracker prog to help you

      Agree to start some cowork for destinator integration?

      (I'm also writting my own prog in delphi =>mediacruiser)
      Thanks, that's a pretty useful link.

      I've managed to get Destinator embedded in a Delphi Panel now in my app, so I can use it without it disappearing behind things etc! You can't use the windows class name though it doesn't have one (just the default dialog box class name of #32770). So I had to make a function called GetWindowByName which searches all current windows titles, to find the Destinator window. Then SetWindowLong to remove the title bar and sizable borders. So now I can use it within my app as you can see: -

      Without GPS running: -


      With GPS running: -


      Only thing is, I can't really see a way from the API to completely control it. ie remove the menus and buttons, display just the map, and control all route selection etc externally. One thought I had was to hide the Destinator App, and continually call GetMapImage to update an on-form bitmap. Not tried it, but I'm guessing that will be pretty inefficient and clumsy.

      It'll do me for now though. Probably not worth any serious playing with until Destinator 3 comes out (soon maybe?)



      Sy

      GingerPrince

      Car changed for TVR Griffith 500, so computer de-installed. Using a Dension 100ix w/60Gb HD unit in the interim.

      Carputer Install - http://www.stuffandting.com/carputer/
      CarBox Software -- http://www.stuffandting.com/carbox/

      Comment


      • #4
        Originally posted by GingerPrince
        Thanks, that's a pretty useful link.

        I've managed to get Destinator embedded in a Delphi Panel now in my app, so I can use it without it disappearing behind things etc! You can't use the windows class name though it doesn't have one (just the default dialog box class name of #32770). So I had to make a function called GetWindowByName which searches all current windows titles, to find the Destinator window. Then SetWindowLong to remove the title bar and sizable borders. So now I can use it within my app as you can see: -

        Only thing is, I can't really see a way from the API to completely control it. ie remove the menus and buttons, display just the map, and control all route selection etc externally. One thought I had was to hide the Destinator App, and continually call GetMapImage to update an on-form bitmap. Not tried it, but I'm guessing that will be pretty inefficient and clumsy.

        It'll do me for now though. Probably not worth any serious playing with until Destinator 3 comes out (soon maybe?)



        Sy
        I'm doing the same thing with Destinator's SDK and its a bit crap. All you basically get is an activex control that can create and destroy destinator windows. Everything else has to be done using destinators ui.

        If you use the activex control though you don't have to do all the GetWindowByName stuff, it raises an event whenever you create a destinator window, and that event gives you the window handle for it.

        The biggest problem is not being able to tell when it want's to say something so you can mute your mp3 playback. I eventually sorted this by finding out what it uses to play wavs using PE Explorere, then creating a stub winmm.dll to place in destinators directory that doesn't play the wavs, but sends a windows message out when one is ready to be played.

        When this message is received by my app I then mute the mp3, and play the wav passed in the messages parameter. Seems to be working about 95% of the time.

        Has anyone found an easier way of doing this?

        Comment


        • #5
          look @ destinator_sdk.chm in the doc folder of the sdk.

          there's some method & event that you can use for your prog via a destdll.dll...
          (import type library in delphi...)

          But I didn't start to play with...
          Epia M9000, lili 7" vga&touch & 2xTM-7002S compo, camera with reversed image, 2.5" 60 GB, 256Mb DDR, Opus 90W, GPS usb... AND MEDIACRUISER of course!

          Comment

          Working...
          X