Click here to Skip to main content
15,890,185 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRC2135 Pin
Dr. Emmett Brown9-Nov-07 11:51
Dr. Emmett Brown9-Nov-07 11:51 
Questioncheck for decimal in numerical string Pin
kani989-Nov-07 11:40
kani989-Nov-07 11:40 
AnswerRe: check for decimal in numerical string Pin
chandu0049-Nov-07 20:44
chandu0049-Nov-07 20:44 
AnswerRe: check for decimal in numerical string [modified] Pin
dtr19-Nov-07 21:13
dtr19-Nov-07 21:13 
GeneralRe: check for decimal in numerical string Pin
Mark Salsbery10-Nov-07 6:01
Mark Salsbery10-Nov-07 6:01 
AnswerRe: check for decimal in numerical string Pin
David Crow10-Nov-07 15:47
David Crow10-Nov-07 15:47 
GeneralRe: check for decimal in numerical string Pin
kani9813-Nov-07 6:29
kani9813-Nov-07 6:29 
QuestionCTreeCtrl not showing tree Pin
act_x9-Nov-07 10:20
act_x9-Nov-07 10:20 
I am trying to use the MS sample in my code and and cannot get it to add an other nodes other than the first node .
<br />
// Gain a pointer to our tree control<br />
<br />
CTreeCtrl* pCtrl = (CTreeCtrl*) GetDlgItem(IDC_TREE1);<br />
ASSERT(pCtrl != NULL);<br />
<br />
// Insert a root item using the structure. We must<br />
// initialize a TVINSERTSTRUCT structure and pass its<br />
// address to the call. <br />
<br />
TVINSERTSTRUCT tvInsert;<br />
tvInsert.hParent = NULL;<br />
tvInsert.hInsertAfter = NULL;<br />
tvInsert.item.mask = TVIF_TEXT;<br />
tvInsert.item.pszText = _T("United States");<br />
<br />
HTREEITEM hCountry = pCtrl->InsertItem(&tvInsert);<br />
<br />
// Insert subitems of that root. Pennsylvania is<br />
// a state in the United States, so its item will be a child<br />
// of the United States item. We won't set any image or states,<br />
// so we supply only the TVIF_TEXT mask flag. This<br />
// override provides nearly complete control over the<br />
// insertion operation without the tedium of initializing<br />
// a structure. If you're going to add lots of items<br />
// to a tree, you might prefer the structure override<br />
// as it affords you a performance win by allowing you<br />
// to initialize some fields of the structure only once,<br />
// outside of your insertion loop.<br />
<br />
HTREEITEM hPA = pCtrl->InsertItem(TVIF_TEXT,<br />
   _T("Pennsylvania"), 0, 0, 0, 0, 0, hCountry, NULL);<br />
<br />
// Insert the "Washington" item and assure that it is<br />
// inserted after the "Pennsylvania" item. This override is <br />
// more appropriate for conveniently inserting items with <br />
// images.<br />
<br />
HTREEITEM hWA = pCtrl->InsertItem(_T("Washington"),<br />
   0, 0, hCountry, hPA);<br />
<br />
// We'll add some cities under each of the states.<br />
// The override used here is most appropriate<br />
// for inserting text-only items.<br />
<br />
pCtrl->InsertItem(_T("Pittsburgh"), hPA, TVI_SORT);<br />
pCtrl->InsertItem(_T("Harrisburg"), hPA, TVI_SORT);<br />
pCtrl->InsertItem(_T("Altoona"), hPA, TVI_SORT);<br />
<br />
pCtrl->InsertItem(_T("Seattle"), hWA, TVI_SORT);<br />
pCtrl->InsertItem(_T("Kalaloch"), hWA, TVI_SORT);<br />
pCtrl->InsertItem(_T("Yakima"), hWA, TVI_SORT);


Anything missing here ?
AnswerRe: CTreeCtrl not showing tree Pin
Mark Salsbery9-Nov-07 10:30
Mark Salsbery9-Nov-07 10:30 
GeneralRe: CTreeCtrl not showing tree Pin
act_x9-Nov-07 10:37
act_x9-Nov-07 10:37 
GeneralRe: CTreeCtrl not showing tree Pin
Mark Salsbery9-Nov-07 10:41
Mark Salsbery9-Nov-07 10:41 
GeneralRe: CTreeCtrl not showing tree Pin
act_x9-Nov-07 10:44
act_x9-Nov-07 10:44 
GeneralRe: CTreeCtrl not showing tree Pin
David Crow9-Nov-07 16:45
David Crow9-Nov-07 16:45 
QuestionCWinThread & WM_IDLE Pin
Peter Weyzen9-Nov-07 10:03
Peter Weyzen9-Nov-07 10:03 
AnswerRe: CWinThread & WM_IDLE Pin
Mark Salsbery9-Nov-07 10:22
Mark Salsbery9-Nov-07 10:22 
GeneralRe: CWinThread & WM_IDLE Pin
Peter Weyzen9-Nov-07 11:14
Peter Weyzen9-Nov-07 11:14 
AnswerRe: CWinThread & WM_IDLE Pin
PJ Arends9-Nov-07 19:17
professionalPJ Arends9-Nov-07 19:17 
QuestionMacros in Vista and Visual Studio 2005 Pin
Swinefeaster9-Nov-07 9:39
Swinefeaster9-Nov-07 9:39 
AnswerRe: Macros in Vista and Visual Studio 2005 Pin
Mark Salsbery9-Nov-07 10:05
Mark Salsbery9-Nov-07 10:05 
GeneralRe: Macros in Vista and Visual Studio 2005 Pin
Swinefeaster14-Nov-07 13:26
Swinefeaster14-Nov-07 13:26 
QuestionDrop-down button that displays a dialog? Pin
Jason Liu9-Nov-07 9:24
Jason Liu9-Nov-07 9:24 
AnswerRe: Drop-down button that displays a dialog? Pin
Maximilien9-Nov-07 9:42
Maximilien9-Nov-07 9:42 
QuestionInternet Settings Pin
somasundarambe9-Nov-07 6:46
somasundarambe9-Nov-07 6:46 
AnswerRe: Internet Settings Pin
David Crow9-Nov-07 6:59
David Crow9-Nov-07 6:59 
GeneralRe: Internet Settings Pin
Mark Salsbery9-Nov-07 7:01
Mark Salsbery9-Nov-07 7:01 

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.