C Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesC Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 11th, 2002, 02:30 AM
triswebb triswebb is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Posts: 1 triswebb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
MFC Custom Draw Help please

Hi all,

I have been stuck on a problem for some time and would REALLY appreciate any help I can get with it. Currently I have a list control that displays information as shown below.

Entity Name Amount Success Failure Unknown
IfcAxis2Placement3D 11 11 1 0
IfcCartesianPoint 29 29 0 0
IfcDirection 26 26 ´ 1 0

As you can see from the list (this list usually contains about 30 entrys) both IfcAxis2Placement3D and IfcDirection have failures, what I want to do is make theses entrys with failures blue, now the index of these items is known, ie. I have a vector that stores the entrys with errors, so for this list I would have a vector simply containing 0 and 3, currently I am using this code to change these entrys to blue, but it simply does not work:

for(int k = 0; k < kMax ; k++)
{

colorPoint = Org[k] ;
if (pLVCD->nmcd.dwItemSpec == colorPoint)
{
crText = RGB(128,128,255);
}
else
crText = RGB(0,0,0);
}

Here, Org is the list of indexs that I explained above and as you can see I am looping through them and then changing that index value to blue, the only problem is it only ever changes the last value to blue, i.e. in the above example it changes IfcDirection to blue but ignores IfcAxis2Placement3D !! I think it is obvious I am not using the right method to change on a specific index, but cannot find another that works. Any help greatly appreciated…..

Thanks again,

Tristan

Reply With Quote
  #2  
Old November 11th, 2002, 04:01 AM
TechNoFear TechNoFear is offline
Offensive Member
Dev Shed Novice (500 - 999 posts)
 
Join Date: Oct 2002
Location: in the perfect world
Posts: 594 TechNoFear User rank is Sergeant (500 - 2000 Reputation Level)TechNoFear User rank is Sergeant (500 - 2000 Reputation Level)TechNoFear User rank is Sergeant (500 - 2000 Reputation Level)TechNoFear User rank is Sergeant (500 - 2000 Reputation Level)TechNoFear User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 2 Days 14 h 6 m 15 sec
Reputation Power: 21
I do not use much MFC (takes away too much of my control and makes my apps too bloated).

Do a lot of owner draw in WIN32 API with Listviews.

Using WM_DRAWITEM msg's. But this is for complex LV's not the simpler custom draw.

Let me know if you this can help.
__________________
The essence of Christianity is told us in the Garden of Eden history. The fruit that was forbidden was on the Tree of Knowledge. The subtext is, All the suffering you have is because you wanted to find out what was going on. You could be in the Garden of Eden if you had just kept your f***ing mouth shut and hadn't asked any questions.

Frank Zappa

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesC Programming > MFC Custom Draw Help please


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT