debugging missing images in a CTreeCtrl

Hello,

I am having some difficulty trying to debug some missing images in a
CTreeCtrl. Essentially, I subclass CDialog and have a CTreeCtrl and
CImageList as data members. The CTreeCtrl is supposed to be an
expandable tree with each item containing a standard checkbox and a
16x16 solid icon. The problem is that the icons are not showing up at
all.

I'm wondering where is a good point to start debugging the missing
icon images?

Things I have verified:
1. The image list is valid and is set as the TVSIL_NORMAL image list
for the CTreeCtrl.
2. The bitmaps within the image list are valid (I overrode OnPaint and
blitted them directly to the screen to be sure).
3. The space next to the checkbox adjusts accordingly with the set
sizes of the image list.
4. I've tried setting the background color of the CTreeCtrl window to
see if maybe they were just getting masked out (even though I'm not
using masks) but the background color was uninterrupted at the
positions where the icon images should be.

I have a feeling this is something silly and simple that I am
overlooking.

Thanks in advance for any help. Please let me know if I need to
provide more information.
-Mick
0
12/17/2007 10:16:41 PM
vc.mfc 33608 articles. 0 followers. Follow

3 Replies
548 Views

Similar Articles

[PageSpeed] 40

I've been creating the bitmaps and adding them to the image list in
the OnInitDialog method of my CDialog subclass. Would that have
anything to do with the images showing up blank? I've littered my code
with asserts, but nothing seems to be firing; everything is as
expected.

Surely someone else has had problems with bitmaps showing up blank. It
must be something basic.

Just hoping to figure this out before I go ahead with a custom draw.

Thanks again,
Mick
0
12/18/2007 4:40:47 PM
Also, now that I think about it, it seems like it would be useful to
put a breakpoint in the code where the drawing of the CTreeCtrl's
item's image occurs. Any idea where that would be?

Thanks,
-Mick
0
12/18/2007 4:43:51 PM
Mick Charles Beaver <myheartinamerica@gmail.com> wrote in news:a899ed90-
c272-49a4-9d99-2a6db9e7e982@t1g2000pra.googlegroups.com:

> I've been creating the bitmaps and adding them to the image list in
> the OnInitDialog method of my CDialog subclass. Would that have
> anything to do with the images showing up blank? I've littered my code
> with asserts, but nothing seems to be firing; everything is as
> expected.
> 
> Surely someone else has had problems with bitmaps showing up blank. It
> must be something basic.
> 
> Just hoping to figure this out before I go ahead with a custom draw.

I've always added my images in the constructor and then done the 
SetImageList in the OnInitDialog (or OnCreate for a view).

You say you're creating a bitmap - perhaps the problem is there? Whenever 
I've had a problem with a bitmap that I create, it's usually because I did 
something wrong creating it...

Dave Connet
0
connet1 (33)
12/19/2007 3:04:38 AM
Reply:

Similar Artilces:

missing page navigation icons
the page navigation icons in the lower left corner just below the document have disappeared on all of our publisher documents. To see how many pages a document has we have to do a print preview. We have reapaired and totally reinstalled office and the problem persists. We are using publisher 2002 sp1. If we open the documents on other machines they have the normal page icons. Any ideas out there? View, status bar. -- Mary Sauer MS MVP http://office.microsoft.com/ http://www.msauer.mvps.org/ news://msnews.microsoft.com "POPCI" <POPCI@discussions.microsoft.com> wrote in m...

Debug Assertion Faild
Debug Assertion Fail Program: C:..... File: winocc.cp Line: 22 The exception Breakpoin A breakpoint has been reache (0x80000003) occurred in the application at location 0x5f4369c This program is to scan a file and look for a matching string. Could this error be caused by code not exiting a "break;" properly? I'm not sure how to explore resolving this. The information listed in the Debug is The thread 0x3DD8 has exited with code 0 (0x0) The thread 0x3EA8 has exited with code -2147483645 (0x80000003) The program 'C:\Documents and Settings\Owner\My Documents\Dads\Programmi...

DEBUG
Curious, new problem has started. Evey once in a whle a new folder appears on my desktop labeled "debug"..The folder is empty and I do not know how it is formed or why..Does someone know the cause of this and a remedy so it does not appear again Thanks Running Xp professtional heshie wrote: > Curious, new problem has started. Evey once in a whle a new folder appears on > my desktop labeled "debug"..The folder is empty and I do not know how it is > formed or why..Does someone know the cause of this and a remedy so it does > not appear again &g...

Missing entries
Hi, I have a palms table that stores palm census for each and every palm for a block on every trial. Every trial has a set number of blocks and set number of palms. Each of the palms has a palm census done every year to check its status. The problem firstly is that for data entry: Entry is done such that the trial, plot is entered, and also palm number and the status. Sometimes not all the palms are being entered, so there are a few missing palms that have no status in a year and then in the next year it is entered. I would like to do a query that picks up those palms that have not been ente...

An application crashes only under debugging
Hi, I'm using VC++ 6.0. I have a Win32 Application (I will call it "EXE") which is linked with a Win32 DLL and I don't have the source files of the DLL; When I execute the EXE by double-clicking on the icon reprsenting it , there are no problems; On the contrary, if I try to debug the EXE the program crashes: in fact, the debugger shows an "Access Violation" error message and informs that an istruction of the DLL attempts to read a memory location which cannot be read. Does someone know a possible cause of this problem? Thanks. M If the DLL is an MFC DLL (it is...

missing files
in win 98 I get a message that says missing MPRAPI file- any suggestions? ...

Finding "missing" Sent Mail
Hello... My Boss just came to me in a panic as he had a message on his screen about consolidating his mail (how he describes it) and he told it Yes.. He now can not find his saved Sent Mail.... Can you help? Where did it go? Thank you... Hi Stan, Perhaps he archived his email? Open Outlook, click on Tools > Options > Other > Autoarchive and see if autoarchive appears to be turned on. If it is, this will show you the exact file the items have been moved to. Next you will need for Outlook to display this file within the user interface. To do that, click on File >...

Weird: CRichEditCtrl scrollbars work in debug build but not in release build
Hi, I have an App Wizard project (VS 6.0), non doc-view architecture. My view class is: class CRichTextView : public CRichEditCtrl. In MainFrm.cpp I have a member variable of: CRichTextView m_wndView;. I create the view as follows: if (!m_wndView.Create(WS_CHILD | WS_VISIBLE | ES_AUTOVSCROLL | ES_MULTILINE | WS_VSCROLL, CRect(0,0,0,0), this, AFX_IDW_PANE_FIRST)) { TRACE0("Failed to create view window\n"); return -1; } It works "just peachy" in the debug build. But, when I make...

Very strange debugging problem
I have a windows console program that interfaces with a library that interfaces with a hardware device. I run the same unmodified program with the same input and get different results on different trials. My program is the same, the test data is the same, yet different runs produce different results. There are only two sorts of things that I can think of that could cause this: (1) The state of the hardware device changes between runs. (2) Some really weird memory error that causes my program to run correctly 75% of this time and fail other times. Does anyone have any ideas on how I ca...

Reply is missing in Outlook 2003
Several times we have encountered a mystic problem with e-mails where the reply is missing (Outlook in Office 2003). We send an e-mail and the recipient replies and everything looks OK but when the e-meil returns to us the reply message is missing. Only the original text is in the e-mail and it looks like the recipient forgot to write the answer.... Has anybody else noticed this problem and found out why this happens every now and then? It never happened with Office 2000. Mikael Ahlgren We are also using SuperOffice 5.6 to archive email. Since this problem seems to affect only the SuperO...

Outlook 2007 Image Preview
Images that are included in incoming and outgoing messages are oversized in the display, both the preview and when I open the message. This includes icon images when a file is attached in a message. For instance, in the case of an icon, the icon is larger than half the screen. I have been unable to find out what is causing this issue. ...

Debug in Release mode?
Old wine in old bottle.. being served by a new bartender :o) How do I do this? pointer would be much appreciated. >Old wine in old bottle.. being served by a new bartender :o) > >How do I do this? The subject or the content? To debug a release build see "How to: Debug a Release Build" in your VC++ help. Dave In addition to what Dave suggested you might want to just do a find on this newsgroup using those keywords. There have been several discussions on that topic in the last few days that should pop up a bunch of links. If you can't find them let me know and ...

Locate missing .msi files office 2007
i have re formatted my HD and installed XP service pack 2 and i can't get office 2007 to install, i have disks and key, but it stops at "setup can't find excel.en-us\excel|mui.msi Browse to a valid installation source and click ok" when i select the folder, it says "invalid location" Please help this is driving me nuts i need this running for my uni course On the web find your country's Microsoft support phone # I believe that help with installation problems is free best wishes Bernard -- www.stfx.ca/people/bliengme "Bobalito"...

Aspect ratio of image differs in print
I have a protected xlt-document with a company logotype in the position of a header. I can´t put the image in the real header because I have to use the space by the image for other things. My problem is that the aspect of the image changes when I print the document. Om the computer screen it looks good and the preferences have the correct value but when I print the document the image gets squared instead of beeing higher than wide. The top and bottom margin of the document is 1 cm and the printing setting is for the document to maintain 100% of its size. I hope anyone can either ...

More missing fields in Advanced Find
Also the system attribute 'Has Children' (haschildrencode) in the Entity Contact is not available for selection in the Advanced Find selection box. Does anybody have an idea why? This and several other fields are missing and are a known problem that should hopefully get fixed with a hotfix at some point. "Karel" wrote: > Also the system attribute 'Has Children' (haschildrencode) in the Entity > Contact is not available for selection in the Advanced Find selection box. > > Does anybody have an idea why? A hotfix is now available for this bug. The h...

Debugging
Hi, I have an access violation in my program when closing, apart from that things are working in debug mode. This is difficult to deal due to a lack of information. One message I get is as below, is there anyway to turn this into something meaningful? Heap block at 009B1C68 modified at 009B2370 past requested size of 700 The stack trace shows ntdll! 77f75a58() What can I use to track problems like this down? I must be accessing restricted memory during the deallocation of objects or misusing the mfc, I do not know, though there does not appear to be any memory leaks. I did have memor...

Missing Controls
Hi: I have a vc++ .NET application that reads a continuous stream of data from the serial port and displays it. The display contains progress bars, static text controls, and list controls that are constantly being updated as the data comes in. My problem is that whenever the program is minimized for about 10 minutes (or loses the focus some other way) the controls start disappearing. The static text controls disappear, some of the buttons disappear, etc. With the buttons I can make them reappear by pressing them, but the text on them is still missing and they don't work. Can anyone te...

missing public folders #2
I am reposting my original message in hopes that this time it will get a response from somebody who as an idea of the solution. Last time I posted it I did learn that others have had the same problem. For some reason completely unknown to me, many of the public folders dissappeared from the M drive and are no longer accessible from the Outlook clients. On the other hand, when I look at the Exchange management program the folders are all there and the permissions seem correct. Is there any way of getting these back without doing a complete system/Exchange restore? Thanks in advance, Christo...

Missing Emails
Could anyone make helpful comment please. Of late some emails have not arrived. I use Orange but my address is the old ( fsnet.co.uk) I also use OE6 I check both my Webmail & OE and the missing items not shown. They have no filter to block them and not in junk folder also. Some have been from my Local Council and some from individuals, most mails get through but replies are the weak link at times. I've renewed folders in OE in case corrupt. Are some companies blacklisted ? or is it server problems. Regards Roger Speaking only from personal experience--my ISP cha...

Entourage X
When my wife got into Entourage this morning, her account was completely missing. Nothing, no contacts, no email nada... I set the account back up hoping that it would access everything but only got email received the last 3 days. No contacts, personal folders, etc. Does anyone have insight on how to recover this info?? Thanks This morning I opened Entourage and It was empty; not contacts, mail, or calendar items. All customization was wiped clean as if it were the first use... Although prone to "fiddling" with customization, I was not doing anything of the sort yesterday...

Windows Explorer File Find Function missing
Hey guys. I have a new problem. My Windows file Explorer no longer has a find function or dialog. Hitting Ctrl+logokey+F yields an error: "The active directory domain service is currently unavailable." Is this common? Is there a known solution? Thanks for any assistance in this matter. Hi, What operating system are you using? What are you trying to find? My best hunch is that you should use Ctrl+F instead of Ctrl+Winkey+F Carlos "Nunya" wrote: > Hey guys. > > I have a new problem. My Windows file Explorer no longer has a f...

Where did my images go?
I just saw the post about images not showing up, but I'm not emailing mine. I have Pub 2000. Had projected saved (Publisher files) mainly address labels and calendars. With images on them. I had printed them and even later bring some up and printed them again (from the saved file) Just looked now and the images aren't on them. Just a box with big X across it. I don't know where the images are, I mean where I got them at the time, in my hundreds of pictures (in photo, etc files) or clip art. Just the projects I have saved in Publisher. Publisher files. Someone asked ...

Missing Menu Items
I have a user that has the same security role in every company and her Purchasing >>Cards menu is different in some of the companies. She is supposed to see the 1099 Details, Buyers, & Customer/Vendor menu items and for some reason she sees them in some of the companies but not in others. Any ideas on what might be causing this? Thanks in advance. Can the user add the window to the shortcut bar and open it? This is a quick and dirty test to see if access has been granted if the item doesn't appear on the menu. If you are using GP 10 I would copy the user's security...

remote debugging
Hi, I am using VC++ 6.0's remote debugger. It keeps complaining that the remote machine could not be found. I defined the remote machine as \\sty-401 or R: (a map drive that is equivalent to \\sty-401) in menu->Build->Debugger remote connection->Settings->Target machine name. I can access the machine by typing either \\stry-401 or R: in the windows explorer. That means the access has no problem. Can someone help me out? Thanks. Tony "JD" <jdt_young@yahoo.com> wrote in message news:etml8qy7GHA.3604@TK2MSFTNGP02.phx.gbl... > Hi, > > I am ...

missing news command #2
I wanted to access newsgroups with outlook, so I followed the help instructions, opened the customize window, looked under the GO category and found the news command. When dragged it up to the menu, it went to the tool bar instead of the go menu. I managed to get it off the tool bar, but now the command is missing from the GO list of commands in the customize menu. I have tried hitting reset, but that only resets the toolbars, not the list of commands. I can't find my news command to put it in my go menu. What can I do? Outlook 2003? Make sure you've set Outlook Express as...