Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
Z

zhangyifei

@zhangyifei
About
Posts
33
Topics
25
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • ATL Com Register problem!
    Z zhangyifei

    Can't Register atl com in chinese(unicode) path! How Can I do it? ZHANGYIFEI

    ATL / WTL / STL question c++ com help

  • How to Change Atl Dialog Color and Make Control Transparent?
    Z zhangyifei

    I make a com with atl ,and need an about dialog! I want to Change Dialog Color,but the Control (for example .label icon) above it is not transparent!how Can i do! ZHANGYIFEI

    ATL / WTL / STL tutorial question c++ com

  • Help me! I meet big problem!
    Z zhangyifei

    can you give me a demo ?thanks! ZHANGYIFEI

    C / C++ / MFC help c++ com question

  • Help me! I meet big problem!
    Z zhangyifei

    when i store ole object found that the save file grow biger and biger! Under MFC(DOC/VIEW) STRUCT , "CreateCloneFrom" function make it! How Can I deal with! give some code ! ZHANGYIFEI

    C / C++ / MFC help c++ com question

  • how can I deal with the " big problem"
    Z zhangyifei

    When I call this function "COleClientItem::CreateCloneFrom" to create a copy of the specified OLE item. And use this function to support undo operations. found that store file that including ole item will grow greater and greater! ZHANGYIFEI

    C / C++ / MFC com help question

  • How Can i control net (LAN)connection?
    Z zhangyifei

    i want to control lan net connection : luanch/shutdown! ZHANGYIFEI

    C / C++ / MFC question

  • How Can i control net connection?
    Z zhangyifei

    how about LAN ? ZHANGYIFEI

    C / C++ / MFC question

  • How Can i control net connection?
    Z zhangyifei

    how can i dynamic control net connection login/shutdown by code! ZHANGYIFEI

    C / C++ / MFC question

  • Who Can give me a rtf file format analyse example?
    Z zhangyifei

    where can i find (GPL) source code for AbiWord ? ZHANGYIFEI

    C / C++ / MFC question tutorial

  • Who Can give me a rtf file format analyse example?
    Z zhangyifei

    I want to read rtf file format and analyse every char format in rtf file and draw it by myself! How Can I do it! ZHANGYIFEI

    C / C++ / MFC question tutorial

  • Why,Why,Why no one can resolvoe this Question?Doc/view/frame!I Have post this artical 5 time!
    Z zhangyifei

    CDocManager* CDocManager::pStaticDocManager; CPtrList* CDocManager::pStaticList; those two member is not in my code ,those in MFC code ! I said that those two member appear memory leak! BOOL Create() //in ActiveX OnCreate Event perform this function! { 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)); // pDocTemplate in destructor function delete this! CMapDoc * pDoc = new CMapDoc;// in destructor function delete this! 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;// in destructor function delete this! 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; } //note : CMapDoc inherit from COleDocument ; CMapView inherit from CScrollView ; CMainFrame inherit from CFrameWnd ; I don't have CDocManager and it's derive class! debug output : Detected memory leaks! Dumping objects -> plex.cpp(31) : {72} normal block at 0x01402F70, 124 bytes long. Data: < @ > 00 00 00 00 00 00 00 00 00 00 00 00 00 11 40 01 doctempl.cpp(64) : {71} client block at 0x01401060, subtype 0, 32 bytes long. a CDocManager object at $01401060, 32 bytes long doctempl.cpp(62) : {70} client block at 0x014010B0, subtype 0, 28 bytes long. a CPtrList object at $014010B0, 28 bytes long ZHANGYIFEI

    C / C++ / MFC question com performance

  • repost this article!
    Z zhangyifei

    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)); // pDocTemplate in destructor function delete this! CMapDoc * pDoc = new CMapDoc;// in destructor function delete this! 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;// in destructor function delete this! 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; } ZHANGYIFEI

    C / C++ / MFC question com performance

  • who come help me ? about doc/view/frame
    Z zhangyifei

    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)); // pDocTemplate in destructor function delete this! CMapDoc * pDoc = new CMapDoc;// in destructor function delete this! 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;// in destructor function delete this! 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; } ZHANGYIFEI

    C / C++ / MFC question com performance help

  • repost this question again I beg the answers!
    Z zhangyifei

    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)); // pDocTemplate in destructor function delete this! CMapDoc * pDoc = new CMapDoc;// in destructor function delete this! 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;// in destructor function delete this! 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; } ZHANGYIFEI

    C / C++ / MFC question com performance

  • Why,Why,Why no one can resolvoe this Question?Doc/view/frame!I Have post this artical 5 time!
    Z zhangyifei

    the proplem look easy !but not, and not "new->delete" so easy!why don't try it by yourself ,look what happen! the code i have offer! I have delete all,but Can't avoid leaks,the reason is MFC two static data member,and this two member is internal use!! ZHANGYIFEI

    C / C++ / MFC question com performance

  • Why,Why,Why no one can resolvoe this Question?Doc/view/frame!I Have post this artical 5 time!
    Z zhangyifei

    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; } ZHANGYIFEI ZHANGYIFEI

    C / C++ / MFC question com performance

  • Why no one can resolvoe this Question?Doc/view/frame!
    Z zhangyifei

    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; } ZHANGYIFEI ZHANGYIFEI

    C / C++ / MFC question com performance

  • Very Hard Frame/view/doc question!
    Z zhangyifei

    I have not created CDocManager ,I don't want MFC create it too!but In fact ,MFC Create it,and leak happened! the reason is two CDocManager's static data member! ZHANGYIFEI

    C / C++ / MFC question com performance

  • Very Hard Frame/view/doc question!
    Z zhangyifei

    :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; }:(( ZHANGYIFEI

    C / C++ / MFC question com performance

  • A Frame/view/doc question! Very Hard
    Z zhangyifei

    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; }:(( ZHANGYIFEI

    C / C++ / MFC question com performance
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups