Click here to Skip to main content
15,899,935 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: DestroyWindow() and delete Pin
ns3-Apr-03 4:21
ns3-Apr-03 4:21 
GeneralRe: DestroyWindow() and delete Pin
Ravi Bhavnani3-Apr-03 4:27
professionalRavi Bhavnani3-Apr-03 4:27 
GeneralRe: DestroyWindow() and delete Pin
ns3-Apr-03 4:30
ns3-Apr-03 4:30 
GeneralRe: DestroyWindow() and delete Pin
User 66583-Apr-03 4:36
User 66583-Apr-03 4:36 
GeneralRe: DestroyWindow() and delete Pin
Anonymous3-Apr-03 4:47
Anonymous3-Apr-03 4:47 
GeneralRe: DestroyWindow() and delete Pin
jhwurmbach3-Apr-03 5:16
jhwurmbach3-Apr-03 5:16 
GeneralRe: DestroyWindow() and delete Pin
User 66583-Apr-03 5:46
User 66583-Apr-03 5:46 
GeneralRe: DestroyWindow() and delete Pin
jhwurmbach3-Apr-03 20:02
jhwurmbach3-Apr-03 20:02 
GeneralCTreeCtrl - OnSelChange() Pin
JensB3-Apr-03 3:36
JensB3-Apr-03 3:36 
GeneralRe: CTreeCtrl - OnSelChange() Pin
Chris Losinger3-Apr-03 3:41
professionalChris Losinger3-Apr-03 3:41 
GeneralRe: CTreeCtrl - OnSelChange() Pin
JensB3-Apr-03 3:54
JensB3-Apr-03 3:54 
GeneralRe: CTreeCtrl - OnSelChange() Pin
Alvaro Mendez3-Apr-03 6:02
Alvaro Mendez3-Apr-03 6:02 
GeneralRe: CTreeCtrl - OnSelChange() Pin
JensB3-Apr-03 19:43
JensB3-Apr-03 19:43 
GeneralGlobalAlloc fails! Pin
Justin Hallet3-Apr-03 3:17
Justin Hallet3-Apr-03 3:17 
GeneralRe: GlobalAlloc fails! Pin
Chris Losinger3-Apr-03 3:25
professionalChris Losinger3-Apr-03 3:25 
GeneralRe: GlobalAlloc fails! Pin
Justin Hallet3-Apr-03 3:30
Justin Hallet3-Apr-03 3:30 
GeneralRe: GlobalAlloc fails! Pin
Chris Losinger3-Apr-03 3:39
professionalChris Losinger3-Apr-03 3:39 
GeneralRe: GlobalAlloc fails! Pin
Justin Hallet3-Apr-03 3:46
Justin Hallet3-Apr-03 3:46 
GeneralSW_SHOW, HIDE Pin
ns3-Apr-03 3:11
ns3-Apr-03 3:11 
GeneralRe: SW_SHOW, HIDE Pin
Chris Losinger3-Apr-03 3:19
professionalChris Losinger3-Apr-03 3:19 
GeneralI did look with find in files.... Pin
ns3-Apr-03 3:27
ns3-Apr-03 3:27 
GeneralVery Hard Frame/view/doc question! Pin
zhangyifei3-Apr-03 2:29
zhangyifei3-Apr-03 2:29 
:I want to Create a Frame/view/doc structure On a ActiveX Control,but It will be Found Memory leak! And I Found that the reasons is :

CDocManager* CDocManager::pStaticDocManager;
CPtrList* CDocManager::pStaticList;

How Can I avoid Memroy leak?
the Following is My Code :
BOOL Create()
{
if( m_pFrameWnd )
{
if( IsWindow(m_pFrameWnd->m_hWnd) ) return TRUE;
}

CSingleDocTemplate * pDocTemplate;

pDocTemplate = new CSingleDocTemplate(IDR_MAPTYPE,
RUNTIME_CLASS(CMapDoc),
RUNTIME_CLASS(CMapFrame),
RUNTIME_CLASS(CMapView));


CMapDoc * pDoc = new CMapDoc;

CCreateContext Context;
Context.m_pCurrentDoc = pDoc;
Context.m_pNewDocTemplate = pDocTemplate;
Context.m_pNewViewClass = RUNTIME_CLASS(CMapView);
Context.m_pLastView = NULL;
Context.m_pCurrentFrame = NULL;

CMapFrame * pFrameWnd = new CMapFrame;

m_pDoc = pDoc;
m_pFrameWnd = pFrameWnd;
m_pDocTemplate = pDocTemplate;
CRect rcMap;

GetClientRect(&rcMap);
BOOL ret = m_pFrameWnd->Create(AfxRegisterWndClass(CS_DBLCLKS), NULL, WS_CHILD|WS_VISIBLE, rcMap,this,NULL,&Context);
m_pFrameWnd->ShowWindow(SW_SHOW);

return ret;
}Cry | :((

ZHANGYIFEI
GeneralRe: Very Hard Frame/view/doc question! Pin
SchmoBoy3-Apr-03 4:41
SchmoBoy3-Apr-03 4:41 
GeneralRe: Very Hard Frame/view/doc question! Pin
zhangyifei3-Apr-03 20:49
zhangyifei3-Apr-03 20:49 
GeneralQuestion about hooking APIs Pin
codeant3-Apr-03 2:29
codeant3-Apr-03 2:29 

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.