Re: How to show a Tab Control at the top of the Z order

From: JohnL (hiliuzhe_at_hotmail.com)
Date: 09/09/04

  • Next message: Adam Getchell: "ASP.NET mismatch"
    Date: Thu, 9 Sep 2004 09:29:45 -0600
    
    

    Great! The problem is solved!

    Norman, could you please recommend me several books or documents so I can
    learn this type of tips myself? I would like to know where you learned it.

    Thank you very much.

    John

    "Norman Bullen" <norm@BlackKittenAssociates.com.INVALID> wrote in message
    news:UwQ%c.10958$w%6.6722@newsread1.news.pas.earthlink.net...
    > JohnL wrote:
    > > 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);
    > >
    > >
    > Child windows are generally allowed to paint anywhere within their
    > parent's client area so, regardless of Z-order, one child window (e.g.
    > your bitmap) might paint an area that was just painted by another child
    > window (e.g. your tab control) making the first window painted disappear.
    >
    > You can prevent this by adding the WS_CLIPSIBLINGS to the bitmap window.
    > This will prevent it from painting any area occupied by other child
    windows.
    >
    > Norm
    >
    > --
    > --
    > To reply, change domain to an adult feline.
    >


  • Next message: Adam Getchell: "ASP.NET mismatch"

    Relevant Pages

    • Re: How to show a Tab Control at the top of the Z order
      ... >> after the program runs, only the Bitmap is shown, and the Tab Control ... > Child windows are generally allowed to paint anywhere within their ... > window making the first window painted disappear. ...
      (microsoft.public.windowsce.embedded.vc)
    • Re: How to show a Tab Control at the top of the Z order
      ... >> after the program runs, only the Bitmap is shown, and the Tab Control ... > Child windows are generally allowed to paint anywhere within their ... > window making the first window painted disappear. ...
      (microsoft.public.win32.programmer.ui)
    • Re: How to show a Tab Control at the top of the Z order
      ... >> after the program runs, only the Bitmap is shown, and the Tab Control ... > Child windows are generally allowed to paint anywhere within their ... > window making the first window painted disappear. ...
      (microsoft.public.pocketpc.developer)
    • Re: How to show a Tab Control at the top of the Z order
      ... > I want to show a Tab Control at the top of a big Bitmap control. ... Child windows are generally allowed to paint anywhere within their ... This will prevent it from painting any area occupied by other child windows. ...
      (microsoft.public.win32.programmer.ui)
    • Re: How to show a Tab Control at the top of the Z order
      ... > I want to show a Tab Control at the top of a big Bitmap control. ... Child windows are generally allowed to paint anywhere within their ... This will prevent it from painting any area occupied by other child windows. ...
      (microsoft.public.pocketpc.developer)