Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MoveWindow (x,y) limits?

Status
Not open for further replies.

jwonglina

Programmer
Joined
Feb 16, 2006
Messages
1
Location
GB

I am making an MFC application where, inside a CScrollView, I want have a stack of dialogs going down the CScrollView. The way I am doing this is that each time I create a new dialog, I call MoveWindow to move it underneath the previous one.

The problem I am having is that it seems that after I insert about 200 windows (each about 160 high), the new windows will not go any lower than the position of y = 32767 (SHRT_MAX).

I was initially thinking that the problem must be because of some sort of limit on the CScrollView size, but that doesn't seem to be the case, as I can scroll below y=32767 (but my dialogs are stuck at 32767). So it seems that there is some sort of limit for setting the location of a dialog? I've tried overriding OnGetMinMaxInfo in my dialog class but for some strange reason that does not get call when MoveWindow is called, contary to what I believe the MFC documentation says. I've also tried SetWindowPos and the result is the same.

Has anyone encountered a similar problem? Would greatly appreciate any help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top