Click here to Skip to main content
15,904,652 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Win32: Get message notification of other application's close/exit. Pin
Identity Undisclosed3-Jun-09 19:43
Identity Undisclosed3-Jun-09 19:43 
GeneralRe: Win32: Get message notification of other application's close/exit. Pin
Randor 5-Jun-09 23:57
professional Randor 5-Jun-09 23:57 
AnswerRe: Win32: Get message notification of other application's close/exit. Pin
Joe Woodbury16-May-09 18:07
professionalJoe Woodbury16-May-09 18:07 
AnswerRe: Win32: Get message notification of other application's close/exit. Pin
Identity Undisclosed3-Jun-09 20:00
Identity Undisclosed3-Jun-09 20:00 
GeneralRe: Win32: Get message notification of other application's close/exit. Pin
Randor 6-Jun-09 0:07
professional Randor 6-Jun-09 0:07 
QuestionTRACE with Unciode? Pin
sashoalm16-May-09 1:14
sashoalm16-May-09 1:14 
AnswerRe: TRACE with Unciode? Pin
Rajesh R Subramanian16-May-09 1:24
professionalRajesh R Subramanian16-May-09 1:24 
AnswerRe: TRACE with Unciode? Pin
Rick York16-May-09 18:03
mveRick York16-May-09 18:03 
QuestionGraphics in cpp Pin
Markandaiya Harsh16-May-09 0:28
Markandaiya Harsh16-May-09 0:28 
AnswerRe: Graphics in cpp Pin
Rajesh R Subramanian16-May-09 0:33
professionalRajesh R Subramanian16-May-09 0:33 
QuestionHi Doubt on Visual C++ Pin
Sakthi.Gs :-)15-May-09 21:26
Sakthi.Gs :-)15-May-09 21:26 
AnswerRe: Hi Doubt on Visual C++ Pin
Rajesh R Subramanian15-May-09 22:53
professionalRajesh R Subramanian15-May-09 22:53 
QuestionCreate file with full permission control to user. Pin
Le@rner15-May-09 20:54
Le@rner15-May-09 20:54 
AnswerRe: Create file with full permission control to user. Pin
Taran915-May-09 21:12
Taran915-May-09 21:12 
GeneralRe: Create file with full permission control to user. Pin
Le@rner15-May-09 21:17
Le@rner15-May-09 21:17 
GeneralRe: Create file with full permission control to user. Pin
sashoalm16-May-09 0:06
sashoalm16-May-09 0:06 
QuestionRe: Create file with full permission control to user. Pin
Rajesh R Subramanian16-May-09 0:36
professionalRajesh R Subramanian16-May-09 0:36 
AnswerRe: Create file with full permission control to user. Pin
Le@rner17-May-09 18:56
Le@rner17-May-09 18:56 
QuestionHandling Shift + Tab key combination Pin
V K 215-May-09 19:31
V K 215-May-09 19:31 
AnswerRe: Handling Shift + Tab key combination Pin
zakkas248315-May-09 20:37
zakkas248315-May-09 20:37 
AnswerRe: Handling Shift + Tab key combination Pin
Taran915-May-09 20:49
Taran915-May-09 20:49 
AnswerRe: Handling Shift + Tab key combination Pin
Rajesh R Subramanian16-May-09 0:49
professionalRajesh R Subramanian16-May-09 0:49 
QuestionDoc/View application with docking pane Pin
Gagnon Claude15-May-09 13:12
Gagnon Claude15-May-09 13: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 20:46
professional«_Superman_»15-May-09 20:46 
AnswerRe: Doc/View application with docking pane Pin
Rajesh R Subramanian16-May-09 0:46
professionalRajesh R Subramanian16-May-09 0:46 

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.