VC6++ Greyed Out Lines

I am using Visual C++ 6.0 to examine a MFC application. There are many greyed 
out lines of code in the various procedure definitions. Can someone please 
explain what this means?

Thanks,
Henry

0
Henry1 (156)
5/2/2006 4:07:02 PM
vc.mfc 33608 articles. 0 followers. Follow

12 Replies
453 Views

Similar Articles

[PageSpeed] 8

I think what you are referring to is the code generated by the app
wizard. These would be the method declaration in the class. It should
have a commented line with something like Class wizard generated code.
Is that what you are talking about?

----
Ajay

0
ajaykalra (6842)
5/2/2006 4:28:52 PM
it also greys out code inside of #if/#end statements now as well.

Tom

"Henry" <Henry@discussions.microsoft.com> wrote in message 
news:9601272B-D1A4-4674-AB2D-0373C6881AD5@microsoft.com...
>I am using Visual C++ 6.0 to examine a MFC application. There are many 
>greyed
> out lines of code in the various procedure definitions. Can someone please
> explain what this means?
>
> Thanks,
> Henry
> 


0
tserface (3861)
5/2/2006 4:38:50 PM
Thanks to all who responded.

I am beginning to think it is because the MFC application I am working on 
was compiled with Visual Studio .NET and I am using Visual Studio 97. I have 
requested an older build that was created by VS 97 to see if that clarifies 
the 'greyed out' code.



"Henry" wrote:

> I am using Visual C++ 6.0 to examine a MFC application. There are many greyed 
> out lines of code in the various procedure definitions. Can someone please 
> explain what this means?
> 
> Thanks,
> Henry
> 
0
Henry1 (156)
5/2/2006 8:14:02 PM
Color of lines in an editor have nothing to do with VS version. VS97
uses a .dsp file and would not open a .sln file (used in newer versions
of VS.Net). Each version can provide a different default color for
various attributes. This has no impact on code. I havent looked into
customizing it as I use VisualAssist which provides far more intense in
coloring various code attributes. This has no issue on code integrity.

---
Ajay

0
ajaykalra (6842)
5/2/2006 8:41:35 PM
You can also set the colors for various things in the Tools/Options so 
perhaps someone has set that up on your computer.

Tom

"Ajay Kalra" <ajaykalra@yahoo.com> wrote in message 
news:1146602495.251948.63630@y43g2000cwc.googlegroups.com...
> Color of lines in an editor have nothing to do with VS version. VS97
> uses a .dsp file and would not open a .sln file (used in newer versions
> of VS.Net). Each version can provide a different default color for
> various attributes. This has no impact on code. I havent looked into
> customizing it as I use VisualAssist which provides far more intense in
> coloring various code attributes. This has no issue on code integrity.
>
> ---
> Ajay
> 


0
tserface (3861)
5/2/2006 10:15:08 PM
Does your code still compile as you would expect?  Just curious.

Tom

"Henry" <Henry@discussions.microsoft.com> wrote in message 
news:A10C50EB-7A0B-4D32-B62F-8E6A24D3F4C1@microsoft.com...
> Thanks to all who responded.
>
> I am beginning to think it is because the MFC application I am working on
> was compiled with Visual Studio .NET and I am using Visual Studio 97. I 
> have
> requested an older build that was created by VS 97 to see if that 
> clarifies
> the 'greyed out' code.


0
tserface (3861)
5/2/2006 10:27:53 PM
Good question, Tom. I have finally got it to compile without errors. They 
were not initializing a static variable member of a class correctly. The 
'greyed out' code is still everywhere but the funny thing is I can change it 
(it remains grey) and I can see that the changes are taking effect when the 
re-built executable runs. I have always thought that greyed out code meant 
that it was disabled but this appears to not be the case. It is a puzzle and 
only Willy Gates knows the answer (maybe Melinda does too).

Thanks to everyone for your help.

"Tom Serface" wrote:

> Does your code still compile as you would expect?  Just curious.
> 
> Tom
> 
> "Henry" <Henry@discussions.microsoft.com> wrote in message 
> news:A10C50EB-7A0B-4D32-B62F-8E6A24D3F4C1@microsoft.com...
> > Thanks to all who responded.
> >
> > I am beginning to think it is because the MFC application I am working on
> > was compiled with Visual Studio .NET and I am using Visual Studio 97. I 
> > have
> > requested an older build that was created by VS 97 to see if that 
> > clarifies
> > the 'greyed out' code.
> 
> 
> 
0
Henry1 (156)
5/3/2006 8:09:01 PM
> I have always thought that greyed out code meant that it was disabled but this
> appears to not be the case.

Thats not true in editor. YOu can assign colors to various code
attributes and still edit the file. Editing and colors of text not
necessarily related.

---
Ajay

0
ajaykalra (6842)
5/3/2006 8:27:47 PM
Henry wrote:

> Good question, Tom. I have finally got it to compile without errors. They 
> were not initializing a static variable member of a class correctly. The 
> 'greyed out' code is still everywhere but the funny thing is I can change it 
> (it remains grey) and I can see that the changes are taking effect when the 
> re-built executable runs. I have always thought that greyed out code meant 
> that it was disabled but this appears to not be the case. It is a puzzle and 
> only Willy Gates knows the answer (maybe Melinda does too).
> 
[snip]

Henry:

If you are talking about the wizard-generated code, then you are not 
supposed to edit the code unless you really know what you are doing. But 
you can edit it. This is a feature, not a bug (and I like it).

David Wilkinson
0
no-reply8010 (1791)
5/3/2006 8:33:22 PM
Actually, in this case "grey" is just a color.  My guess is that if you 
could figure out the type of code that is greyed (perhaps you could post a 
snippet here) then you could look in the options and change the color to 
whatever you want for that particular syntax.  It's not like greying out a 
control which makes it disabled.

Tom

"Henry" <Henry@discussions.microsoft.com> wrote in message 
news:0AD0D4CF-F3FA-4602-BA36-D9BF2B914877@microsoft.com...
> Good question, Tom. I have finally got it to compile without errors. They
> were not initializing a static variable member of a class correctly. The
> 'greyed out' code is still everywhere but the funny thing is I can change 
> it
> (it remains grey) and I can see that the changes are taking effect when 
> the
> re-built executable runs. I have always thought that greyed out code meant
> that it was disabled but this appears to not be the case. It is a puzzle 
> and
> only Willy Gates knows the answer (maybe Melinda does too).
>
> Thanks to everyone for your help.


0
tserface (3861)
5/3/2006 8:52:59 PM
David,

I am pretty sure the greyed out code is created by Class Wizard. There must 
be a recommended way for changing it, I suppose, rather then just getting in 
and editing it. 

"David Wilkinson" wrote:

> Henry wrote:
> 
> > Good question, Tom. I have finally got it to compile without errors. They 
> > were not initializing a static variable member of a class correctly. The 
> > 'greyed out' code is still everywhere but the funny thing is I can change it 
> > (it remains grey) and I can see that the changes are taking effect when the 
> > re-built executable runs. I have always thought that greyed out code meant 
> > that it was disabled but this appears to not be the case. It is a puzzle and 
> > only Willy Gates knows the answer (maybe Melinda does too).
> > 
> [snip]
> 
> Henry:
> 
> If you are talking about the wizard-generated code, then you are not 
> supposed to edit the code unless you really know what you are doing. But 
> you can edit it. This is a feature, not a bug (and I like it).
> 
> David Wilkinson
> 
0
Henry1 (156)
5/4/2006 12:00:01 AM
"Henry" <Henry@discussions.microsoft.com> wrote in message
news:C1E6059A-DAC1-4C31-B88E-5A7F98337330@microsoft.com...
> David,
>
> I am pretty sure the greyed out code is created by Class Wizard. There
must
> be a recommended way for changing it, I suppose, rather then just getting
in
> and editing it.

You can change it in the wizard itself. I however have always gone ahead and
edited it by hand. I dont care too much about the wizard after the project
has been created.

--
Ajay Kalra [MVP - VC++]
ajaykalra@yahoo.com


0
ajaykalra (6842)
5/4/2006 1:33:05 AM
Reply:

Similar Artilces:

multi-line cells
Hi, I need to be able to put some multi-line data into single cells in an excel spreadsheed. In particular, I want to put in the full address of clients without putting the address parts in a group of cells. I want to be able to write the address just as I would on an envelope. I can't seem to get excell to take the carriage return character in a single cell's input. Can anyone help? Thanks in advance, Steve Steve, press ALT-ENTER to put in a line break. Bob Flanagan Macro Systems http://www.add-ins.com Productivity add-ins and downloadable books on VB macros for Excel &quo...

Delegates Accept / Decline options grey on OWA
Running exchange 2003 OWA I notice a delegate can't accept or decline a meeting request. Is that normal, a bug or don't I have somethine configured right. It works fine for the standard client. Thanks John John, This is perfectly normal behaviour for OWA. You'd need to assign the delegate 'owner' rights against the principal's mailbox (as apposed to Editor) if you need to utilise this functionality from OWA. Or, you can define RPC/HTTP access for your environment and have the delegate use Outlook in a remote scenario with no further modifications. - Val ---...

SOP Line Status Display
Display a line status on the SOP Transaction Entry window allowing you to see at a glance whether the line is fully or partially invoiced / ordered / back ordered / purchased rather than having to drill into each line to identify the open lines. For example: BO - on back order IN - invoiced PI - partially invoiced PO - on purchase order AR - all quantities ready to transfer PR - some quantities ready to transfer Particularly useful for SOP documents with many lines where quantities are invoiced a few at a time eg as they are received into stock ---------------- This post is a sugg...

i need to type on top of a line without it moving
I am trying to type on a line in a document, but the line moves when I do. I need to know how to type on top of the line without it moving in the document. To create the line I pressed the "dash" key and held it down. If I have created this the wrong way, please help me to get it right. I have Publisher 2007. Thank you Linda Don't type the line using dashes; type the line then use the line tool to draw the line under the statement. -- Don - Publisher 2000� Vancouver, USA "Lulu" <Lulu@discussions.microsoft.com> wrote in message news:3E2DDA57-0A3C-4E59-...

how do i create a four line consumption schedule for economics
...

mailto address does not appear on "TO" line in outlook
when a client clicks on a mailto link on a web page, three dots (...) appear in the TO line of the outlook e-mail message instead of the address from the link. are there any suggestion on settings I should check? ...

"starting a new line in the same row in excell"
i need help on this question thanx farhad Have you tried "Alt" + "Enter"?? Mike Rogers "farhad" wrote: > i need help on this question thanx ...

"Do not allow Attachments" box is greyed out
Just finished installing W2K SP4, IE6 SP1 and all the latest patches from MS. I am using Outlook Express but I cannot open or Save Attachments. Under Options/Security the box labeled "Do not allow attachments to be saved or opened that could potentially be a virus" is greyed out, therefore I cannot change the value. Tried MS web site, but I cannot find any fix. See http://support.microsoft.com/default.aspx?scid=KB;en-us;q291387 Also note: This is a group to support Outlook from the Office group of programs. Outlook Express is a part of Internet Explorer and is a quite diffe...

Values plotted incorrectly on Line Chart
Any idea what's causing this or how to fix it? In a line chart showing multiple series plotted over time, many of the points are plotted at the wrong level (wrong height along on the Y axis), although the data value is correct (as shown in the "tool tip" when hovering over the plotted point). For example, here are consecutive values for 3 series: 9, 2, 3, 3, 2 plotted as: 14, 7, 4, 5, 4 4, 4, 1, 1, 1 plotted as: 5, 5, 1, 2, 2 0, 1, 0, 1, 1 plotted as: 1, 1, 0, 1, 1 Hard to solve without seeking the problem. Email me (remove TRUENORTH. ) a copy of you workbook file bes...

Off-line Mode
What tables are used in off-line mode? Dan hi Click on link and read about the tables I posted http://www.microsoft.com/Businesssolutions/Community/Newsgroups/dgbrowser/en-us/default.mspx?query=tables&dg=microsoft.public.pos&cat=&lang=en&cr=US&pt=&catlist=8d3f188d-a0E9-40e4-86e2-46508a35c759&dglist=&ptlist=&exp=&sloc=en-us AccountReceivable AccountReceivableHistory Batch Register Configuration CalendarEvent DailySales DropPayout Import ImportEntry InventoryTransferLog Journal Message NonTenderTransaction OldJournal [Order] OrderEntry OrderHistory P...

How do I export/save a shhet where some of the cells have multiple line values
At the office I wrote a perl script to proces the data exported/saved from an excel spreadsheet. I noticed that the perl script processed more lines than existed rows in the spreadsheet. Upon closer examination I noticed that some of the cells have multiple line values. Is there any way I can control the action of the export/save so that the multiple line val;ues are combined into a single line ? Thanks... The cells with multiple lines would have linefeeds in them. This would be the character 0010 which is entered using Alt + Enter Select all cells before export/save and Edit>Replace...

JIT (VC6)
VC++ 6 is not my JIT (just in time) debugger any more. How can I set it back? See if the following KB article helps you http://support.microsoft.com/?id=103861 -- Cheers Check Abdoul [VC++ MVP] ----------------------------------- "Petar Popara" <my.fake@mail.net> wrote in message news:e$WwNRkzEHA.1264@TK2MSFTNGP12.phx.gbl... > > VC++ 6 is not my JIT (just in time) debugger any more. How can I set it > back? > > ...

Porting Problem between VC6 and VC7
Hi, I have the following problem.... double** pD1; std::vector<double> m_Vector; *pD1 = m_Vector.begin(); // This line of code works fine in VC 6.0 //But it gives the following Compilation Error in VC 7.0 error C2440: '=' : cannot convert from 'std::vector<_Ty>::iterator' to 'double *' with [ _Ty=double ] What could be the possible solution to this problem.. Thanks with Regards, San. "San" <feelsanjeev@hotmail.com> wrote in message news:uu7uGHq%23EHA.3988@TK2MSFTNGP11.phx.gbl... > H...

Creating a Line Graph with Selectable Data
I am trying to create a chart for use in the hotel industry. I have 24 hotels that I would like to chart future room rates over the course of a month. I want the ability to select the hotels I would like to compare on a line graph. Possibly check the hotel name which triggers the data to display on the line graph. Any suggestions would be greatly appreciated! I have tried to search for "selectable data", "dynamic charts", etc. and can't seem to find what I need. I am not an Excel expert but I work with the program daily. Best regards. I have jus...

keeping a sirname from wrapping onto another line
I need to keep a first name and sirname together on the same line, but the sirname is wrapping onto the next line. How do I keep them on the same line. Use a non-breaking space instead of a normal space. You can insert one by using CTRL+SHIFT+SPACE. Yves "rbp" <rbp@discussions.microsoft.com> wrote in message news:ABB2D70A-0E0D-4BD9-A663-E62F79743834@microsoft.com... >I need to keep a first name and sirname together on the same line, but the > sirname is wrapping onto the next line. How do I keep them on the same > line. ...

Line chart: Dates in uneven intervalls on x-achsis #2
'Supplementary' questions: Is there a clever way to make excel recogniz that '3 months' stands for '0.25 years', and '6 months' stands for '0. years'? I know, this is only cosmetics. Nevertheless it would be interesting ;) Gil -- gdavid ----------------------------------------------------------------------- gdavids's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1589 View this thread: http://www.excelforum.com/showthread.php?threadid=27378 You could use a helper column that divides months by 12 to scale as years. Jer...

"treat empty cells as" is greyed out in charts
I've upgraded to Office 2007 and opened an Excel workbook from Excel 2000 which contained a number of graphs both on sheets and on tabs of their own. One graph is fine but the others are screwed up because of the way it is treating empty cells or gaps in the data. The radio buttons for "treat empty cells as" is grayed out except for the "zero" option. On the graph that is OK I can choose the option to leave a gap and its fine. Does anyone know why this has happened or how I can correct this? The availability of that setting depends on the chart type. I haven&...

Leader Lines in Excel?
Does anyone know if it is possible to create Leader Lines in an Excel worksheet, like the way you can in Word (using Tab Stops)?? Thanks. It depends what you're trying to do, but some variation on the following may help: 1. Enter a value in A2, and the other value in C2. 2. In cell B2, type the character you want as the leader, e.g. a period. 3. With B2 selected, choose Format>Cells. 4. On the Alignment tab, under Horizontal, choose Fill 5. Click OK Steve wrote: > Does anyone know if it is possible to create Leader Lines > in an Excel worksheet, like the way you can in Wo...

I want to find the lowest point on the plotted line in a graph.
Hi, I want to find the lowest point on the plotted line in XY (Scatter) graph. I have many points scattered above and below the line. I need the lowest point on the line and not the lowest point on the graph. Hi, We need more detail about the line and your data points? Is the line a simple horizontal line, a slope or a undulating line? Cheers Andy -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info "Edwin" <Edwin@discussions.microsoft.com> wrote in message news:1B9AF947-98BD-467F-9F23-93039DD968DC@microsoft.com... > Hi, > > I wa...

Still frozen out of On-line clip art--PLEASE HELP!
I'm sorry, Mary--I tried what you told me--NOTHING works. I'm starting to panic as I use the office on-line clipart constantly. The only step I didn't try was deleting the Office cookie because I don't know how to do that. I am not a technical person. In addition to being frozen out of Office on-line clip art, I am not able to engage a hyperlink. I get the same message each time: "Unable to open. Cannot open specified file". I can't understand why everything was working fine a couple of days ago and now everything seems to be locked up. I even foun...

Editing Paragraph Line Spacing using macro; need help
I have the following code which should, but does not, change paragraphs that have exactly 24 or 12 pt spacing. Can you advise me as to what is wrong with the code? I can't find anything that addresses the issue in an if statement. I hope someone can help. Sub ParaSpacingFix3() '2. If the paras is set to exactly 12 points ' then make the spacing single spaced. ' If the paras is set to exactly 24 points ' then make the spacing double spaced. Dim par As Paragraph On Error GoTo NextPara For Each par In ActiveDocument.Paragraphs If par.L...

Special line graph effect
Hi, I'm trying to create a line chart that, beyond a certain point, gives an increasingly widened line to indicate uncertainty when extrapolating into the future. I've created a temporary link to a graph from a Bank of England inflation report which has the effect: www.student.city.ac.uk/~ae316/linechart.jpg Not sure if this is possible in Excel but would appreciate any help Thanks Pascal Hi You can achieve this effect by combining a line and area chart. set your first area series = the lower bound of the projected range and your second area series to be the difference between ...

Constant number of lines per group
I need to print a constant number of lines per group, as my report needs to print on pre-printed forms, and the data needs to land in the correct location on the paper. I found the following support article on Microsoft's web site, but it indicates that it works only through version 97. Hoping it would still work anyway, I followed the instructions, but it did not work for me in Access 2007. http://support.microsoft.com/kb/q119073 Does anybody know how to accomplish this in 2007? TIA. "... did not work ... in Access 2007" does not tell us much. Did Access print anything?...

Aligning lines in a chart
Hi I have a chart created from three different worksheets. They are lists of defects grouped on dates, and each sheet contains one status. The x-axis has dates, the y-axis has number of defects. The problem seems to be aligning the different lines from these worksheets. The groups are not on the same dates, so I have three tables that can look like this (only first three, sorted): Date New Defects 27.05.2008 9 28.05.2008 14 29.05.2008 14 Date Fixed Defects 28.05.2008 7 29.05.2008 6 30.05.2008 8 Date Closed Defects 29....

Contacts Box Greyed out
The box to add contacts to the outlook address book is greyed out. I have changed permissions and still it is greyed out ...