User Tag List

Results 1 to 3 of 3

Thread: Subclassing main window?

  1. #1
    No Products Registered

    Join Date
    Jun 2006
    Location
    Texas
    Posts
    1,002
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Subclassing main window?

    Hey everyone . I am working on a com extension and I have it so the class posts messages back to the owner. This is great and I have it all working fine but in order to be able to retrieve the Rundata structure I had to subclass the main window O_o.

    Something like this:

    Code:
    	rdPtr->hwnd[0]=rdPtr->rHo.hoAdRunHeader->rhHEditWin;
    	rdPtr->rWindowNumber = MAX_WINDOWS;
    	rdPtr->rHo.hoOffsetToWindows = (int)((LPBYTE)&rdPtr->rWindowNumber - (LPBYTE)rdPtr);
    	 callRunTimeFunction(rdPtr, RFUNCTION_SUBCLASSWINDOW, 0, 0);
    I want to know why we have to do this or if there is an easier way.

    Thanks .

  2. #2
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    14,022
    Mentioned
    279 Post(s)
    Tagged
    3 Thread(s)

    Re: Subclassing main window?

    It's not recommended at all, that could generate conflicts and maybe infinite loops, and the window won't be unsubclassed.

    You should attach rdPtr as a property to the window with SetProp and retrieve it with GetProp (basically that's a part of what the subclass function of the runtime does).

    Note that there will be a problem if there could be several instances of your object in the frame. In this case you have to attach a list of rdPtr to the window.

  3. #3
    No Products Registered

    Join Date
    Jun 2006
    Location
    Texas
    Posts
    1,002
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Subclassing main window?

    Ah, thanks for the information . Makes sense now.

Similar Threads

  1. Subapplication pop-up: Get main application window to appear over pop-up sub-app
    By Ryan in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 15th July 2013, 08:18 AM
  2. Main Volume
    By weka in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 7th May 2009, 09:51 PM
  3. Sharing window settings with sub/main apps.
    By camelman in forum Multimedia Fusion 2 - Technical Support
    Replies: 12
    Last Post: 6th May 2009, 02:40 AM
  4. Interactivity with Sub App & main app?
    By N64Mario in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 2nd May 2009, 03:54 AM
  5. second installation after the main
    By HardCOLE in forum Install Creator and Patch Maker
    Replies: 5
    Last Post: 11th November 2008, 01:49 PM

Posting Permissions

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