Set Margins & Auto Paste Function Para :: C++

Status
Not open for further replies.
Hi.

I have two questions related to Visual C++. First, Borland C++ Builder has a margin feature where you get to see the actual page margin. That makes it easier to determine if you need to go to the next line because the current line extents pass a typical page.

Second, when I type in a function in the implementation file, Visual C++ will show a *tool-tip* message with the exact function parameter that is defined in the header file. Is there a way to just *quick paste* whatever Visual C++ sees?

For example:

// header file

afx_msg void OnChar(UINT nChar, UINT nRep, UINT nFlags);

// implementation file

void class::OnChar( // at this point, you see the tip

Is there a command to just quick paste whatever Visual C++ brings up since it is prabably the right parameter.

Thanks,
Kuphryn
 

DrPizza

Well-known member
93,870
Originally posted by kuphryn:
I have two questions related to Visual C++. First, Borland C++ Builder has a margin feature where you get to see the actual page margin. That makes it easier to determine if you need to go to the next line because the current line extents pass a typical page.
I don't think VC++ has anything like this; reading code in print is torture (I can't right click anything).

In any case, it should wrap automagically when printing anyway.

Second, when I type in a function in the implementation file, Visual C++ will show a *tool-tip* message with the exact function parameter that is defined in the header file. Is there a way to just *quick paste* whatever Visual C++ sees?
No.
 
In any case, it should wrap automagically when printing anyway.
But wrapped code looks like complete shit :p And I sometimes find it useful to print out some very complex (as in poorly written) pieces of code.

If you program with other people though, you may find it necessary to have a standard on just how wide the code should be (ie. should fit in the screen at a given rez with a given font).
 

DrPizza

Well-known member
93,870
Originally posted by euzeka:
But wrapped code looks like complete shit :p
So does any printed code. Hell, VC++6 won't even print in colour. Actually, if code must be printed, I prefer it to be wrapped and hence start not indented but at the left margin, because it makes it much clearer that the line is a continuation of the previous one.

And I sometimes find it useful to print out some very complex (as in poorly written) pieces of code.
This surprises me. I find reading code on paper hard. It leaves me dependent on the original programmer not being an ass. If I'm in an IDE, it doesn't matter so much -- the IDE can tell me what a variable is, even if its name gives no indication of purpose. It lets me see what #defines are. It lets me look at function prototypes to see what the parameters passed to a function mean. And so on. The IDE is useful anyway, but it's when dealing with poorly-written code that it becomes invaluable. It seems interesting that it's in the cases when the IDE can be most useful that you choose to eschew it.
 
Status
Not open for further replies.