Auxiliary windows docked to the board window from below or to the right, which are
pushed out of view when the board window resizes, will be trimmed to just touch the
diplay edge (if sufficient width or height remains). When the board window shrinks,
auxiliary windows touching the edge will be resized so they remain touching it.
\r
VOID EditTagsProc(void);\r
extern HWND editTagsDialog;\r
\r
VOID EditTagsProc(void);\r
extern HWND editTagsDialog;\r
+extern int screenWidth, screenHeight;
int delta_y = new_h - (lprcOldPos->bottom - lprcOldPos->top);\r
\r
/* Adjust size & placement */\r
int delta_y = new_h - (lprcOldPos->bottom - lprcOldPos->top);\r
\r
/* Adjust size & placement */\r
- if(pwpChild->x + pwpChild->width >= lprcOldPos->right )\r
+ if(pwpChild->x + pwpChild->width >= lprcOldPos->right &&\r
+ (pwpChild->x + pwpChild->width < screenWidth - 5 || delta_x > 0) ) // keep right edge glued to display edge if touching\r
pwpChild->width += delta_x;\r
pwpChild->width += delta_x;\r
- if(pwpChild->y + pwpChild->height >= lprcOldPos->bottom )\r
+ if(pwpChild->x + pwpChild->width >= screenWidth ) // don't move right edge off screen\r
+ pwpChild->width = screenWidth - pwpChild->x;\r
+ if(pwpChild->y + pwpChild->height >= lprcOldPos->bottom &&\r
+ (pwpChild->y + pwpChild->height < screenHeight - 35 || delta_y > 0) ) // keep bottom edge glued to display edge if touching\r
pwpChild->height += delta_y;\r
pwpChild->height += delta_y;\r
+ if(pwpChild->y + pwpChild->height >= screenHeight - 30 ) // don't move bottom edge off screen\r
+ pwpChild->height = screenHeight - 30 - pwpChild->y;\r
if(pwpChild->x >= lprcOldPos->right) pwpChild->width -= delta_x, pwpChild->x += delta_x;\r
if(pwpChild->y >= lprcOldPos->bottom) pwpChild->height -= delta_y, pwpChild->y += delta_y;\r
if(pwpChild->x >= lprcOldPos->right) pwpChild->width -= delta_x, pwpChild->x += delta_x;\r
if(pwpChild->y >= lprcOldPos->bottom) pwpChild->height -= delta_y, pwpChild->y += delta_y;\r
+ if(pwpChild->width < 30) pwpChild->width = 30; // force minimum width\r
+ if(pwpChild->height < 50) pwpChild->height = 50; // force minimum height\r
/* Move window */\r
if( hWndChild != NULL ) {\r
SetWindowPos( hWndChild, HWND_TOP,\r
/* Move window */\r
if( hWndChild != NULL ) {\r
SetWindowPos( hWndChild, HWND_TOP,\r