|
#include <iostream>
That's all you have to do. Whatever libraries you need for standard libraries like that one will be automatically linked in any Visual Studio 2005 project.
|
|
|
|
|
You may find namespaces new (or new namespaces)
iostream stuff will be in the std namespace. If you don't want to explicitly resolve the
namespace everywhere (with the scope resolution operator) then you can add this to your
source (CPP! ) files:
using namespace std;
Mark
-- modified at 20:02 Wednesday 20th June, 2007
*edited in red*
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Mark Salsbery wrote: using namespace std;
This construct should be avoided at global scope in header files however. If you do put one in at global scope in a header file then anyone that includes your header loses some control over the namespace composition and it may make it hard from them to resolve name clashes – which is what namespaces were designed to solve.
Steve
|
|
|
|
|
Stephen Hewitt wrote: This construct should be avoided at global scope in header files however
Ack! That's what I meant - I could have sworn I put "(CPP)" in there to qualify it - that was
another post
Thanks for the reminder and heads-up Steve!
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
I write an ActiveX control,it is tested ok with test container in either debug or release mode,but when i use it in my project, the release one can run,but the debug one can not,I don`t know why.If you can help me,please leave your email,I will send the code to you so you can test it,thanks!
|
|
|
|
|
Your project may be built on release mode
|| ART OF LIVING ||
|
|
|
|
|
Thank U,but my project is on debug mode,the release control can use,but the debug one can not
|
|
|
|
|
kingliub wrote: but the debug one can not
Right, and ?? What is the problem ? You get a crash, a compilation error, a blue cow coming out of your screen, ... ?
Please, be more specific and explain what the problem is.
|
|
|
|
|
Cedric Moonen wrote: a blue cow coming out of your screen, ...
He's gonna need a bigger debugger!
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Thank you,the problem is: when I use the debug one in my project,an error_dialog comes out the moment I change the property`s value,on the dialog:
Debug Assertion Failed!
Program:...\MSDev98\bin\MSDEV.EXE
File:afxwin2.inl
Line:171
For information...
then is three buttons: stop retry ignore
but the release one is ok.
|
|
|
|
|
My email Id is shivditya@yahoo.co.in
Let me tell you thing which I am not sure.
You can not use ActiveX controls developed in debug mode.
Because it is not possible to debug activex control.
It is possible to have debug dll but not debug activex control.
Any way you can send I will try to resolve.
|| ART OF LIVING ||
|
|
|
|
|
Hi
Has anyone ever tried to implement xp theme for menu?
I am getting good results with all class types exept MENU.
OpenThemeData(hWnd, "MENU");
Am not able to get a handle to the MENU theme.
Any commends would be of great help.
Regards
The Best Religion is Science.
Once you understand it, you will know God.
|
|
|
|
|
I am building application as secondary identification server for ATMs.
My application is fine. But just for pictorial representation I want to show
ATM line on dialog who alls thread is currently active. I am planning to
show on dialog it self. (Or I have to develop separate ActiveX for doing so,please suggest)
while showing on dialog , I am not getting crash of GetWindowRect and device context
of dialog window may not proper.It crashes at ::GetWindowRect Of groupbox in which I was planning to show the running threads.
I am not sure why crash is occuring. I am not sure devicecontext I can obtain.
|| ART OF LIVING ||
|
|
|
|
|
Why wouldn't you use a custom window for that?
|
|
|
|
|
Custom window means what exactly you want to suggest.
|| ART OF LIVING ||
|
|
|
|
|
shivditya wrote: I am not getting device context
of dialog window properly
You can draw on the dialog just like any other window.
GetDC() gets a DC to the client area of the window
GetWindowDC() gets a DC to the entire window
If you draw in response to WM_PAINT, BeginPaint()/EndPaint() can be used to acquuire a DC
or you can use the above APIs and handle the invalid region yourself.
If you draw in response to WM_ERASEBKGND, a DC is provided.
There's no threadsafe GDI - all drawing must be synchronized (and flushed) if you're using
multiple threads for drawing.
shivditya wrote: and it crashes at ::GetWindowRect Of groupbox
Crashes how and why?
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Thats what I am also surprised how ::GetWindowRect crashes when my Id is proper, and I am passing handle which I checked with spy as proper ,Still it crashes very badly.
|| ART OF LIVING ||
|
|
|
|
|
GetWindowRect takes an HWND not an ID. How are you calling it? Where are you calling it?
Do you have a valid HWND for the control?
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
I am very sorry yah I am passing only hadle and pointer to RECT.
I found that handle from ID.But Problem is there,as I used this fnction so many
times It works fine.
|| ART OF LIVING ||
|
|
|
|
|
I can't imagine what the problem is. Maybe a bit of debugging on your end will help?
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Why draw on the dialog? Why not draw in your own window that is a child of the dialog?
Of course while drawing on a dialog it's a good time to eat your Fish Filet
Actually I am not sure he needs to draw, maybe just use a static control and put some text in it, hard to say from his post. I think he really needs[^]
|
|
|
|
|
Yeah....you're just trying to drag me into this, huh?
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Was it a joke or anything. No doubt my total VC experience and total experience is 1.5 years , and Basically I am Mechanical Engineer, but right now I am developing
FingurePrint Identification Server For ATM Parallel to Main Switch for Identification
Aplab India,
Near CheckNaka,
Thane(W),
Maharshtra
India -400604.
I am putting in joke to bypass from main discussion.
|| ART OF LIVING ||
|
|
|
|
|
I am not that master of VC ,but I have to work on very higher end.
I need to show somehow how many atms ,which all atms are currently running.
Doubt is lack of Life force , Answers cannot satify doubt Only Art Of Living Can Solve www.artofliving.org
|
|
|
|
|
shivditya wrote: It crashes at ::GetWindowRect Of groupbox in which I was planning to show the running threads.
"show the running threads" what does that mean? Show them how?
If you just want to display some text put a static control in side the GroupBox control and then SetWindowText on the static control.
|
|
|
|