Notifications
Clear all

[Closed] SDK Changing Height

Hi, I am trying to change the height of my Tab Control when I change the height of my Dialog. The code I have got works, but as its constantly refreshing, it doesn’t take long for it to crash.
Code is Below:

case WMSZ_BOTTOM:
     					if(theSpringboard.OldCorCY != ((LPRECT)lParam)->bottom - ((LPRECT)lParam)->top){
     						int AddHeight = (((LPRECT)lParam)->bottom - ((LPRECT)lParam)->top) - theSpringboard.OldCorCY;
     						theSpringboard.OldCorCY += AddHeight;
     						RECT r;
     						HWND h = GetDlgItem(theSpringboard.floaterHWND, IDC_TAB_CTRL);
     						GetWindowRect(h, &r); //get window rect of control relative to screen
     						theSpringboard.TabH = r.bottom - r.top;
     						theSpringboard.TabH += AddHeight;
     						POINT pt = { r.left, r.top }; //new point object using rect x, y
     						ScreenToClient(theSpringboard.floaterHWND, &pt); //convert screen co-ords to client based points
     						
     						MoveWindow(h, pt.x, pt.y, r.right - r.left, theSpringboard.TabH, TRUE);
     					
     
     						h = NULL;
     						
     					}
     					break;

Is there a better way of doing this ??