Remove manual wxProgressDialog centering code
This is not necessary any longer now that we use the correct parent for the dialog window, the task dialog is centered automatically. And unlike our own code, comctl32.dll code always puts the dialog fully on one monitor instead of making it span two of them if the parent window does.
This commit is contained in:
parent
2b8e84ca49
commit
ca7e1d8bd1
1 changed files with 0 additions and 21 deletions
|
|
@ -1128,27 +1128,6 @@ wxProgressDialogTaskRunner::TaskDialogCallbackProc
|
|||
0,
|
||||
MAKELPARAM(0, sharedData->m_range) );
|
||||
|
||||
// We always create this task dialog with NULL parent because our
|
||||
// parent in wx sense is a window created from a different thread
|
||||
// and so can't be used as our real parent. However we still center
|
||||
// this window on the parent one as the task dialogs do with their
|
||||
// real parent usually.
|
||||
if ( sharedData->m_parent )
|
||||
{
|
||||
wxRect rect(wxRectFromRECT(wxGetWindowRect(hwnd)));
|
||||
rect = rect.CentreIn(sharedData->m_parent->GetRect());
|
||||
::SetWindowPos(hwnd,
|
||||
NULL,
|
||||
rect.x,
|
||||
rect.y,
|
||||
-1,
|
||||
-1,
|
||||
SWP_NOACTIVATE |
|
||||
SWP_NOOWNERZORDER |
|
||||
SWP_NOSIZE |
|
||||
SWP_NOZORDER);
|
||||
}
|
||||
|
||||
// If we can't be aborted, the "Close" button will only be enabled
|
||||
// when the progress ends (and not even then with wxPD_AUTO_HIDE).
|
||||
if ( !(sharedData->m_style & wxPD_CAN_ABORT) )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue