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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2008-07-23
In the CreateDialog() function, the hWndParent parameter must point to the main window.
HTH.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
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.
In the CreateDialog() function, the hWndParent parameter must point to the main window.
HTH.