Click here to Skip to main content
15,914,444 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to stop this memory leak? Pin
Mark Tutt15-Mar-02 10:32
Mark Tutt15-Mar-02 10:32 
GeneralStrings!!! Pin
15-Mar-02 7:49
suss15-Mar-02 7:49 
GeneralRe: Strings!!! Pin
Mike.NET15-Mar-02 8:00
Mike.NET15-Mar-02 8:00 
QuestionHow to make MFC apps use less RAM? Pin
Mike.NET15-Mar-02 7:44
Mike.NET15-Mar-02 7:44 
AnswerRe: How to make MFC apps use less RAM? Pin
Shog915-Mar-02 7:53
sitebuilderShog915-Mar-02 7:53 
GeneralVisual Studio .NET customization Pin
Todd Smith15-Mar-02 7:26
Todd Smith15-Mar-02 7:26 
GeneralCalling CListview in MDI application Pin
Jasmyn15-Mar-02 6:05
Jasmyn15-Mar-02 6:05 
Generalfurther details Pin
Jasmyn15-Mar-02 6:43
Jasmyn15-Mar-02 6:43 
Had a cup of tea, am felling calmer so here are more details. The view that I'm trying to call is derived from CListview and is a report style List view showing database information in an Access like gridview.
This is the code I'm using to initialise it
DWORD dwExStyle;

CRepPartDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);

//CActionsApp *pApp = (CActionsApp*)AfxGetApp();
CListCtrl& m_List = GetListCtrl();

dwExStyle = m_List.GetExStyle();
dwExStyle |= LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES;
m_List.SetExtendedStyle(dwExStyle);
m_List.SetBkColor(RGB(255, 255, 255));
ASSERT(m_List.GetBkColor() == RGB(255, 255, 255));
m_List.InsertColumn(0,_T("Share"),LVCFMT_LEFT,160);
m_List.InsertColumn(1,_T("Status"),LVCFMT_LEFT,90);
m_List.InsertColumn(2,_T("Action Date"),LVCFMT_LEFT,90);
m_List.InsertColumn(3,_T("Book Date"),LVCFMT_LEFT,90);
m_List.InsertColumn(4,_T("Comment"),LVCFMT_LEFT,160);

I have used it before in a SDI application that opened on this view with no problems whatsoever, which leads me to believe there must be a special way of calling the same view from a menu within a MDI application that I'm missing.
This is the only code I have in the menu handler function at the moment
CRepPartApp* pApp = (CRepPartApp*)AfxGetApp();
pApp->m_pDocManager->OnFileNew();
All the example's I can find deals with multiple document and views and switching between them. It is a new job and I'm feeling a bit incompetentBlush | :O so any pointers would be much appreciatedSmile | :)

Grasp it but you cannot get it!
It's name is memory..
Questiontoo simple question about modeless dialog? Pin
lucy15-Mar-02 5:11
lucy15-Mar-02 5:11 
AnswerRe: too simple question about modeless dialog? Pin
Tomasz Sowinski15-Mar-02 5:22
Tomasz Sowinski15-Mar-02 5:22 
GeneralRe: too simple question about modeless dialog? Pin
lucy15-Mar-02 6:02
lucy15-Mar-02 6:02 
GeneralRe: too simple question about modeless dialog? Pin
lucy15-Mar-02 6:21
lucy15-Mar-02 6:21 
GeneralOLEDB Provider Pin
Mauricio Ritter15-Mar-02 4:46
Mauricio Ritter15-Mar-02 4:46 
GeneralRe: OLEDB Provider Pin
Tomasz Sowinski15-Mar-02 4:55
Tomasz Sowinski15-Mar-02 4:55 
GeneralRe: OLEDB Provider Pin
Mauricio Ritter15-Mar-02 5:02
Mauricio Ritter15-Mar-02 5:02 
Generalhardware access, direct control, driver source Pin
Kuniva15-Mar-02 4:45
Kuniva15-Mar-02 4:45 
GeneralRe: hardware access, direct control, driver source Pin
Tomasz Sowinski15-Mar-02 4:49
Tomasz Sowinski15-Mar-02 4:49 
GeneralFlush System Buffers for a Drive Pin
Brad Manske15-Mar-02 4:22
Brad Manske15-Mar-02 4:22 
GeneralRe: Flush System Buffers for a Drive Pin
Tomasz Sowinski15-Mar-02 4:30
Tomasz Sowinski15-Mar-02 4:30 
GeneralRe: Flush System Buffers for a Drive Pin
Brad Manske15-Mar-02 4:36
Brad Manske15-Mar-02 4:36 
GeneralRe: Flush System Buffers for a Drive Pin
Tomasz Sowinski15-Mar-02 4:41
Tomasz Sowinski15-Mar-02 4:41 
GeneralRe: Flush System Buffers for a Drive Pin
Ravi Bhavnani15-Mar-02 4:38
professionalRavi Bhavnani15-Mar-02 4:38 
GeneralRe: Flush System Buffers for a Drive Pin
Tomasz Sowinski15-Mar-02 4:51
Tomasz Sowinski15-Mar-02 4:51 
GeneralRe: Flush System Buffers for a Drive Pin
Brad Manske15-Mar-02 5:11
Brad Manske15-Mar-02 5:11 
GeneralRe: Flush System Buffers for a Drive Pin
Brad Manske15-Mar-02 5:09
Brad Manske15-Mar-02 5:09 

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.