Click here to Skip to main content
15,902,863 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Hooks .. Pin
Abin13-May-04 14:46
Abin13-May-04 14:46 
GeneralRe: Hooks .. Pin
progman13-May-04 15:21
progman13-May-04 15:21 
GeneralRe: Hooks .. Pin
Abin14-May-04 3:04
Abin14-May-04 3:04 
GeneralRe: Hooks .. Pin
vividtang13-May-04 18:50
vividtang13-May-04 18:50 
GeneralMDI App in VS.NET Pin
#realJSOP13-May-04 12:29
professional#realJSOP13-May-04 12:29 
GeneralRe: MDI App in VS.NET Pin
Joe Woodbury13-May-04 12:49
professionalJoe Woodbury13-May-04 12:49 
GeneralRe: MDI App in VS.NET Pin
Antony M Kancidrowski14-May-04 4:00
Antony M Kancidrowski14-May-04 4:00 
GeneralCleanup using splitter windows Pin
MarcoNedwig13-May-04 12:20
MarcoNedwig13-May-04 12:20 
I've a problem using splitter windows.
The function that replaces views in a pane sets the old view to SW_HIDE status and activates the new view with SW_SHOW. A pointer to the old view is returned by the funtion. The old view isn't activated again in the program. My problem is that the memory allocated by the old view isn't freed during runtime, because no DestroyWindow is called and the view's destructor isn't called. So the program leaks during runtime.

I tried calling pOldView->DestroyWindow in the ReplaceView function. This doesn't work, because after doing this it could be possible, that the old view executes messagehandlers (like OnKillFocus) handlers which causes errors, because the view is destroyed.
A second try was using the returned pointer to the old view after 30 seconds to cleanup and then calling pOldView->DestroyWindow(). This causes an endless loop after some time ( I think this can be seen on WIN NT but not on WIN 2000). I had a look at the MFC Code and think this could be caused by a recursive call within the Implementation of DestroyWindow.

Does anyone know a solution how to get the memory of the unused views freed?
GeneralRe: Same Problem here... Pin
Sumit Kapoor13-May-04 22:03
Sumit Kapoor13-May-04 22:03 
GeneralActive X problem in MFC Pin
rahulmsaxena13-May-04 11:58
rahulmsaxena13-May-04 11:58 
GeneralAssigning a value to a char[] Pin
monrobot1313-May-04 11:46
monrobot1313-May-04 11:46 
GeneralRe: Assigning a value to a char[] Pin
Maxwell Chen13-May-04 17:26
Maxwell Chen13-May-04 17:26 
GeneralRe: Assigning a value to a char[] Pin
Michael Dunn13-May-04 18:05
sitebuilderMichael Dunn13-May-04 18:05 
GeneralRe: Assigning a value to a char[] Pin
vividtang13-May-04 18:31
vividtang13-May-04 18:31 
GeneralRe: Assigning a value to a char[] Pin
toxcct13-May-04 22:32
toxcct13-May-04 22:32 
GeneralRe: Assigning a value to a char[] Pin
monrobot1314-May-04 6:23
monrobot1314-May-04 6:23 
GeneralVS.NET and "picture controls" Pin
#realJSOP13-May-04 10:07
professional#realJSOP13-May-04 10:07 
GeneralRe: VS.NET and "picture controls" Pin
Michael Dunn13-May-04 18:10
sitebuilderMichael Dunn13-May-04 18:10 
GeneralActivex question Pin
Demian Panello13-May-04 8:58
Demian Panello13-May-04 8:58 
GeneralRe: Activex question Pin
BlackDice13-May-04 11:08
BlackDice13-May-04 11:08 
GeneralExit Code (0x2) from Dialog Based Apps Pin
Justin Cooke13-May-04 8:39
Justin Cooke13-May-04 8:39 
GeneralRe: Exit Code (0x2) from Dialog Based Apps Pin
David Crow13-May-04 9:24
David Crow13-May-04 9:24 
GeneralRe: Exit Code (0x2) from Dialog Based Apps Pin
Justin Cooke13-May-04 9:33
Justin Cooke13-May-04 9:33 
GeneralRe: Exit Code (0x2) from Dialog Based Apps Pin
David Crow13-May-04 9:39
David Crow13-May-04 9:39 
GeneralRe: Exit Code (0x2) from Dialog Based Apps Pin
Michael Dunn13-May-04 18:14
sitebuilderMichael Dunn13-May-04 18:14 

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.