Click here to Skip to main content
16,011,358 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to set internet explorer options in code Pin
Peter Molnar3-Dec-03 14:26
Peter Molnar3-Dec-03 14:26 
GeneralRe: How to set internet explorer options in code Pin
Salvador Dali3-Dec-03 22:13
Salvador Dali3-Dec-03 22:13 
GeneralProblem with pTreectrl->Create(...); Pin
bilas3-Dec-03 2:33
bilas3-Dec-03 2:33 
GeneralRe: Problem with pTreectrl->Create(...); Pin
Jörgen Sigvardsson3-Dec-03 2:40
Jörgen Sigvardsson3-Dec-03 2:40 
GeneralRe: Problem with pTreectrl->Create(...); Pin
Antti Keskinen3-Dec-03 2:52
Antti Keskinen3-Dec-03 2:52 
GeneralRe: Problem with pTreectrl->Create(...); Pin
bilas3-Dec-03 3:40
bilas3-Dec-03 3:40 
GeneralRe: Problem with pTreectrl->Create(...); Pin
RChin3-Dec-03 5:14
RChin3-Dec-03 5:14 
GeneralRe: Problem with pTreectrl->Create(...); Pin
Antti Keskinen3-Dec-03 5:28
Antti Keskinen3-Dec-03 5:28 
Ok, I'll post a small code fragment to help you out. Here, we assume that the name of your dialog class is CMyDialog, and that the .cpp file you mentioned contains the implementation of the class.
// pTreeCtrl is a pointer to CTreeCtrl, and it MUST BE properly initialized with <code>new</code> in the constructor<DIV>

BOOL OnInitDialog (void)
{
   // Get the window placement info
   RECT rectParentCA;
   this->GetClientRect(&rectParent);<DIV>

   // Do the calculations
   rectParentCA.top += 10;
   rectParentCA.left += 10;
   rectParentCA.right -= 10;
   rectParentCA.bottom -= 10;<DIV>

   // Create the control
   pTreeCtrl->Create( WS_VISIBLE | WS_CHILD | WS_BORDER, rectParentCA, this, 0x1005);
}
This will create a tree control, making it a child of the dialog window.

Remember, that although the tree control object/window is automatically destroyed by the framework, the object reserved with new is not. You MUST call delete at the destructor of your dialog.

-Antti Keskinen


----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
GeneralRe: Problem with pTreectrl-&gt;Create(...); Pin
bilas3-Dec-03 10:11
bilas3-Dec-03 10:11 
GeneralGetting the Current Application Path Pin
harinat3-Dec-03 2:06
harinat3-Dec-03 2:06 
GeneralRe: Getting the Current Application Path Pin
Antti Keskinen3-Dec-03 2:21
Antti Keskinen3-Dec-03 2:21 
GeneralRe: Getting the Current Application Path Pin
David Crow3-Dec-03 3:14
David Crow3-Dec-03 3:14 
GeneralRe: Getting the Current Application Path Pin
valikac3-Dec-03 6:28
valikac3-Dec-03 6:28 
GeneralRe: Getting the Current Application Path Pin
Michael Dunn3-Dec-03 13:04
sitebuilderMichael Dunn3-Dec-03 13:04 
GeneralProblem w/ CListCtrl::SortItems Pin
De Nardis Andrea3-Dec-03 1:16
De Nardis Andrea3-Dec-03 1:16 
GeneralRe: Problem w/ CListCtrl::SortItems Pin
David Crow3-Dec-03 3:26
David Crow3-Dec-03 3:26 
GeneralPopup menus Pin
chadell3-Dec-03 1:16
chadell3-Dec-03 1:16 
GeneralRe: Popup menus Pin
De Nardis Andrea3-Dec-03 1:25
De Nardis Andrea3-Dec-03 1:25 
GeneralRe: Popup menus Pin
viliam3-Dec-03 1:28
viliam3-Dec-03 1:28 
GeneralRe: Popup menus Pin
chadell3-Dec-03 3:36
chadell3-Dec-03 3:36 
GeneralAdobe Audition/Cool Edit Plug-in Pin
Trevor13-Dec-03 1:14
Trevor13-Dec-03 1:14 
GeneralRe: Adobe Audition/Cool Edit Plug-in - PART 2 Pin
Trevor13-Dec-03 1:21
Trevor13-Dec-03 1:21 
GeneralProblem using CADODatabase and CADORecordset classes. Pin
bilas3-Dec-03 1:05
bilas3-Dec-03 1:05 
GeneralRe: Problem using CADODatabase and CADORecordset classes. Pin
RChin3-Dec-03 2:03
RChin3-Dec-03 2:03 
GeneralRe: Problem using CADODatabase and CADORecordset classes. Pin
bilas3-Dec-03 3:25
bilas3-Dec-03 3:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.