|
You can make your font with CreateFont and then use of SetFont for your controls.
|
|
|
|
|
i m try this but its take no effect.
presently i m using 1024by768 pixels screen resolution.
if i change this resolution to 800by600 pixels than all windows are looks bigger .
so i want if i change the resolution the application dilogs and controls are itself resize.
so please help me for this.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Okay so I need to use the linked list class provided in the standard template library but when I do I get the error message "fatal error C1083: Cannot open include file: 'iostream.h': No such file or directory.
C:\Program Files (x86)\STL\include\stl_algobase.h Line 57"
For some reason this file wasn't provided with my copy of Visual Studio 2008 (Express Edition) I did however get the file "iostream" distributed with visual studio but renaming this is futile as the two files are fundamentally different.
What to do?
|
|
|
|
|
The headers whose names end in .h are from the (very very) old standard library. In fact, it sounds like 2008 doesn't even ship them anymore. Use the files without an extension.
|
|
|
|
|
the problem is that the file is #include d in stl_algobase.h. I can manually change it but it breaks the STL. Am I missing something here? Am I meant to be using a list class that is already included with visual studio or is the STL list the one I should be using?
|
|
|
|
|
Sounds like a bug in the Express edition. Are you running SP1?
If you don't get an answer here you could try posting on the MSDN forums. I can't believe something this basic doesn't have a fix.
Kevin
|
|
|
|
|
I don't recall downloading a service pack for visual studio but according to the "About" entry in the help menu I am running version 9.0.21022.8 RTM.
I managed to locate the standard template library in my visual studio folder (Previously I was just looking in the microsoft windows sdk folder) so I deleted the copy of STL that I downloaded and made sure it was using the default one provided with my compiler. This seems to have fixed that problem but now when I compile I get the following error message
Error 1 fatal error C1189: #error : STL/CLR can be used only in code compiled /clr, clr:pure, or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\cliext\xutility 6
I have tried all three command line parameters but with each one I get one of the errors;
Error 1 Command line error D8016 : '/EHs' and '/clr' command-line options are incompatible cl<br />
Error 1 Command line error D8016 : '/EHs' and '/clr:pure' command-line options are incompatible cl<br />
Error 1 Command line error D8016 : '/EHs' and '/clr:safe' command-line options are incompatible cl<br />
/EHs appears to be embedded into the win32 build options and there seems to be no way for me to remove it (and I also have no clue what it is!)
|
|
|
|
|
Are you really trying to do a C++/CLI (managed) app or a native app?
For C++/CLI, you should be using /EHa
If you're using the IDE, it should be at
project settings/Configuration Properties/C++/Code Generation/Enable C++ Exceptions
For STL:
According to the Standard C++ Library Overview[^], <list>
may be the header file you want.
For STL/CLR:
STL/CLR Library Reference[^]
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I've never been sure of what managed c++ refers to but I'm under the impression it means working with the .net framework? If so, then no I am not writing a managed c++ app.
The header file you mentioned is the one I am now using as I posted earlier but that's what is giving me the new error "STL/CLR can be used only in code compiled /clr, clr:pure, or /clr:safe", and subsequently the other three errors when compiling with those switches.
So am I meant to be using the standard template library in a native c++ project or not? It doesn't appear to be compatible judging from the errors its spitting out.
Perhaps I should just write my own linked list template class.
|
|
|
|
|
Sauce! wrote: I'm under the impression it means working with the .net framework?
Correct.
Sauce! wrote: So am I meant to be using the standard template library in a native c++ project or not?
Yes. What I can't figure out is why you're getting an error that mentions
STL/CLR (which is for managed .NET code) if you're not compiling code managed.
Can you post some sample code using an STL list class that
fails?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
"can you post some sample code using an stl list class that fails?"
#include list
NOTE: I left out the <> tags around list on purpose as the forums were interpreting it as a html list tag.
lol seriously I just opened up a new project in visual studio, chose the "empty project" option, added an empty "main.cpp" and typed that one line and voila! I get the same bloody error!
So something is very wrong. :S happens in both release and debug mode.
Just to check, I created a second empty project, but chose "CLR empty project" instead, pasted the same code into the empty "main.cpp" file, and compiled. I got the following errors:
Error 1 error C2039: 'input_iterator_tag' : is not a member of 'std' C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\cliext\xutility 295
Error 2 error C2039: 'output_iterator_tag' : is not a member of 'std' C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\cliext\xutility 302
Error 3 error C2039: 'forward_iterator_tag' : is not a member of 'std' C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\cliext\xutility 309
Error 4 error C2039: 'bidirectional_iterator_tag' : is not a member of 'std' C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\cliext\xutility 316
Error 5 error C2039: 'random_access_iterator_tag' : is not a member of 'std' C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\cliext\xutility 323
Error 6 error C2039: '_Int_iterator_tag' : is not a member of 'std' C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\cliext\xutility 330
This is quite strange...
|
|
|
|
|
Is the STL even included with the express edition of VS?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Yes, it is... *hmmm*
Further testing reveals that this occurs with the vector template class as well. I'd say it's safe to say that any of the STL classes would have the same problem.
I came across something strange in the project's property pages;
http://img135.imageshack.us/my.php?image=64369996db3.jpg[^]
EDIT: Nevermind, this option became greyed out when I removed the /clr switch. I'm still getting compile errors telling me I must compile with /clr though :S
DOObLEY EDOOT:
FINALLY!
I found the culprit. In my project settings "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\cliext" had somehow made it's way into the include directories. I removed it and now it's compiling fine :] How did it get in there? Probably something to do with my own stupidity :P
Third edit:
Apparently I NEED that include directory or I miss out on all the windows libraries wtf?
modified on Wednesday, September 10, 2008 12:13 AM
|
|
|
|
|
|
You must declare extern the g_Info in the MyInfoArrayClass.h header, under the declaration of the class (or add a forward declaration of your class above the const extern CMyInfoArrayClass g_Info;).
|
|
|
|
|
Hello all,
I am using Extended MAPI to retrieve Outlook Contact information. I am able to get most of the fields.
But i am not able to get below list to fields for Contact Item.
1. IM Address
2. Picture of the Contact
3. Business Card information
4. Country for Phone numbers
Is there any body who can help me out on this?
Thanks and Regards,
Manish Patel.
B.E. - Information Technology.
|
|
|
|
|
I everyone.
I'm trying to implement Hierarchy in a school project.
Here's the design:
Class A has 2 child classes B and C.
Class A
{
protected:
string date;
string hour;
string type;
public:
(...)
}
Class B : public A
{
protected:
string outflow
public:
(...)
}
Class C : public A
{
protected:
string inflow
string store
public:
(...)
}
To build a new B object I do somethinh like:
A *a; <br />
a = new B(date, hour, type, outflow)
At this point I think everything is working...
My question is: when I want to add an object to a list what do I do?
Do I have to create 2 lists? One for B and one for C?
I created just one for type A, but the problem is that if I create a B object I won't be able to add the "outflow" in the list.
Thanks!
"Failure is always an option."
|
|
|
|
|
u should add in list refrence of B stored in a (that is of type A)
|
|
|
|
|
Hi,
How you are calling like this?
a = new B(date, hour, type, outflow);
There is no any constructor in the class...
The price of anything is the amount of life you exchange for it.
Thanks and Regards.
SANTHOSH V
|
|
|
|
|
Hi.
That was the problem.. now i use another constructor and I solve my problem.
B * b = new B (date, hour, type, outflow); .
Thanks for your help.
Cheers!
"Failure is always an option."
|
|
|
|
|
FrankMookie wrote: Do I have to create 2 lists? One for B and one for C?
That's were polymorphism comes in handy: you just create a list which contains pointers to A objects. As B objects and C objects are also A objects, you can add pointers to B and C objects to your list.
Of course, you probably would like to differenciate them in a certain way (suppose that you want to print different information for B and for C), then this specialization can be done throuhg virtual functions. You define a virtual Print function in A and redefine for B and for C. Now, you can walk over your list and call the print function, which will be redirected to the correct B or C function depending of the type of your class.
|
|
|
|
|
The *.exe is built with VC in my computer,it can work with the database on the server in my computer,but when copy it to the other computer,it doesn't work.The DLL which it need is already copied with the *.exe.When click the *.exe in the other computer,nothing occurs.What should I do?
|
|
|
|
|
aygrhnwms304 wrote: nothing occurs
Nothing at all?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
When I doubleclick the *.exe,Nothing occurs,yes,nothing,and no mistake,only no sense.
|
|
|
|
|
Whats your Operating system and computer that you run your program?
|
|
|
|