Menu

Positioning of a Standard Dialog Box

2008-07-20
2012-09-26
  • Guenter Meinel

    Guenter Meinel - 2008-07-20

    Hello Dev-C++ Friends,

    I use the compiler for Windows-GUI applications.
    In started off with the example "FileEditor" as a base for my own application. The problem now is as follows:
    since recently, I work with two monitors. When I start FileEditor, move the window to the second monitor and try to open a file, the open-dialog is displayed on the first monitor.
    Windows treats the two monitors as if they were just one monitor with double width. Independendly of the two-monitor-situation, I can therefore formulate my question: how can I position the dialog form in relation to the position of the main window?

    Regards,
    Guenter.

     
    • Guenter Meinel

      Guenter Meinel - 2008-07-24

      Hello Old Newbie,

      Thank you for the hint.
      However, in the example "FileEditor"(part of the download package of DEV-C++),
      there is no "CreateDialog()" function, but "GetSaveFileName(&ofn)".
      Within the struct "ofn", the member
      "ofn.hwndOwner" is set to hwnd, which should be the parant window, but does not have any positioning effect.

      Regards,
      Guenter.

       
    • Anonymous

      Anonymous - 2008-07-23

      In the CreateDialog() function, the hWndParent parameter must point to the main window.

      HTH.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.