|
NULL_BRUSH seems to make the inside black. Is this what it is supposed to do?
|
|
|
|
|
How did you select the brush? dc.SelectObject(CBrush::FromHandle(HBRUSH(GetStockObject(NULL_BRUSH))) would be the proper way to do it.
--
A Stern Warning of Things to Come
|
|
|
|
|
Thought I would give it a try but VC6 doesn't seem to like it
error C2061: syntax error : identifier 'each'
MSDN has little to say, anybody know what the deal is?
|
|
|
|
|
It's not a valid keyword.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
According to MSDN it is, they even give a C++ example showing it's usage.
|
|
|
|
|
Not if it's the example I'm thinking of (the new C++/CLI extensions). Please provide a reference that indicates "for each" is valid in VC++ v6.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
waldermort wrote: http://msdn2.microsoft.com/en-us/library/ms177202.aspx[^]
You must've conveniently missed the part about it being for VC++ 2005.
waldermort wrote:
It also says to compile with /clr which VC6 also doesn't recognise
Of course it doesn't (support something newer than itself). Why would you think it would?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Well, obviously it must be for a newer version of VS, but that page doesn't mention VC2005, or any other version of VC. It simple says "New Language Features in Visual C++". I did however notice the v80 within the link on my local copy.
|
|
|
|
|
waldermort wrote: It simple says "New Language Features in Visual C++".
That very New Language Features in Visual C++ page states, "Visual C++ 2005 includes new syntax..."
VC++ v6 stopped being supported September of last year, and even then, new features would not be added to a language on its way out.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
waldermort wrote: but that page doesn't mention VC2005, or any other version of VC. It simple says "New Language Features in Visual C++".
If you click on that "New Language Features in Visual C++" link, the first line on that page is:
New Language Features in Visual C++
Visual C++ 2005 includes new syntax for writing applications to target the common language runtime. This topic presents an overview of the new syntax.
While you can't use the for each-in syntax, you can use the STL for_each algorithm.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Hi,
I wrote a piece of code which initially uses a 128 by 47 2D array. It works fine. But when I changed it to 1600 rows by 47 columns, the program starts to crash. The error message said that a stack overflow has occured.
I would like to know if dynamic 2D arrays solve this problem?
There are also some 1D arrays with the size of 1600. Do they have to be converted to dynamic arrays too?
|
|
|
|
|
Wouldn't it be easier to use a vector?
|
|
|
|
|
What is the size of the data? an array of what ?
dynamic arrays might or might not fix your problem if it's a size issue.
|
|
|
|
|
75,200 int s would require 300,800 bytes of stack. If that were a double , it would require 601,600 bytes of stack, over half of the default value. Pass that around to only a few functions and the stack could be exhausted very easily.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Sir,
I want to connect the database(Sql Server) to vc++.net 1.1 programically.I also want to use insert delete update queries in the form .Please help me or please send any link for the problem.
Thanks.
|
|
|
|
|
|
I am creating a class which is more of a wrapper for functions than a class. There are no member variables to worry about. All the functions are static and can be accessed using a namespace or creating an instance. Is there a method of creating the whole class as static rather than prefixing each function definition with the keyword static?
|
|
|
|
|
If there are no member variables, why even make it a class? Why not just put each of those functions into a namespace?
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
I have never seen this before. How would you do that?
|
|
|
|
|
something like :
namespace Potato
{
void Fry();
void Boil();
void Bake();
};
Patato::Fry();
using Potato;
Fry();
|
|
|
|
|
Perfect. Now, I wonder in the back of which book that was hiding?
|
|
|
|
|
Hi
I am using AfxBeginThread function for creating a Thread. I need to create multiple threads inside a loop. In this case, i will be passing the same control function address to different Afxbeginthread (). Will it be a problem to pass the same function address to different Afxbeginthread ()?
Note: I won't be waiting inside the Loop to start the next Thread.
Please let me know your comments on this
Thanx in Advance.
"You must do things that you think you cannot do"
- Eleanor Roosevelt
|
|
|
|
|
Raul_Figous wrote: I am using AfxBeginThread function for creating a Thread. I need to create multiple threads inside a loop. In this case, i will be passing the same control function address to different Afxbeginthread (). Will it be a problem to pass the same function address to different Afxbeginthread ()?
You won't have a problem here. However, as a performance thing, you might want to create each one suspended and then resume them after each is created.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Raul_Figous wrote: I need to create multiple threads inside a loop.
How many? Any more than 5 or 10 and you should consider using a pool.
What are you doing in them? If you can use overlapped IO that would be better than threads.
led mike
|
|
|
|