I am using Visual C++ 6.0 and eMbedded Visual C++ 4.0.
The question seems easy at the first look:
I want to show a Tab Control at the top of a big Bitmap control. However,
after the program runs, only the Bitmap is shown, and the Tab Control cannot
be shown until it is clicked. I tried SetWindowPos() function to set the Tab
Control to the topmost, and ShowWindow() as well, but still no success. I
also modified the Tab Control style to WS_EX_TOPMOST in resource file, but
still no luck (see the following).
Could anybody help me to solve the problem?
John
In resource file, from CONTROL
"Tab1",IDC_TAB_FWS,"SysTabControl32", 0x0,47,71,185,192
to CONTROL
"Tab1",IDC_TAB_FWS,"SysTabControl32", WS_EX_TOPMOST,47,71,185,192
//and
RECT * lpRect = new RECT();
GetDlgItem (IDC_TAB_FWS)->GetWindowRect (lpRect);
GetDlgItem (IDC_TAB_FWS)->SetWindowPos ( &wndTopMost, lpRect->left,
lpRect->top,
lpRect->right - lpRect->left ,
lpRect->bottom - lpRect->top , SWP_SHOWWINDOW );
//or
GetDlgItem (IDC_TAB_FWS)->BringWindowToTop();
//or
GetDlgItem (IDC_TAB_FWS)->ShowWindow ( SW_SHOW);