Click here to Skip to main content
15,890,438 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
GeneralRe: Question about hooking APIs Pin
User 66583-Apr-03 3:06
User 66583-Apr-03 3:06 
GeneralRe: Question about hooking APIs Pin
codeant4-Apr-03 18:10
codeant4-Apr-03 18:10 
GeneralRe: Question about hooking APIs Pin
User 66585-Apr-03 1:32
User 66585-Apr-03 1:32 
GeneralRe: Question about hooking APIs Pin
codeant5-Apr-03 18:59
codeant5-Apr-03 18:59 
GeneralA Frame/view/doc question! Very Hard Pin
zhangyifei3-Apr-03 2:26
zhangyifei3-Apr-03 2:26 
GeneralNewbie help, API Pin
bob_0003-Apr-03 1:26
bob_0003-Apr-03 1:26 
GeneralRe: Newbie help, API Pin
Mike Upton3-Apr-03 4:53
Mike Upton3-Apr-03 4:53 
GeneralImage attributes (eps and cgm) Pin
vandaley3-Apr-03 0:44
vandaley3-Apr-03 0:44 
QuestionHow can I find a win32 version of lex? Pin
xiaochnegwx3-Apr-03 0:24
xiaochnegwx3-Apr-03 0:24 
AnswerRe: How can I find a win32 version of lex? Pin
Johnny ²3-Apr-03 0:46
Johnny ²3-Apr-03 0:46 
QuestionHow to create a directory Pin
Anonymous2-Apr-03 23:39
Anonymous2-Apr-03 23:39 
AnswerRe: How to create a directory Pin
Joan M2-Apr-03 23:56
professionalJoan M2-Apr-03 23:56 
AnswerRe: How to create a directory Pin
Philip Patrick3-Apr-03 0:14
professionalPhilip Patrick3-Apr-03 0:14 
GeneralRe: How to create a directory Pin
Mikey_E16-Jun-04 7:39
professionalMikey_E16-Jun-04 7: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.