Resizing controls on the fly
-
Can anyone help me with this ? I tried resizing controls like buttons and edit box using the CWnd function SetWindowPos. There this function needs a valid HWND which i found that controls don't have. Anyone have a solution? I would great apprieciate it... Nyon
-
Can anyone help me with this ? I tried resizing controls like buttons and edit box using the CWnd function SetWindowPos. There this function needs a valid HWND which i found that controls don't have. Anyone have a solution? I would great apprieciate it... Nyon
Are you talking about the first parameter of CWnd::SetWindowPos()? You only use that if you are changing the Z-order of the control (in dialogs, Z-order determines the tab order of the dialog's controls). Just pass NULL for that parameter, and be sure to include the SWP_NOZORDER flag to indicate you're not changing the Z-order. --Mike-- ================== The original message was: Can anyone help me with this ? I tried resizing controls like buttons and edit box using the CWnd function SetWindowPos. There this function needs a valid HWND which i found that controls don't have. Anyone have a solution? I would great apprieciate it...
Nyon
-
Are you talking about the first parameter of CWnd::SetWindowPos()? You only use that if you are changing the Z-order of the control (in dialogs, Z-order determines the tab order of the dialog's controls). Just pass NULL for that parameter, and be sure to include the SWP_NOZORDER flag to indicate you're not changing the Z-order. --Mike-- ================== The original message was: Can anyone help me with this ? I tried resizing controls like buttons and edit box using the CWnd function SetWindowPos. There this function needs a valid HWND which i found that controls don't have. Anyone have a solution? I would great apprieciate it...
Nyon
No. I know what the first parameter of SetWindowPos() functions do. What I mean was in the SetWindowPos() function, they check if the control that was calling this function a valid window. In fact, they do an assertion check ASSERT(::IsWindow(m_hWnd)); and i found out that this value is NULL for all controls. Thus I was asking if anyone know a workaround for this or has any solutions. Thanks. ================== The original message was: Are you talking about the first parameter of CWnd::SetWindowPos()? You only use that if you are changing the Z-order of the control (in dialogs, Z-order determines the tab order of the dialog's controls). Just pass NULL for that parameter, and be sure to include the SWP_NOZORDER flag to indicate you're not changing the Z-order.
--Mike--
==================
The original message was:Can anyone help me with this ? I tried resizing controls like buttons and edit box using the CWnd function SetWindowPos. There this function needs a valid HWND which i found that controls don't have. Anyone have a solution? I would great apprieciate it...
Nyon
-
No. I know what the first parameter of SetWindowPos() functions do. What I mean was in the SetWindowPos() function, they check if the control that was calling this function a valid window. In fact, they do an assertion check ASSERT(::IsWindow(m_hWnd)); and i found out that this value is NULL for all controls. Thus I was asking if anyone know a workaround for this or has any solutions. Thanks. ================== The original message was: Are you talking about the first parameter of CWnd::SetWindowPos()? You only use that if you are changing the Z-order of the control (in dialogs, Z-order determines the tab order of the dialog's controls). Just pass NULL for that parameter, and be sure to include the SWP_NOZORDER flag to indicate you're not changing the Z-order.
--Mike--
==================
The original message was:Can anyone help me with this ? I tried resizing controls like buttons and edit box using the CWnd function SetWindowPos. There this function needs a valid HWND which i found that controls don't have. Anyone have a solution? I would great apprieciate it...
Nyon
Sorry, I found the solutions for this. Thanks Anyway. Nyon ================== The original message was: No. I know what the first parameter of SetWindowPos() functions do. What I mean was in the SetWindowPos() function, they check if the control that was calling this function a valid window. In fact, they do an assertion check
ASSERT(::IsWindow(m_hWnd));
and i found out that this value is NULL for all controls. Thus I was asking if anyone know a workaround for this or has any solutions. Thanks.
==================
The original message was:Are you talking about the first parameter of CWnd::SetWindowPos()? You only use that if you are changing the Z-order of the control (in dialogs, Z-order determines the tab order of the dialog's controls). Just pass NULL for that parameter, and be sure to include the SWP_NOZORDER flag to indicate you're not changing the Z-order.
--Mike--
==================
The original message was:Can anyone help me with this ? I tried resizing controls like buttons and edit box using the CWnd function SetWindowPos. There this function needs a valid HWND which i found that controls don't have. Anyone have a solution? I would great apprieciate it...
Nyon