Home > Software engineering >  MFC window cannot be dragged across the screen edge up.
MFC window cannot be dragged across the screen edge up.

Time:09-16

Wrote one and a half through the window, the window shift to the left right down can be removed from the screen, but move up as long as the screen to loosen the left mouse button will back to ordinate 0 position, can not find is what reason, setwindowpos can move out directly, but as long as drag will bounce back, like when buttonup do processing, but I didn't override this function,

CodePudding user response:

I have never seen the MFC systematics, also don't know what to ask, this kind of situation is that automatic adsorption, I see a lot of software is such, but also to see some game client can be moved out from above, the same project at hand can be moved out, I don't know what is wrong,

CodePudding user response:

O give point force, old man!

CodePudding user response:

Should be high version Windows explorer processing window positioning effect, not the problem of MFC, you put the program to get the old version of Windows, such as xp, may not be such a

CodePudding user response:

reference 3 floor early play play nuclear response:
should be high version Windows explorer processing window positioning effect, not the problem of MFC, you put the program to get the old version of Windows, such as xp, may not be the case

I know is what reason, when I take WS_CAPTION attributes or using WM_NCHITTTEST choose return a custom range of titles, the window will not be able to go out from above, but is similar to the adsorption on the edge, and when I choose to give up the title drag and his initiative to drag in onm ousemove message function can go out, like as long as the window there is a title will not be able to drag out from above,

CodePudding user response:

Knot posted, to summarize, the title bar of the window across the screen on the border, so reckless move in to window still want to write their own mobile function, as to how to write I put a link to https://blog.csdn.net/zjccsg/article/details/51926084
  • Related