Click here to Skip to main content
15,848,483 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Create file with full permission control to user. Pin
sashoalm16-May-09 1:06
sashoalm16-May-09 1:06 
QuestionRe: Create file with full permission control to user. Pin
Rajesh R Subramanian16-May-09 1:36
professionalRajesh R Subramanian16-May-09 1:36 
AnswerRe: Create file with full permission control to user. Pin
Le@rner17-May-09 19:56
Le@rner17-May-09 19:56 
QuestionHandling Shift + Tab key combination Pin
V K 215-May-09 20:31
V K 215-May-09 20:31 
AnswerRe: Handling Shift + Tab key combination Pin
zakkas248315-May-09 21:37
zakkas248315-May-09 21:37 
AnswerRe: Handling Shift + Tab key combination Pin
Taran915-May-09 21:49
Taran915-May-09 21:49 
AnswerRe: Handling Shift + Tab key combination Pin
Rajesh R Subramanian16-May-09 1:49
professionalRajesh R Subramanian16-May-09 1:49 
QuestionDoc/View application with docking pane Pin
Gagnon Claude15-May-09 14:12
Gagnon Claude15-May-09 14:12 
Hi,

I have a Visual Studio 2008 MFC doc/view application. I have choosed a docking pane type. The dock is a tree control like Windows explorer. When I click an item on the tree, I want to change the form in the view area.

For that I have to acces the document to get a member function. The code is working but I get memory leak.

Perhaps I don't take the good way.

Any suggestions ?

Claude

Here's my code:

void CViewTree::OnTvnSelchanged(NMHDR *pNMHDR, LRESULT *pResult)
{
LPNMTREEVIEW pNMTreeView = reinterpret_cast<LPNMTREEVIEW>(pNMHDR);
// TODO : ajoutez ici le code de votre gestionnaire de notification de contrôle
*pResult = 0;

CString strItem;
HTREEITEM hItem = GetSelectedItem();

strItem = GetItemText(hItem);

// Pointeurs vers le document
CFrameWnd *pFrameWnd = (CFrameWnd*)AfxGetApp()->m_pMainWnd;
CCDSView* pView;
pView = (CCDSView*)pFrameWnd->GetActiveView(); //
// Detected memory leaks!
//Dumping objects ->
//{1272} normal block at 0x03E2C478, 530 bytes long.
// Data: < 6 > 14 36 19 01 0F 00 00 00 00 01 00 00 01 00 00 00
//{1190} normal block at 0x03E28F20, 530 bytes long.
// Data: < 6 ( > 14 36 19 01 28 00 00 00 00 01 00 00 01 00 00 00
//Object dump complete.

CCDSDoc* pDoc = pView->GetDocument();

pDoc->ToDoc(strItem);
}
AnswerRe: Doc/View application with docking pane Pin
«_Superman_»15-May-09 21:46
professional«_Superman_»15-May-09 21:46 
AnswerRe: Doc/View application with docking pane Pin
Rajesh R Subramanian16-May-09 1:46
professionalRajesh R Subramanian16-May-09 1:46 
AnswerRe: Doc/View application with docking pane Pin
Stuart Dootson16-May-09 14:18
professionalStuart Dootson16-May-09 14:18 
QuestionCompiling error from stdafx.h [modified] Pin
transoft15-May-09 11:18
transoft15-May-09 11:18 
AnswerRe: Compiling error from stdafx.h Pin
Stuart Dootson15-May-09 14:01
professionalStuart Dootson15-May-09 14:01 
GeneralRe: Compiling error from stdafx.h Pin
transoft16-May-09 4:15
transoft16-May-09 4:15 
QuestionPassing multidimensional arrays to functions Pin
Royce Fickling15-May-09 10:45
Royce Fickling15-May-09 10:45 
AnswerRe: Passing multidimensional arrays to functions Pin
led mike15-May-09 11:19
led mike15-May-09 11:19 
QuestionRe: Passing multidimensional arrays to functions Pin
David Crow15-May-09 11:23
David Crow15-May-09 11:23 
QuestionWide char vs. ANSI char Pin
transoft15-May-09 8:32
transoft15-May-09 8:32 
AnswerRe: Wide char vs. ANSI char Pin
CPallini15-May-09 8:49
mveCPallini15-May-09 8:49 
AnswerRe: Wide char vs. ANSI char Pin
Rajesh R Subramanian16-May-09 1:20
professionalRajesh R Subramanian16-May-09 1:20 
GeneralRe: Wide char vs. ANSI char Pin
Joe Woodbury16-May-09 18:55
professionalJoe Woodbury16-May-09 18:55 
GeneralRe: Wide char vs. ANSI char [modified] Pin
Rajesh R Subramanian16-May-09 20:17
professionalRajesh R Subramanian16-May-09 20:17 
QuestionCurious COM question - the case of the second exe server... Pin
Jim Crafton15-May-09 6:51
Jim Crafton15-May-09 6:51 
AnswerRe: Curious COM question - the case of the second exe server... Pin
Nemanja Trifunovic15-May-09 8:37
Nemanja Trifunovic15-May-09 8:37 
GeneralRe: Curious COM question - the case of the second exe server... Pin
CPallini15-May-09 8:49
mveCPallini15-May-09 8:49 

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.