SetWindowPos()- problem - Unable to move the control

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top