CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 11 of 11
  1. #1
    Join Date
    Jul 2007
    Posts
    52

    Unhappy DLL modeless dialog & QT big big problem

    Hi all,

    My application uses QT to render its interface but I recently encountered a big problem: my application loads a modeless dialog from an external mfc dll; because of mfc architecture PreTranslateMessage isn't called for my modeless dialog, so I thought forwarding the modeless dialog's messages would be the only solution, but now my problem rises:

    QT don't support PreTranslateMessage.

    I really need a great idea to solve this problem. Please help me.

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: DLL modeless dialog & QT big big problem

    What is "QT"?
    Victor Nijegorodov

  3. #3
    Join Date
    Jul 2007
    Posts
    52

    Re: DLL modeless dialog & QT big big problem

    I think you can't help me without knowing QTs, however QT is a developer framework to design GUIs. It is cross-platform so you can have the same gui-feel on every os.

  4. #4
    Join Date
    Feb 2002
    Posts
    4,640

    Re: DLL modeless dialog & QT big big problem

    Quote Originally Posted by VictorN
    What is "QT"?
    http://trolltech.com/products/qt/

    Viggy

  5. #5
    Join Date
    Mar 2003
    Location
    India {Mumbai};
    Posts
    3,871

    Re: DLL modeless dialog & QT big big problem

    Well, what is supposed to be done in PreTranslateMessage? Something specific that cannot be handled otherwise (I forgot the terms used in QT for events handling!)
    My latest article: Explicating the new C++ standard (C++0x)

    Do rate the posts you find useful.

  6. #6
    Join Date
    Sep 2004
    Location
    Holland (land of the dope)
    Posts
    4,123

    Re: DLL modeless dialog & QT big big problem

    I forgot the terms used in QT for events handling
    Slots and Signals ?

    It's true, QT doesn't have PreTranslate. I think you need to do your pretranslate stuff in MFC and split it in single events so you can trigger QT.

  7. #7
    Join Date
    Mar 2003
    Location
    India {Mumbai};
    Posts
    3,871

    Re: DLL modeless dialog & QT big big problem

    Slots and Signals ?
    Yes!!
    My latest article: Explicating the new C++ standard (C++0x)

    Do rate the posts you find useful.

  8. #8
    Join Date
    Jul 2007
    Posts
    52

    Re: DLL modeless dialog & QT big big problem

    Quote Originally Posted by Skizmo
    I think you need to do your pretranslate stuff in MFC and split it in single events so you can trigger QT.
    Can you better explain what does this mean please?

  9. #9
    Join Date
    Mar 2003
    Location
    India {Mumbai};
    Posts
    3,871

    Re: DLL modeless dialog & QT big big problem

    My application uses QT to render its interface but I recently encountered a big problem: my application loads a modeless dialog from an external mfc dll; because of mfc architecture PreTranslateMessage isn't called for my modeless dialog, so I thought forwarding the modeless dialog's messages would be the only solution, but now my problem rises
    Well, which library does exactly display the dialog box? MFC or QT?
    What's the real issue? I mean if you can load modelless dialog box in MFC or QT, why you need mixing them?
    My latest article: Explicating the new C++ standard (C++0x)

    Do rate the posts you find useful.

  10. #10
    Join Date
    Feb 2002
    Posts
    4,640

    Re: DLL modeless dialog & QT big big problem

    Actually, I would think that mixing MFC and QT would defeat the purpose of using QT (not cross platform anymore!).

    Viggy

  11. #11
    Join Date
    Jul 2007
    Posts
    52

    Re: DLL modeless dialog & QT big big problem

    Sorry for answering so late but I had some more problems.

    I solved this way: I created a thread in the main QT application and loaded the mfc library with the main window as modal.

    Modeless dialog with QT application was not an acceptable solution because it needed to implement a message pump dispatcher

    This seems a more acceptable solution

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured