Click here to Skip to main content
15,917,005 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How do I output the IP Address after getting computer name?? Pin
Dudi Avramov8-Apr-03 22:22
Dudi Avramov8-Apr-03 22:22 
GeneralProgramming Graphic LCD Panels Pin
#realJSOP8-Apr-03 9:37
professional#realJSOP8-Apr-03 9:37 
QuestionOverloaded Methods & COM: ??? Pin
J. Dunlap8-Apr-03 9:17
J. Dunlap8-Apr-03 9:17 
AnswerRe: Overloaded Methods & COM: ??? Pin
Le centriste8-Apr-03 11:07
Le centriste8-Apr-03 11:07 
GeneralRe: Overloaded Methods & COM: ??? Pin
J. Dunlap8-Apr-03 11:11
J. Dunlap8-Apr-03 11:11 
GeneralI found the answer! :-) :-) Pin
J. Dunlap8-Apr-03 13:38
J. Dunlap8-Apr-03 13:38 
GeneralRe: I found the answer! :-) :-) Pin
Le centriste8-Apr-03 18:05
Le centriste8-Apr-03 18:05 
GeneralPreventing tree node from collapsing Pin
Ravi Bhavnani8-Apr-03 8:39
professionalRavi Bhavnani8-Apr-03 8:39 
I'm trying to prevent the root node of my subclassed CTreeCtrl from being collapsed. The root node is guaranteed to have children. I've reflected TVN_ITEMEXPANDING to the control and am returning TRUE in its handler to prevent the root from being collapsed, but the user seems to be able to collapse it anyway.
BOOL CProjectTreeCtrl::OnItemExpanding
     (NMHDR* pNMHDR, LRESULT* pResult)
{
  // Don't allow the project root to be collapsed
  NMTREEVIEW* pNMTreeView = (NMTREEVIEW *) pNMHDR;
  HTREEITEM hItem = pNMTreeView->itemNew.hItem;
  if (pNMTreeView->action == TVE_COLLAPSE)
     if (hItem == m_hRoot)
        return (TRUE);          // breakpoint reached
  return (FALSE);
}
I can get around the problem by handling TVN_ITEMEXPANDED, but that's ugly because the node collapses then expands.

Any clues as to what I'm doing wrong? Thanks,

/ravi

Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
GeneralRe: Preventing tree node from collapsing Pin
Nick Parker8-Apr-03 11:27
protectorNick Parker8-Apr-03 11:27 
GeneralRe: Preventing tree node from collapsing Pin
Ravi Bhavnani8-Apr-03 11:34
professionalRavi Bhavnani8-Apr-03 11:34 
GeneralRe: Preventing tree node from collapsing Pin
Bartosz Bien8-Apr-03 11:33
Bartosz Bien8-Apr-03 11:33 
GeneralRe: Preventing tree node from collapsing Pin
Ravi Bhavnani8-Apr-03 11:37
professionalRavi Bhavnani8-Apr-03 11:37 
GeneralRe: Preventing tree node from collapsing Pin
Bartosz Bien8-Apr-03 11:40
Bartosz Bien8-Apr-03 11:40 
QuestionPlatform SDK Sample - can you send it to me? Pin
Mark Otway8-Apr-03 8:38
Mark Otway8-Apr-03 8:38 
AnswerRe: Platform SDK Sample - can you send it to me? Pin
Ravi Bhavnani8-Apr-03 8:44
professionalRavi Bhavnani8-Apr-03 8:44 
GeneralRe: Platform SDK Sample - can you send it to me? Pin
Mark Otway8-Apr-03 8:48
Mark Otway8-Apr-03 8:48 
GeneralRe: Platform SDK Sample - can you send it to me? Pin
J. Dunlap8-Apr-03 8:56
J. Dunlap8-Apr-03 8:56 
GeneralListview FindItem Pin
Anthony98878-Apr-03 7:35
Anthony98878-Apr-03 7:35 
GeneralRe: Listview FindItem Pin
Ravi Bhavnani8-Apr-03 7:42
professionalRavi Bhavnani8-Apr-03 7:42 
GeneralTemplate bug in VC++ 6 Pin
John M. Drescher8-Apr-03 7:27
John M. Drescher8-Apr-03 7:27 
GeneralRe: Template bug in VC++ 6 Pin
Chris Losinger8-Apr-03 8:01
professionalChris Losinger8-Apr-03 8:01 
GeneralRe: Template bug in VC++ 6 Pin
John M. Drescher8-Apr-03 8:07
John M. Drescher8-Apr-03 8:07 
GeneralRe: Template bug in VC++ 6 Pin
Joaquín M López Muñoz8-Apr-03 9:34
Joaquín M López Muñoz8-Apr-03 9:34 
GeneralEmbedded images in CDHtmlDialog Pin
joblemar8-Apr-03 7:26
sussjoblemar8-Apr-03 7:26 
GeneralRe: Embedded images in CDHtmlDialog Pin
Big Art8-Apr-03 14:39
Big Art8-Apr-03 14:39 

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.