Click here to Skip to main content
15,901,853 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Calling functions in an executable or accessing its global variables from a DLL Pin
Ben Burnett10-Sep-08 5:49
Ben Burnett10-Sep-08 5:49 
QuestionAfxMessageBox( ) in my DLL Pin
john john mackey5-Sep-08 12:01
john john mackey5-Sep-08 12:01 
AnswerRe: AfxMessageBox( ) in my DLL Pin
Perspx5-Sep-08 12:12
Perspx5-Sep-08 12:12 
GeneralRe: AfxMessageBox( ) in my DLL Pin
john john mackey5-Sep-08 12:25
john john mackey5-Sep-08 12:25 
QuestionShowing powers, cubes and squares in a console window Pin
toprogramminguy5-Sep-08 10:11
toprogramminguy5-Sep-08 10:11 
AnswerRe: Showing powers, cubes and squares in a console window Pin
David Crow5-Sep-08 10:21
David Crow5-Sep-08 10:21 
AnswerRe: Showing powers, cubes and squares in a console window Pin
Sauce!7-Sep-08 1:45
Sauce!7-Sep-08 1:45 
QuestionHelp! how to force the control to display the + even though the item does not have any child items inserted Pin
DavidLeeFromKunming5-Sep-08 9:35
DavidLeeFromKunming5-Sep-08 9:35 
Hey.Guys!
I've been puzzled by this kind problem these days while doing with CTreeCtrl. My target is going to Dynamically insert any number of child items into an Empty Item by clicking + button. To do that,i have to force the control to display the + even though the item does not have any child items inserted.
i followed the instructions from msdn by setting cChildren of TVITEM struct to I_CHILDRENCALLBACK since the ctreectrl has the TVS_HASBUTTONS style. then handle with TVN_GETDISPINFO notification message. but that does not work anyway:

void CMutiTreeCtrl::OnTvnGetdispinfo(NMHDR *pNMHDR, LRESULT *pResult)
{
LPNMTVDISPINFO pTVDispInfo = reinterpret_cast <lpnmtvdispinfo>(pNMHDR);

if((pTVDispInfo->item.mask & TVIF_CHILDREN ) == 0)
{
HTREEITEM hSelected = GetSelectedItem();
TV_INSERTSTRUCT tvinsert;
tvinsert.hParent=hSelected;
tvinsert.hInsertAfter=TVI_LAST;
tvinsert.item.mask=TVIF_TEXT;
tvinsert.item.hItem=NULL;
tvinsert.item.cchTextMax=50;
tvinsert.item.lParam=0;
tvinsert.item.pszText=_T("inserting child items only when the item is visible or expanded");
*pResult = 1;
}
else *pResult =0;
}

Is there any problem with the code?Any suggestion?Thanks

HALLELUJAH! Hallelujah! Hallelujah! Hallelujah!

QuestionRe: Help! how to force the control to display the + even though the item does not have any child items inserted Pin
David Crow5-Sep-08 10:11
David Crow5-Sep-08 10:11 
AnswerRe: Help! how to force the control to display the + even though the item does not have any child items inserted Pin
DavidLeeFromKunming5-Sep-08 18:06
DavidLeeFromKunming5-Sep-08 18:06 
AnswerRe: Help! how to force the control to display the + even though the item does not have any child items inserted Pin
Mark Salsbery6-Sep-08 8:29
Mark Salsbery6-Sep-08 8:29 
GeneralRe: Help! how to force the control to display the + even though the item does not have any child items inserted Pin
DavidLeeFromKunming6-Sep-08 16:48
DavidLeeFromKunming6-Sep-08 16:48 
QuestionMultiple Events Pin
thenutz725-Sep-08 9:26
thenutz725-Sep-08 9:26 
Questiondotted ip address to name? Pin
montiee5-Sep-08 9:06
montiee5-Sep-08 9:06 
QuestionRe: dotted ip address to name? Pin
David Crow5-Sep-08 10:19
David Crow5-Sep-08 10:19 
AnswerRe: dotted ip address to name? Pin
montiee5-Sep-08 10:48
montiee5-Sep-08 10:48 
Questionuse of "SECTION" within a hook dll ..? Pin
only_jack5-Sep-08 8:54
only_jack5-Sep-08 8:54 
QuestionCWnd not receiving PostMessage Pin
gatwork5-Sep-08 8:05
gatwork5-Sep-08 8:05 
Question[Message Deleted] Pin
hhh5-Sep-08 7:54
hhh5-Sep-08 7:54 
AnswerRe: Design Question Pin
Perspx5-Sep-08 10:17
Perspx5-Sep-08 10:17 
GeneralRe: Design Question Pin
hhh5-Sep-08 22:44
hhh5-Sep-08 22:44 
AnswerRe: Design Question Pin
john john mackey5-Sep-08 12:16
john john mackey5-Sep-08 12:16 
GeneralRe: Design Question Pin
hhh5-Sep-08 22:59
hhh5-Sep-08 22:59 
QuestionString literal expansion Pin
Jim Crafton5-Sep-08 7:44
Jim Crafton5-Sep-08 7:44 
AnswerRe: String literal expansion Pin
Michael Dunn5-Sep-08 8:07
sitebuilderMichael Dunn5-Sep-08 8:07 

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.