10-24-2005 07:34 AM
step1: m_iPanel = LoadPanelEx (iParentPanel, "uirfile.uir", P, __CVIUserHInst);
then I obtain the windows handle of the panel (m_iPanel) via:
step2: GetPanelAttribute(m_iPanel, ATTR_SYSTEM_WINDOW_HANDLE, &hWnd);
notice: if the first parameter (iParentPanel) in step1 is 0, step2 success, otherwise the hWnd always be 0.
is this a bug of CVI or should I do something else?
thanks advance!
10-24-2005 09:41 AM
This is actual expected behaviour of the function. As is said in the help for ATTR_SYSTEM_WINDOW_HANDLE attribute:
Description: A number that can be cast to obtain the system-specific window handle for a top-level panel.
The actual type of the value is HWND.
The value is zero for child panels.
10-25-2005 01:00 AM