VC++ problems, please help

This is a discussion on VC++ problems, please help within the C++ Programming forums, part of the General Programming Boards category; can anyone please help me to check the below codings see got any error,why i can not show the red ...

  1. #1
    Registered User
    Join Date
    Mar 2010
    Posts
    8

    VC++ problems, please help

    can anyone please help me to check the below codings see got any error,why i can not show the red color if i change the name? the purpose of the below coding is to check if got any changes must be reflected in red, otherwise is black

    Code:
    buf=GetJobItem(tmpJobNew,1);
    		buf.TrimRight();
    		if(buf.GetLength()>0)
    		{
    			if((tmpJobNew.wOfferMask & 0x4000) != 0)
    			{
    	
    			dc.SetTextColor(RED);
    			}
    			else
    			{
    			dc.SetTextColor(BLACK);
    		
    			}
    			
    		dc.ExtTextOut(leftStart,topStart,ETO_OPAQUE,NULL, _T("Name:"), NULL);
    			
    			tmp=GetJobItem(tmpJobNew, 2);
    			//tmp.TrimRight();
    				if (tmp.GetLength()>0)
    				{
    				tmp.Format(_T(" (%s)"),tmpJobNew);
    				//buf+=_T(", ");
    				buf=buf+tmp;
    				}
    		
    #if defined(IVD_1)
    		dc.ExtTextOut(50+leftStart,topStart,ETO_OPAQUE,NULL,buf, NULL);
    #else
    		dc.ExtTextOut(100+leftStart,topStart,ETO_OPAQUE,NULL,buf, NULL);
    #endif
    		topStart=topStart+nHeight;

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    If you change that if (the one with the & 0x4000) to something that is always true, do you get red text? If yes, then look at that condition again. If not, then I guess you should look at your ExtTextOut settings (which I'm not familiar with so I don't know what they should be).

  3. #3
    Registered User
    Join Date
    Mar 2010
    Posts
    8
    Quote Originally Posted by tabstop View Post
    If you change that if (the one with the & 0x4000) to something that is always true, do you get red text? If yes, then look at that condition again. If not, then I guess you should look at your ExtTextOut settings (which I'm not familiar with so I don't know what they should be).
    Thanks for your answer, i will go ang try them out, by the way what should i change here" if (the one with the & 0x4000)"

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. VC 2005 win 32 app error.
    By geek@02 in forum Windows Programming
    Replies: 15
    Last Post: 12-21-2009, 01:17 PM
  2. Common Problems
    By WolfPack in forum C Programming
    Replies: 4
    Last Post: 01-28-2003, 05:38 PM
  3. tile colliision detection problems
    By werdy666 in forum Game Programming
    Replies: 1
    Last Post: 10-23-2002, 09:26 PM
  4. Coding Problems
    By RpiMatty in forum C++ Programming
    Replies: 12
    Last Post: 01-06-2002, 01:47 AM
  5. Problems with my RPG app
    By valar_king in forum Game Programming
    Replies: 1
    Last Post: 12-15-2001, 07:07 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21