|
I don't want this information to be displayed to the user on the form but as a background job in a windows console.
I'm just not sure why the console is not showing up.
Even if I just write a simply command in the form as:
<br />
Console::WriteLine(L"Hello");<br />
A console is not shown with the word Hello.
Sorry I’m going to be offline now and won’t be on until tomorrow. I would to thank you for looking into helping me with this problem.
|
|
|
|
|
gman2008 wrote: Console::WriteLine(L"Hello");
Is this VC++? Managed?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I have a Visual C++ book that has windows forms in it but I think it goes under managed
|
|
|
|
|
So you might want to re-ask your question here. There are several ways to spawn a console window and write to it, so I can only surmise that managed vs. unmanaged code handles it differently under the covers.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Visual Studio VC++ 6 development system worked fine so far on Windows XP computer, but now on my Windows Vista class wizzard looses classes and on laucnh and each compilation session there a message appears of incompatibility with Windows Vista. How can I solve this problem ?
|
|
|
|
|
André Dewispelaere wrote: ...each compilation session there a message appears of incompatibility with Windows Vista.
Have you searched for the exact error message?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
André Dewispelaere wrote: How can I solve this problem ?
turning off UAC solves the compilation warnings.
class wizard has always been a little forgetful, regardless of OS, so i didn't notice any change in Vista.
|
|
|
|
|
Dear all:
I am trying to use the hash_map in C++ in VS2005.NET.
The code is like:
<br />
#include <hash_map><br />
...<br />
...<br />
hash<const char*=""> H;<br />
size_t h = H("ca");<br />
</const></hash_map>
I want to generate the hash value for the string. This code works perfectly in Linux but in VS2005 it complains that:
1>d:\project\vs2005\c++\gmesh\gmesh\ml_geodesic_gridpoint_index.cpp(54) : error C2065: 'hash' : undeclared identifier
1>d:\project\vs2005\c++\gmesh\gmesh\ml_geodesic_gridpoint_index.cpp(55) : error C3861: 'H': identifier not found
It seems that the compiler can't find the hash definition. Does anyone have idea to solve this problem for me please?
Thanks
Asura
|
|
|
|
|
Ming Luo wrote: It seems that the compiler can't find the hash definition. Does anyone have idea to solve this problem for me please?
Does the hash_map file exist? Can the compiler find it? If you right-click the #include statement, can you opt to open the file?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
DavidCrow wrote: Does the hash_map file exist?
Indeed it exists (at least on my system, VS2005). On the other there's no hope to find the hash class itself (again, on my system).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
Hello everyone,
I listed for scenarios. I think case 1, 2 and 4 are object's destructor is called during stack unwinding caused by exception. Scenario 3 is not stack unwinding and it is normal function return (not exception) triggers the destructor of the object.
Scenario 1:
try{
local object defined;
exception throws;
} catch ()
{
catched;
}
Scenario 2:
try{
local object defined;
exception throws;
} catch ()
{
not catched;
}
Scenario 3:
local object defined;
try{
exception throws;
} catch ()
{
catched;
}
Scenario 4:
local object defined;
try{
exception throws;
} catch ()
{
not catched;
}
thanks in advance,
George
|
|
|
|
|
Hello!
Following problem:
GetComputerNameEx called with parameter ComputerNamePhysicalDnsHostname didn't return the DNS name - it returns the NETBIOS name.
Do you have an idea whats wrong with the code??
Thanks in advance.
Greetings
Amd Opteron
Here is the code:
#define _WIN32_WINNT 0x0501
#include <cstdio>
#include <cstdlib>
#include <windows.h>
#include <tchar.h>
int _tmain(int argc, TCHAR *argv[]) {
TCHAR szHostname[MAX_COMPUTERNAME_LENGTH + 1];
TCHAR szHostname2[MAX_COMPUTERNAME_LENGTH + 1];
TCHAR *szDnsName;
DWORD dwSize;
GetComputerName(szHostname, &dwSize);
GetComputerNameEx((COMPUTER_NAME_FORMAT)ComputerNamePhysicalDnsHostname, NULL, &dwSize);
szDnsName = new TCHAR[++dwSize];
GetComputerNameEx((COMPUTER_NAME_FORMAT)ComputerNamePhysicalDnsHostname, szDnsName, &dwSize);
dwSize = sizeof(szHostname2) / sizeof(TCHAR);
DnsHostnameToComputerName(szDnsName, szHostname2, &dwSize);
_tprintf(_T("'%s'\n'%s'\n'%s'\n"), szHostname, szDnsName, szHostname2);
delete[] szDnsName;
return EXIT_SUCCESS;
}
|
|
|
|
|
The code works with me, and it returns the name of my computer.
Whether the Netbios-name is any different from the DNS-Hostname is determined by your administrator.
Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all. Douglas Adams, "Dirk Gently's Holistic Detective Agency"
|
|
|
|
|
amdopteron wrote: GetComputerNameEx called with parameter ComputerNamePhysicalDnsHostname didn't return the DNS name - it returns the NETBIOS name.
It simply returns the name that was established at system startup, when the system read it from the registry. That must be the NetBIOS name in your case.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
This should be the corresponding registry key:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]
"Hostname"="your-hostname"
On my machine stands there the NetBIOS name and NOT the DNS name.
Do you know a way how to tell Windows to set this key to the proper value?
|
|
|
|
|
amdopteron wrote: Do you know a way how to tell Windows to set this key to the proper value?
Unfortunately no, as I'm not familiar enough with NetBIOS and DNS. What does gethostname() do for you?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
gethostname() from the WinSock library also returns the NetBIOS name...
Any idea?
|
|
|
|
|
class CCombObj : public CObject <br />
{<br />
public:<br />
DECLARE_SERIAL( CCombObj )<br />
<br />
class CProCombObj : public CCombObj
modified 13-Mar-13 6:01am.
|
|
|
|
|
The error message in fact is clear: CCombObj symbol is undefined in the source currently under compilation. Maybe you've included definition for class CProCombObj but not for CCombObj .
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
Error is clear. because from the code u have given CProCombObj is a nested class in CCombObj. ie the complete definition of CCombObj is unknown for the complier when it find the following class declaration statement.
class CProCombObj : public CCombObj
{
the complier need to get complete information about a class while using inheritance to construct the VTable. so that is why it showing the error.
i think this will help u
|
|
|
|
|
Is there something wrong? I have a class by using manually GUI add class to generic class for a while the class to class that deriveded from CObject base class. The compiler has already this job be complated for the user's defination these classes just as in base defination?
modified 13-Mar-13 6:00am.
|
|
|
|
|
hi
i want to check whether variable in given generic array(like CArray) is CString or integer etc.I tried using IsKindOf but it doesn't work for CString.so is there any method for Runtime type Identification??
"Every morning I go through Forbes list of 40 richest people in the world. If my name is not in there, I go to work..!!!"
|
|
|
|
|
Correct me if I'm wrong but your array is a template array. So you have to declare something like this:
CArray<CString> myArray;
So, you know exactly what you declared, isn't it ?
|
|
|
|
|
QuickDeveloper wrote: I tried using IsKindOf but it doesn't work for CString
Use the (standardized) RTTI-feature of C++!
The only reason that IsKindOf exists is that MFC predates the C++-Standard.
Something like
CString* pCStr = dynamic_cast<cstring*>(vec[i]);
if( !pCStr)
{
...must be something different...
}
Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all. Douglas Adams, "Dirk Gently's Holistic Detective Agency"
|
|
|
|
|
QuickDeveloper wrote: so is there any method for Runtime type Identification??
typeid()
|
|
|
|