A
austin
Hi all,
I am facing a problem in using SetWindowPos() . I am handling a
localization project. For this i need to resize and reposition the
dialog controls. I am calling GetWindowRect () to get the control
dimensions and after changing them i am trying to call SetWindowPos()
to place the control to the changed position.
The following code works fine:
SetWindowPos ( hCtrl, 0, ctrlLeft, ctrlTop, ctrlWidth, ctrlHeight,
SWP_NOMOVE );
The API is working fine and also I am able to see the control window on
the parent window now.
But now I want to move the control.I tried the following code..
SetWindowPos ( hCtrl, 0, ctrlLeft, ctrlTop, ctrlWidth, ctrlHeight,
SWP_NOZORDER);
I am not able to see the control window on the parent window now.
I even tried to bring it to top by
SetWindowPos ( hCtrl, HWND_TOP, ctrlLeft, ctrlTop, ctrlWidth,
ctrlHeight, SWP_NOZORDER);
still the same prblm.
Why is this failing? I used the other flags also in place of
SWP_NOZORDER. Except SWP_NOMOVE the rest are not showing the window.I
tried ShowWindow(hCtrl, SW_SHOW) also after it but the result still
fails.
I believe this could be solved. I need this to be resolved at the
earliest. Pls take this and let me know the better option.
Thanks in advance,
Suresh.
I am facing a problem in using SetWindowPos() . I am handling a
localization project. For this i need to resize and reposition the
dialog controls. I am calling GetWindowRect () to get the control
dimensions and after changing them i am trying to call SetWindowPos()
to place the control to the changed position.
The following code works fine:
SetWindowPos ( hCtrl, 0, ctrlLeft, ctrlTop, ctrlWidth, ctrlHeight,
SWP_NOMOVE );
The API is working fine and also I am able to see the control window on
the parent window now.
But now I want to move the control.I tried the following code..
SetWindowPos ( hCtrl, 0, ctrlLeft, ctrlTop, ctrlWidth, ctrlHeight,
SWP_NOZORDER);
I am not able to see the control window on the parent window now.
I even tried to bring it to top by
SetWindowPos ( hCtrl, HWND_TOP, ctrlLeft, ctrlTop, ctrlWidth,
ctrlHeight, SWP_NOZORDER);
still the same prblm.
Why is this failing? I used the other flags also in place of
SWP_NOZORDER. Except SWP_NOMOVE the rest are not showing the window.I
tried ShowWindow(hCtrl, SW_SHOW) also after it but the result still
fails.
I believe this could be solved. I need this to be resolved at the
earliest. Pls take this and let me know the better option.
Thanks in advance,
Suresh.