Loading ...
Sorry, an error occurred while loading the content.

Get "CWindow " Object from "HWND" ?

Expand Messages
  • shuaixh
    A WTL CWindow Object wraps a HWND in its m_hWnd member . In MFC ,there is some way to get HWND from CWnd ,CWnd ::FromHandle(),or
    Message 1 of 2 , Mar 1, 2007
    • 0 Attachment
      A WTL "CWindow" Object wraps a HWND in its " m_hWnd " member .

      In MFC ,there is some way to get HWND from CWnd ,CWnd ::FromHandle(),or
      CWnd::FromhandlePermanent().
      Is there any way to get a HWND 's Wrapper (if it really exists)in WTL ?
    • Andrea De Nardis
      Hi, I think you do not need it since CWindow is a very ligthweigth class, you only need to use the contex constructor: HWND hwnd = /* initialize the window
      Message 2 of 2 , Mar 1, 2007
      • 0 Attachment
        Hi,

        I think you do not need it since CWindow is a very ligthweigth
        class, you only need to use the contex constructor:

        HWND hwnd = /* initialize the window handle */;

        CWindow wnd (hwnd);



        Hope this helps.

        Regards,

        Andrea



        -----Messaggio originale-----
        Da: wtl@yahoogroups.com [mailto:wtl@yahoogroups.com] Per conto di shuaixh
        Inviato: giovedì 1 marzo 2007 9.42
        A: wtl@yahoogroups.com
        Oggetto: [wtl] Get "CWindow " Object from "HWND" ?



        A WTL "CWindow" Object wraps a HWND in its " m_hWnd " member .

        In MFC ,there is some way to get HWND from CWnd ,CWnd ::FromHandle(),or
        CWnd::FromhandlePermanent().
        Is there any way to get a HWND 's Wrapper (if it really exists)in WTL ?





        [Non-text portions of this message have been removed]
      Your message has been successfully submitted and would be delivered to recipients shortly.