Click here to Skip to main content
15,920,628 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralVisual Studio .NET problem, please help. Pin
Anonymous26-Oct-02 3:38
Anonymous26-Oct-02 3:38 
GeneralRe: Visual Studio .NET problem, please help. Pin
Stephane Rodriguez.26-Oct-02 3:50
Stephane Rodriguez.26-Oct-02 3:50 
Questionhow to change button color and how to ctivate te horizontal defilement bar of a lis Pin
a_hic26-Oct-02 0:53
a_hic26-Oct-02 0:53 
AnswerRe: how to change button color and how to ctivate te horizontal defilement bar of a lis Pin
Nish Nishant26-Oct-02 1:47
sitebuilderNish Nishant26-Oct-02 1:47 
GeneralRe: how to change button color and how to ctivate te horizontal defilement bar of a lis Pin
Rickard Andersson2026-Oct-02 2:29
Rickard Andersson2026-Oct-02 2:29 
GeneralRe: how to change button color and how to ctivate te horizontal defilement bar of a lis Pin
Stephane Rodriguez.26-Oct-02 3:49
Stephane Rodriguez.26-Oct-02 3:49 
AnswerRe: how to change button color and how to ctivate te horizontal defilement bar of a lis Pin
a_hic26-Oct-02 4:18
a_hic26-Oct-02 4:18 
General[MFC] Calling a CFormView member function inside CMainFrm Pin
Lockness26-Oct-02 0:31
Lockness26-Oct-02 0:31 
In a MDI application I have a CFormView (called CListForm) associated with a IDD_FORMVIEW dialog type which I use as a template for a docking bar (used to show some thumbnails). The IDD_FORMVIEW dialog simply contains a CListCtrl. In CMainFrm.cpp, CMainFrame::OnCreate() is used to create every toolbar and even my thumbnails docking bar.

// This bar is derived from CSizeBar 2.44 by Cristi Posea
CViewBar m_wndImageBar;

CRuntimeClass* m_pRuntimeClass;
m_pRuntimeClass = RUNTIME_CLASS (CListForm);
m_wndImageBar.Create(this,
m_pRuntimeClass,
(CCreateContext *)(lpCreateStruct->lpCreateParams),
"Images", WS_CHILD | WS_VISIBLE | CBRS_TOP,
AFX_IDW_CONTROLBAR_FIRST + 33));

The problem is how to access to CListForm from CMainFrm.cpp because now I have to populate the list with a list of bitmap pointers using a CListForm member function I called PopulateList(). I tried to create a pointer to CListForm object in this way:

CListForm* m_pListForm;
m_pListForm = (CListForm*)m_pRuntimeClass->CreateObject();
m_pListForm->PopulateList();

Object is correctly created and shown in my MDI application and its member variables correctly allocated but its hWnd handle points to NULL!!! WHY?!? Infact when PopulateList() calls this function:

CListCtrl* pListCtrl = (CListCtrl*) GetDlgItem(IDC_LIST_CTRL);

to refer to its child CList control, it crashes.

Which is the correct way to fully access to my CListForm from CMainFrame class?

Thx
GeneralRe: [MFC] Calling a CFormView member function inside CMainFrm Pin
dabs31-Oct-02 4:59
dabs31-Oct-02 4:59 
GeneralBmp -> JPG Pin
int01h26-Oct-02 0:14
int01h26-Oct-02 0:14 
GeneralRe: Bmp -> JPG Pin
Davide Pizzolato26-Oct-02 0:53
Davide Pizzolato26-Oct-02 0:53 
GeneralRe: Bmp -> JPG Pin
Nish Nishant26-Oct-02 1:44
sitebuilderNish Nishant26-Oct-02 1:44 
GeneralRe: Bmp -> JPG Pin
int01h26-Oct-02 4:16
int01h26-Oct-02 4:16 
GeneralRe: Bmp -> JPG Pin
Scott H. Settlemier27-Oct-02 16:26
Scott H. Settlemier27-Oct-02 16:26 
GeneralRe: Bmp -> JPG Pin
int01h29-Oct-02 5:00
int01h29-Oct-02 5:00 
GeneralRe: Bmp -> JPG Pin
Scott H. Settlemier29-Oct-02 5:25
Scott H. Settlemier29-Oct-02 5:25 
GeneralRe: Bmp -> JPG Pin
nde_plume26-Oct-02 7:22
nde_plume26-Oct-02 7:22 
QuestionMFC -> Win 32?? Pin
Ayush25-Oct-02 23:12
Ayush25-Oct-02 23:12 
AnswerRe: MFC -> Win 32?? Pin
Venet26-Oct-02 1:40
Venet26-Oct-02 1:40 
GeneralRe: MFC -> Win 32?? Pin
Ayush26-Oct-02 1:46
Ayush26-Oct-02 1:46 
GeneralRe: MFC -> Win 32?? Pin
Venet26-Oct-02 2:05
Venet26-Oct-02 2:05 
AnswerRe: MFC -> Win 32?? Pin
Stephane Rodriguez.26-Oct-02 3:52
Stephane Rodriguez.26-Oct-02 3:52 
QuestionResizing two controls (splitting inside a dialog)? Pin
anonymoose25-Oct-02 22:18
anonymoose25-Oct-02 22:18 
AnswerPS: Resizing two controls (splitting inside a dialog)? Pin
Anonymous25-Oct-02 22:22
Anonymous25-Oct-02 22:22 
GeneralRe: PS: Resizing two controls (splitting inside a dialog)? Pin
anonymoose26-Oct-02 1:34
anonymoose26-Oct-02 1:34 

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.