Professional Web Applications Themes

Parent window for modal dialog - Adobe Acrobat SDK

What is the best way to get a parent window for a modal dialog? Currently, I am using the following code: HWND hParent = WinAppGetModalParent(AVAppGetActiveDoc()); This does not always seem to return the proper window. To complicate things further, what I really need is a solution that will give me the proper parent window for files that are displayed either in an Acrobat window or in a browser window. Any suggestions?...

  1. #1

    Default Parent window for modal dialog

    What is the best way to get a parent window for a modal dialog? Currently, I am using the following code:

    HWND hParent = WinAppGetModalParent(AVAppGetActiveDoc());

    This does not always seem to return the proper window. To complicate things further, what I really need is a solution that will give me the proper parent window for files that are displayed either in an Acrobat window or in a browser window.

    Any suggestions?
    Mark_Cleveland@adobeforums.com Guest

  2. #2

    Default Re: Parent window for modal dialog

    If you are playing at this level of the OS - why not just use all OS calls and avoid the SDK all together??

    And can you explain WHY you are doing this?

    Leonard
    Leonard_Rosenthol@adobeforums.com Guest

  3. #3

    Default Re: Parent window for modal dialog

    Leonard,

    Thanks for the reply. Here is some additional detail. All of the dialogs (other than simple AVAlertNote types) are MFC based. We have created a subclass of MFC's CDialog class to handle the Acrobat-related stuff (like AVAppBeginModal). The CDialog constructor takes a CWnd object as the parent window for the dialog, so I need to obtain the proper parent window, create a CWnd from it, and pass that to the constructor when I create a dialog.

    With regard to working in a browser window, one of our plug-ins does expose its tools and can be used inside a browser window, so this is why we need a proper parent for doents inside a browser.

    As to why we do not just use the OS, we cannot always rely on the proper window being the active window (from the OS perspective), since our application interacts not only with Acrobat but also with web-based applications and, in one case, a Windows Explorer extension. Due to the way these 3rd party applications work, and the way IE works, the frontmost window may not be at all related to Acrobat and our application. In many cases, if we are opening the doent in a browser window, it may be a new window, not the window where the action was initiated. Furthermore, if our window is not in front, we'd like to bring it there when we bring up the dialog. An example might help make things clearer: one operation our product does is to retrieve a doent and open it in Acrobat (or in a browser window, depending on settings). Upon opening, we may prompt the user to take some action. This is the case where we most critically need the proper window.

    Does this clarify things for you a bit?

    Mark
    Mark_Cleveland@adobeforums.com Guest

Similar Threads

  1. Modeless dialog parent window in Cocoa
    By ZZmiy@adobeforums.com in forum Adobe Acrobat SDK
    Replies: 4
    Last Post: September 16th, 08:30 AM
  2. How to get flex popup modal dialog to fade entirebrowser window?
    By jmccrillis in forum Macromedia Flex General Discussion
    Replies: 4
    Last Post: April 9th, 03:47 PM
  3. problem with non modal ADM dialog
    By SeanWang@adobeforums.com in forum Adobe Acrobat SDK
    Replies: 1
    Last Post: April 9th, 09:43 AM
  4. Modal Dialog
    By Vidar Petursson in forum ASP.NET Building Controls
    Replies: 0
    Last Post: April 14th, 12:51 PM
  5. Posting data back to a modal dialog window
    By John in forum ASP.NET General
    Replies: 2
    Last Post: July 7th, 02:10 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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139