Click here to Skip to main content
15,908,175 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Stay On Top - Advice Needed Pin
Hosam Aly Mahmoud18-Aug-03 12:27
Hosam Aly Mahmoud18-Aug-03 12:27 
GeneralRe: Stay On Top - Advice Needed Pin
Norman Bates19-Aug-03 0:53
Norman Bates19-Aug-03 0:53 
GeneralRe: Stay On Top - Advice Needed Pin
Hosam Aly Mahmoud19-Aug-03 5:03
Hosam Aly Mahmoud19-Aug-03 5:03 
GeneralCDataGrid is not in MSDN Pin
sdfdsfa18-Aug-03 10:24
sdfdsfa18-Aug-03 10:24 
GeneralRe: CDataGrid is not in MSDN Pin
David Crow18-Aug-03 10:50
David Crow18-Aug-03 10:50 
GeneralInstalling Visual Studio .NET 2003 Pin
Rohde18-Aug-03 10:21
Rohde18-Aug-03 10:21 
GeneralRe: Installing Visual Studio .NET 2003 Pin
valikac18-Aug-03 11:56
valikac18-Aug-03 11:56 
GeneralAssertion error due to imagelist Pin
Binayak18-Aug-03 9:07
Binayak18-Aug-03 9:07 
Hi,

I’m initializing the dialog in my MFC application from the parent window as follows:

In TreeView.cpp,

void CMyTreeView::OnDraw(CDC* pDC)
{
/**/
CMfcTree dlg;

int ret = dlg.DoModal();


}

In MfcTree.cpp OnInitDialog() is as follows,

BOOL CMfcTree::OnInitDialog()
{
CDialog::OnInitDialog();

m_ImageList.Create(IDB_BITMAP1, 13, 12, RGB(255,255,255));

HTREEITEM hItem = m_nTree.InsertItem( "Root", 0,2,TVI_ROOT );
m_nTree.SelectItem (hItem);
m_nTree.SetImageList(&m_ImageList, TVSIL_NORMAL);
m_nTree.SetItemState(hItem, TVIS_BOLD, TVIS_BOLD );


//sets the background color

m_nTree.SetTextColor(RGB(0, 0, 0));

m_nTree.SetBkColor(RGB(255, 255, 255));

……………………………….
………………………………..

}

If I try to move the dialog I keep getting this error:
Debug assertion failed.
And it points to ASSERT(m_hImageList == NULL); in the winctrl2.cpp.

It has something to do with the line m_ImageList.Create(IDB_BITMAP1, 13, 12, RGB(255,255,255));


Please advise. I’m really frustrated with this error.

Binayak

Generalcan't get the debugger to work in visual studio .net Pin
trustno118-Aug-03 9:01
trustno118-Aug-03 9:01 
QuestionFile Tree Control??? Pin
Bob Stanneveld18-Aug-03 8:59
Bob Stanneveld18-Aug-03 8:59 
AnswerRe: File Tree Control??? Pin
Shay Harel18-Aug-03 9:12
Shay Harel18-Aug-03 9:12 
GeneralRe: File Tree Control??? Pin
Bob Stanneveld19-Aug-03 2:48
Bob Stanneveld19-Aug-03 2:48 
Questionhow to maximize the window of SDI project Pin
mr200318-Aug-03 8:26
mr200318-Aug-03 8:26 
AnswerRe: how to maximize the window of SDI project Pin
Bob Stanneveld18-Aug-03 8:54
Bob Stanneveld18-Aug-03 8:54 
AnswerRe: how to maximize the window of SDI project Pin
David Crow18-Aug-03 8:55
David Crow18-Aug-03 8:55 
QuestionDo not allow move Window?? Pin
Rene De La Garza18-Aug-03 8:16
Rene De La Garza18-Aug-03 8:16 
AnswerRe: Do not allow move Window?? Pin
David Crow18-Aug-03 9:00
David Crow18-Aug-03 9:00 
AnswerRe: Do not allow move Window?? Pin
valikac18-Aug-03 12:00
valikac18-Aug-03 12:00 
GeneralRe: Do not allow move Window?? Pin
Rene De La Garza18-Aug-03 12:20
Rene De La Garza18-Aug-03 12:20 
GeneralToolbar ToolTip problem Pin
Chris Losinger18-Aug-03 8:10
professionalChris Losinger18-Aug-03 8:10 
GeneralCListCtrl::GetHotItem() XP & 2000 Pin
Member 53100518-Aug-03 8:03
Member 53100518-Aug-03 8:03 
GeneralRe: CListCtrl::GetHotItem() XP & 2000 Pin
David Crow18-Aug-03 9:02
David Crow18-Aug-03 9:02 
GeneralRe: CListCtrl::GetHotItem() XP & 2000 Pin
Member 53100518-Aug-03 9:33
Member 53100518-Aug-03 9:33 
GeneralRe: CListCtrl::GetHotItem() XP & 2000 Pin
David Crow18-Aug-03 9:46
David Crow18-Aug-03 9:46 
GeneralRe: CListCtrl::GetHotItem() XP & 2000 Pin
Member 53100518-Aug-03 10:16
Member 53100518-Aug-03 10:16 

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.