MCPcopy Index your code
hub / github.com/DreamSourceLab/DSView / ResizeChild

Method ResizeChild

DSView/pv/winnativewidget.cpp:508–540  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

506}
507
508void WinNativeWidget::ResizeChild()
509{
510 if (_childWindow != NULL){
511
512 int k = GetDevicePixelRatio();
513
514 if (_shadow != NULL){
515 _shadow->setScale(k);
516 _shadow->moveShadow();
517 }
518
519 RECT rc;
520 GetClientRect(_hWnd, &rc);
521
522 int x = 0;
523 int y = 0;
524 int w = rc.right - rc.left;
525 int h = rc.bottom - rc.top;
526
527 if (IsMaxsized()){
528 int borderSizeX = GetSystemMetrics(SM_CXSIZEFRAME) - 2;
529 int borderSizeY = GetSystemMetrics(SM_CYSIZEFRAME) - 2;
530 x += borderSizeX;
531 y += borderSizeY;
532 w -= borderSizeX * 2;
533 h -= borderSizeY * 2;
534 }
535
536 MoveWindow(_childWindow, x, y, w + 1 , h + 1 , 1);
537 MoveWindow(_childWindow, x, y, w , h , 1);
538 _childWidget->updateGeometry();
539 }
540}
541
542bool WinNativeWidget::isActiveWindow()
543{

Callers 3

WndProcMethod · 0.95
AttachNativeWindowMethod · 0.80

Calls 2

setScaleMethod · 0.80
moveShadowMethod · 0.80

Tested by

no test coverage detected