|
I am getting many errors in the following code:
#ifdef _UNICODE
typedef std::wcout _tcout;
#else
typedef std::cout _tcout;
#endif
But i am not getting any error in this code:
#ifdef _UNICODE
typedef std::wstring _tstring;
#else
typedef std::string _tstring;
#endif
Can anyone tell me what is the problem in the first case, because i am getting 8 errors. I am copying first error below:
c:\documents and settings\tstring.h(22) : error C2146: syntax error : missing ';' before identifier '_tcout'
Yes, Yes i am including all header files like iostream e.t.c
|
|
|
|
|
didn't you forget an #include <iostream> somewhere ?
~RaGE();
|
|
|
|
|
Rage wrote:
didn't you forget an #include <iostream> somewhere ?
Yes, i am including it, and still getting errors.
|
|
|
|
|
std::cout is not a type, but an object, so you cannot use it in a typedef declaration. It is as if you write:
int a;
typedef a b;
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
In window sockets, how do I set the baud rate of the remote computer??
Thanks,
grahamo.
|
|
|
|
|
What do you mean baud rate? Windows Sockets uses the socket to it's full capacity. If you want to limit the bandwidth that the socket uses that you have to create timers and limit the bandwith yourself
|
|
|
|
|
I've been asked to add a watermark to a CScrollView derived view, which should not move when the user scrolls - so the watermark should always be in the center of what the user sees. How can I get the center point of what the users sees? I've tried using
CRect rect;
GetClientRect(&rect); then using rect.Width() / 2 & rect.Height() / 2 , which works well, until you use the scroll bars then that point moves.
Any ideas?
Dylan
|
|
|
|
|
GetScrollPosition
You know how it is, you've been looking at the same bit of code for 3 hours and you have a lack of caffine in your system... anything could go wrong
Dylan
|
|
|
|
|
Hi,
Any idea how I can draw a transparent circle? i.e a circle in which the interior part of the circle is transparent.
If I use the CDC::Ellipse() function it fills the inside of the circle with the default brush selected into the DC.
Right now, to get over the problem I'm drawing 2 arcs, but I was wondering if there was any direct method.
Thanks.
|
|
|
|
|
HOLLOW_BRUSH ?
|
|
|
|
|
Cool. Works great.
Thanks Buddy.
|
|
|
|
|
Hi,
I have created a dynamic menu, but now im not sure how to get the menu item to respond when they are clicked on. The items are created by the user at run time. Is there a simple solution to this?
Cheers
Dor
|
|
|
|
|
If you have a menu, if its a popup menu, you can get t ereturn value at the time of the call like this:
int ret = TrackPopupMenuEx(pSub->m_hMenu, TPM_LEFTALIGN | TPM_LEFTBUTTON | TPM_NONOTIFY | TPM_RETURNCMD, x, y, this->m_hWnd, NULL);
switch (ret)
{
case IDC_COMMAND1:
case IDC_ANOTHER_COMMAND:
}
The function returns 0 if the menu was cancelled. If its a top level menu, then I would recommend using a set range of menu iDs e.g. 10000 - 11000. You could them map the command using the ON_COMMAND_RANGE() macro for the message map.
Roger Allen
Sonork 100.10016
Were you different as a kid? Did you ever say "Ooohhh, shiny red" even once? - Paul Watson 11-February-2003
|
|
|
|
|
hello
is there any windows based GUI for the intel C++ compiler 7.0? well, i use the Microsoft Visual C++ 6.0 but the standard edition (jeje, about 9 years i use only standard editions...) i think it is enough perfectly .
ok, intel write that the compiler would not be run under the VC standard. . now i will run the ICC as a standalone compiler but with a graphical user interface does anyone know a tool?
hope you can help me and understand my bad english
|
|
|
|
|
How did you get that compiler ?
Is there a standard (cheap) version too ?
|
|
|
|
|
There's a free 30-day demo version for Windows, Linux users can download a "non-commercial unsupported" version which has no expiration date but is limited to personal and educational use.
|
|
|
|
|
Hi,
have you ever tried sth. like UltraEdit32 ???
Try here ... www.idmComp.com[^]
It's a very good editor, and you can embedd nearly all compilers (but you have to know what you are doing...)
Hope this helps..
Olli!
Olli
Make it idiot proof and someone will make a better idiot......
|
|
|
|
|
Hello Olli
Thats a fine idea, thank you
I look later whether i can add the compiler to UE.
|
|
|
|
|
I did everything as in article (inserted classes for word automation) In articled it is said that the Studio (I work on .NET) creates a file called "msword9.h" for Office2000 (which is installed on my computer), but it does not create that "msword9.h"
why, or .NET creates something other,
|
|
|
|
|
Nope,AFAIK, the file is not created, it is findable in the MSOffice directory. It contains the API for developping Word automation.
~RaGE();
|
|
|
|
|
I've done this several times without issue. The only (apparent) difference is that I don't use .NET, but use VS6 instead. Surely .NET can't be that goofy.
|
|
|
|
|
Hi,
I don't like modal dialogs that miss the minimize button
and deny the user from minimizing the application, when
they are open and stay on top of the main window.
Can one handle the WM_SYSCOMMAND message and let both the
dialog and the main window minimize & restore at the same
time ?
Can anyone help ?
Thanks in advance.
|
|
|
|
|
Assuming you can add a minimize button (which I think should just be a case of adding the WS_MINIMIZE style to the dialog template), you should be able to handle WM_SIZECHANGED and minimize your owner window.
I'll admit this is a guess!
--
Mike Dimmick
|
|
|
|
|
Why should I upgrade to .NET from VC++ 6.
I'm having trouble seeing the pros and cons.
Pat...
patrick@michael-clarke.com
|
|
|
|
|
Most of those upgrading seem to do so for personal "career" reasons, anticipating a general shift to .NET and managed code etc.
They want to have the cutting edge knowledge to position themself in a possible future .NET labourmarket.
The reason why I personal would want to switch is the upcoming improved C++-compiler, which complies to the C++ standard (at last!) regarding templates and variour other stuff.
My opinions may have changed, but not the fact that I am right.
|
|
|
|