Home > Software engineering >  How do I open the window in the vice screen?
How do I open the window in the vice screen?

Time:10-21

My host has two monitors, hope to create a window in the vice screen on or in the main screen display switch, how to operate?

CodePudding user response:

: : AdjustWindowRectEx (& amp; Rect1, PWND - & gt; GetStyle (), TRUE, PWND - & gt; GetExStyle ());

Use this to get the size of the window, and then to allow the program to set up your window,

CodePudding user response:

reference 1st floor jennyvenus response:
: : AdjustWindowRectEx (& amp; Rect1, PWND - & gt; GetStyle (), TRUE, PWND - & gt; GetExStyle ());

Use this to get the size of the window, and then to make the procedure to set the position of the window, you


I feel is not the principle, I look at the others people's program, there is a button, select the home screen, window will jump to the home screen shows that choosing a vice screen, jump into vice screen window shows, and is a full screen, then again, when the host answered the two screen, and the resolution of the two Windows is different, there should be two Windows, you get is that the size of the window?

CodePudding user response:

http://charmvi.blog.163.com/blog/static/1288080392011102195649554/

CodePudding user response:

reference VisualEleven reply: 3/f
http://charmvi.blog.163.com/blog/static/1288080392011102195649554/

According to the method tried, what all don't do love, under the condition of only in the test procedure to add a header file
# define COMPILE_MULTIMON_STUBS
# include "multimon. H"
Those words, didn't do anything else, a compile-time error, said I redefine,
If not, call related functions and said no definition, collapse,

CodePudding user response:

# include "multimon. H"
By multiple file # include??

CodePudding user response:

reference 5 floor VisualEleven reply:
# include "multimon. H
"By multiple file # include??

No, nothing to do, can you help me have a try, to build a dialog based application, do nothing, just in the main program header file with the two other
# define COMPILE_MULTIMON_STUBS
# include "multimon. H"
So a bunch of redefine error,

CodePudding user response:

EnumDisplayMonitors

For each area of the screen information CRect (namely the area of the home screen and vice screen information), to window of the vice screen, depending on the vice screen area information, MoveWindow will do in the past, it's as simple as that

CodePudding user response:

refer to 7th floor cvbtvbwu response:
EnumDisplayMonitors

For each area of the screen information CRect (namely the area of the home screen and vice screen information), to window of the vice screen, depending on the vice screen area information, MoveWindow past went, so simple

How to get the screen area?

CodePudding user response:

The use of EnumDisplayMonitors, search the function

CodePudding user response:

references 9 f cvbtvbwu response:
EnumDisplayMonitors, search the function of use

That is set in the header file is introduced into the statement times wrong:
# define COMPILE_MULTIMON_STUBS
# include "multimon. H"

CodePudding user response:

Write the two sentences in the h file error indeed,
Put the two sentences in CPP can be normal use EnumDisplayMonitors inside the
  • Related