RE: Using a CTreeViewCtrl in a view class in conjunction with a TreeView DIALOG reso

davies Jonathan <jonathangdavies-XZoyATsUNX5Wk0Htik3J/[email protected]>
Newsgroups gmane.comp.windows.wtl
Message-ID <[email protected]>
Robert, Hows this?

...

IDD_TREEDIALOG DIALOGEX 0, 0, 419, 334

STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION |
WS_SYSMENU

CAPTION "Dialog"

FONT 8, "MS Shell Dlg", 400, 0, 0x1

BEGIN

    DEFPUSHBUTTON   "OK",IDOK,357,7,50,14

    PUSHBUTTON      "Cancel",IDCANCEL,357,24,50,14

    CONTROL         "",IDC_TREE1,"SysTreeView32",WS_BORDER |
WS_TABSTOP,7,7,251,165

...

-----------------------------------------------------------------------------

class CTreeDlg :  public CDialogImpl<CTreeDlg>,

                              public CMessageFilter,

                              public CIdleHandler

{

private:

      CTreeViewCtrlEx m_TreeView;

...

// Dialog Data

      enum { IDD = IDD_TREEDIALOG };

...

-----------------------------------------------------------------------------

LRESULT CTreeDlg::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM
/*lParam*/, BOOL& /*bHandled*/)

{

      // Attach ATL Control wrappers
      m_TreeView.Attach(GetDlgItem(IDC_TREE1));


    // The TVS_SHOWSELALWAYS style causes a selected item to remain selected
when the tree-view control loses focus
    m_TreeView.ModifyStyle(0, TVS_HASLINES | TVS_LINESATROOT |
TVS_HASBUTTONS | TVS_SHOWSELALWAYS );

    ...



Jonathan


[Non-text portions of this message have been removed]



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/wtl/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/wtl/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.