Results 1 to 4 of 4

Thread: Masquerading skinned application

  1. #1
    Variable Bitrate
    Join Date
    Jul 2006
    Location
    Brisbane, Australia
    Posts
    346

    Masquerading skinned application

    Hi guys,

    I wonder if anybody has got any ideas about this.

    We want to embed OzieExplorer, a topographcial mapping application into RR. When doing this from RR, Ozie is not very well behaved if embedded in RR and we are close to completing a Skinbedder skin for it. See OziExplorer

    Ozie has an interface DLL and I am considering writing a RR plugin for it using Visual C as being able to access some features from RR will also be very useful. This DLL requires the Ozie application to be open and communicates with Ozie using the same WM_COPYDATA messaging that RR uses. However, once the OziExplorer application is embedded in Skinbedder, its window name and class disappears so it can't be found.

    I think the only solution around this problem is that the RR Plugin needs to open a hidden window with the same class and name details as the Oziexplorer application (so the Ozie DLL can find an application) and intercept the messages from the Ozie DLL and redirect them to Skinbedder.

    Ani ideas, thoughts or sample code would be appreciated.

    Rod

  2. #2
    Super Moderator
    Auto Apps:loading...
    JohnWPB's Avatar
    Join Date
    Sep 2005
    Location
    West Palm Beach, Florida
    Posts
    4,692
    Blog Entries
    1
    I know absolutely nothing about Visual C, but I do know that AutoIt has an option to look for child windows (Such as just about any program that is embedded into RR is)

    There is most likely a way to do the same thing in Visual C.

    There is also the option to look for the window handle, instead of just the name.

    In AutoIt for instance the command is: Opt("WinSearchChildren", 2).

    I am clueless to Visual C, but hopefully that will give you a direction to look get it to work.
    Front End of Choice: Ride Runner (Is there anything else??? ) & Powered by the DFX5.1 Skin Available in the Mobile App Mart

    My Fiero Build Thread

  3. #3
    Variable Bitrate
    Join Date
    Jul 2006
    Location
    Brisbane, Australia
    Posts
    346
    Thanks John, that is useful info. I tracked it down in VC

    So the approach will be to:
    1. use FindWindow to find the toplevel window handle (in this case SkinBedder)
    2. use FindWindowEx to find the child window (in this case OzieExplorer)
    3. Raise a new window with the same name and class as the OziExplorer
    4. Capture the WM_COPYDATA messages that the Ozi DLL sends to the OziExplorer application. Still researcing that one, but I got some sample code somewhere

    Rod

  4. #4
    Variable Bitrate
    Join Date
    Jul 2006
    Location
    Brisbane, Australia
    Posts
    346
    Thanks for the tip, I got this working, It was simply a matter of opening a window, drilling own into Skinbedder a couple of levels to find the window I needed and then using the Windows messaging loop to relay messages each way. I am doing thi sin a simple application that opens a window.

    Now all I need to do is write the DLL. Hopefully I can move the magic window into the DLL so I don't need to have a separate window open to do the magic.

    Here is the message processing code:
    Code:
    	case WM_COPYDATA:
    		cd = (PCOPYDATASTRUCT) lParam;
    		if(hWnd == Ozi){
    			// The data has come from Ozie, send to the DLL
    			RetVal = SendMessage(OziDLL,WM_COPYDATA, wParam, lParam);
    			return RetVal;
    		}
    		else{
    			// Not from Sb, must be from DLL
    			OziDLL = hWnd;	// Save the DLL handle	
    			RetVal = SendMessage(Ozi,WM_COPYDATA, wParam, lParam);
    			return RetVal;
    		}
    		break;
    And here is the code to dig out the window.
    Code:
       Sb = FindWindow(NULL,"OziEmbedded"); //SB Window Title
       if(Sb){
    		OziWindow = FindWindowEx(Sb,NULL,"TWindowContainer","OZIWINDOW");  //SB  embed statement
    		if (OziWindow){
    			Ozi = FindWindowEx(OziWindow,NULL,"TfmMainForm",NULL); //The Window we want
    		}
       }
    Rod

Similar Threads

  1. Skin Embedding Application Problem
    By JohnWPB in forum Road Runner
    Replies: 9
    Last Post: 04-19-2008, 04:41 PM
  2. Replies: 5
    Last Post: 01-19-2007, 11:55 PM
  3. Replies: 0
    Last Post: 09-23-2006, 08:38 PM
  4. Notifying child application of Hibernation wakeup
    By mullaly in forum Road Runner
    Replies: 2
    Last Post: 04-24-2006, 03:44 AM
  5. How to embbed any Application in RR ?
    By guino in forum RR FAQ
    Replies: 0
    Last Post: 03-20-2005, 12:35 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •