all groups > visual c > february 2006
Filter by week: 1 2 3 4
unresolved extern symbol on template member functions
Posted by Eugene at 2/28/2006 9:19:26 PM
I have just installed VC++2005 Express Ed. and I keep getting a LNK2001
error:unresolved external symbol "public: virtual void __thiscall
Circle::draw(void)const " (?draw@Circle@@UBEXXZ)
when building the following code:
class Coord {
private:
int x, y;
public:
Coord (int i1,... more >>
C/C++ syntax
Posted by Al_C at 2/28/2006 9:10:24 PM
OK, my K&R is about 10 years old now, I'm tring to understand the following:
typedef struct
{
union
{
OPTICAL_REPORT optical;
UINT8 battery_level;
} shared;
UINT8 combi;
} AL_Struct;
I;m ok with the union piece, it's either one or the oth... more >>
VS2005 DialogResult
Posted by rk at 2/28/2006 6:59:43 PM
According to the docs, I would expect to check the result of an
OpenFileDialog in a VS 2005 CLR Windows Forms application this way:
if (openFileDialog1->ShowDialog()==
DialogResult::OK)
However, this does not work, and I have to use:
if (openFileDialog1->ShowDialog()==
Sy... more >>
Using text boxes - Managed C++ newbie.
Posted by all2neat at 2/28/2006 5:39:58 PM
Hello,
I'm looking to teach myself managed C++. I'm trying to make a simple
application. How do I import the number from a text box into a variable
of data type long.
in vb i would do something like
dim var as long
var = textbox.text
and it would work. Now when i do in C++
l... more >>
VB.Net Compile Error
Posted by BillyBob at 2/28/2006 12:55:22 PM
I am new to vb.net. I converted VB6 project over to .net and I am receiving
this error error when I try to compile. The ADODB is reference list.
Reference required to assembly 'ADODB' containing the type
'ADODB.CursorLocationEnum'. Add one to your project.... more >>
Files Disappear When Changing Filter in OpenFileDialog
Posted by marcus.kwok NO[at]SPAM gmail.com at 2/28/2006 11:41:39 AM
I am having a weird problem and I have can't figure out why it is
happening. I create an OpenFileDialog and set a filename filter. When
the dialog first opens, the filter works correctly, and only the files
I want to see appear in the file list box. When I change the filter to
one of the othe... more >>
mousewheel event in VC++.NET
Posted by tlemcenvisit at 2/28/2006 8:11:26 AM
Hi,
I program a windows form application with VC++.NET, I wish to program an
event which occurs when the user uses the mouse wheel in a pictureBox
control. Which event should I use? And how can I program that?
Thanks in advance... more >>
Truncated Name warning (C4503) in a file specified in the VC 8 directory!
Posted by csharpdevp NO[at]SPAM yahoo.ca at 2/28/2006 7:56:38 AM
I tried building a c++ project in VS 2005, and about 300 warnings, all
of the following nature:
warning C4503: 'std::_Tree<_Traits>::_Min' : decorated name length
exceeded, name was truncated
File: C:\Program Files\Microsoft Visual Studio 8\VC\include\vector
Line: 47
I haven't studied th... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
convert char * (argv[]) to wstring and to LPCWSTR
Posted by ka1cqd at 2/28/2006 7:55:27 AM
I have been looking all over the place for a method to take command line
arguments and convert them to a string or wstring so i can process the data
and then covert the resulting strings to LPCWSTRs. I have tryed several
methods and none work. They include:
the convert utilities A2W but tha... more >>
Get Device Notification Event in Windows Nt Services
Posted by poojapatel22 at 2/28/2006 7:35:52 AM
hi all,
i had created a Windows NT service in VC 6.0 and i want to develop
sasme thing in VC++.Net as per my Requirement. In VC 6.0 we get the
Notification Like SERVICE_CONTROL_DEVICEEVENT by Registering through
"RegisterDeviceNotification" and for that we r using
RegisterServiceCtrlHandlerEx... more >>
msvc 8 bug: compiler is out of heap space
Posted by syntheticpp NO[at]SPAM yahoo.com at 2/28/2006 6:22:01 AM
Here a compiler bug of msvc 8 (14.00.50727.42):
fatal error C1060: compiler is out of heap space
Without the virtual inheritance it compiles fine.
GCC has no problems.
Code (tested with Loki 0.1.3):
#include <loki/AbstractFactory.h>
struct Enemy {};
struct Soldier : Enemy {};
s... more >>
equivalent of MouseButtons.Left in VC++.NET
Posted by tlemcenvisit at 2/28/2006 6:08:30 AM
Hello,
Please, what is the equivalent code of
if(e.Button == MouseButtons.Left)
in VC++.NET
Thanks in advance... more >>
Memeory 3G problems ?
Posted by jht at 2/28/2006 2:52:32 AM
I Have a workstation with AMD64 CPU’s and 6 Giga Byte RAM ,OS Windows XP 64.
I have 2 problems with it:
1.I want my .NET application(VS.NET 2003 VC++7.0) to use more then 3 GByte of
memory,how to do? VirtualAlloc can do it?
2.I use VS .NET 2003,it can not use more than 3GByte of memory,so I wa... more >>
Change project type in VC6
Posted by Ubergeek at 2/28/2006 12:00:00 AM
I have a project (Win32 application) that I want to change to a console
application. Does anyone know what to edit in which file, to implement
the change?
... more >>
managed type_id
Posted by Boni at 2/27/2006 11:41:55 PM
Dear all,
what is a correct syntax for typeid inC++ CLI.
Thanks.
Boni
void test( Object ^Value_){
if (typeid(Value)==typed (int)) // fails
if (Value->GetType()=System::Int32::GetType())//fails
}
... more >>
How to Open a Video Capture Window?
Posted by bern11 at 2/27/2006 10:25:56 PM
I know how to open a video capture window in the Windows API, how
do you do it in dot-net? Is it encapsulated in one of the name-spaces?... more >>
Managed for all New Apps?
Posted by Greg at 2/27/2006 7:41:27 PM
For all new desktop apps is managed/CLR recommended? I.e. Native MFC/Win32
not recommended in general for new desktop apps? Speaking in general, not
referring to exceptions (e.g. drivers)
--
Greg McPherran
www.McPherran.com... more >>
How to get file header information
Posted by HR at 2/27/2006 1:53:28 PM
I'm looking for a way to programmtically identify if an executable image is
32 or 64 bit. I can do this from a DOS prompt using "dumpbin /headers
filex.exe | find /I machine". I need to what dumpbin does to get the header
of a file. What C call do I make to do that? Alternatively, if I cou... more >>
VC++ 2005 Books
Posted by Asfar at 2/27/2006 1:36:38 PM
Hi,
I am just starting of VC++ .Net 2005.
Can someone suggest of any good books or any good websites for beginners.
Thanks,
-Asfar
... more >>
Debug/release libs
Posted by Boni at 2/27/2006 12:57:20 AM
Dear all,
I have following problem. I created a static libruary (mylib.lib).
I compiled it with Multithreaded DLL runtime in release mode. Now I want to
give out this library. But users who use it should be able to debug their
programs (i.e. compile their programs in debug mode Multithrea... more >>
Template class as friend
Posted by Boni at 2/26/2006 9:12:17 PM
Dear all,
ist it possible to have a template class or func as friend of other class:
Folowing returns syntax errors
template< typename T> class test{};
template< typename T> int func (Ta);
class A{
friend class test;
friend int func (???);
}
... more >>
How can I manipulate text using managed C++
Posted by Allen Maki at 2/26/2006 5:49:41 PM
I am using multiple arrays to make tables of rows and columns.
When using C++ I was able to manipulate texts by using
cout << setw(3) << .... using directives iomanip.h and iostream.h.
Now, when using managed C++, How can we do the same manipulation by with
Console::Write() and... more >>
Definition of WINVER
Posted by Felix at 2/26/2006 4:03:44 PM
Hello,
Using someting like #define WINVER 0x0500 in a header file works
perfect, i.e. the preprocessor sees the definition. But I would like to set
WINVER in the IDE (Properties -> C/C++ -> Preprocessor -> Preprocessor
Definitions).
Doing this the symbol seems not to get defined and the prepr... more >>
Bug: include <atlbase.h> in wizard generated Windows Form App
Posted by kenc at 2/26/2006 6:45:26 AM
Please help with this bug, probably due to CRT not starting up.
To recreate:
In VS2005 create a new C++ "Windows Form Application"
Add the line #include <atlbase.h> in stdafx.h (or anywhere else)
I get the following error:
---------------------------
Microsoft Visual C++ Debug Library
---... more >>
How to implement IEnumerator<T> in C++/CLI
Posted by midnight madness at 2/25/2006 11:09:26 PM
I tried but failed to implement a template class that support IEnumerator<T>
interface using C++/CLI in VS 2005 Professional version. I could not figure
out the proper syntax to implement the property "Current". The challange is
that I need to implement two versions of the property: one of typ... more >>
Help with Invocation of C Method
Posted by Tyler at 2/25/2006 3:13:00 PM
Can someone help by explaining why the following class will not compile
(VS2005), and what can be done to pass the function pointer to the "C"
method?
When I compile the following program, I get "error C2664: 'CMethod' : cannot
convert parameter 1 from 'Test::DoItFn ^' to 'void (__cdecl *)(... more >>
How to cause a release build to minimize 'debug' code?
Posted by Egbert Nierop (MVP for IIS) at 2/25/2006 12:03:34 AM
Hi,
I have had AtlTrace statements, but for file logging and debugging purposes,
I wrote something similar.
But when I release the code, the compiler does not 'ignore' the statements
just as it does with TRACE or ATLTRACE etc statements.
Is there a trick to get this behaviour?
Thanks... more >>
Generate fixed-length string containing random digit.
Posted by Tran Hong Quang at 2/24/2006 11:22:26 PM
Hi,
I am new to C. How to generate an fixed-length string containing an random
digits? for example string of 5 characters, the value can be 03234 or 23423
or 02343
Thanks
Tran Hong Quang
... more >>
LNK2005 from a C++/CLI dll linking against a non-CLR C++ static library
Posted by Charles Nicholson at 2/24/2006 10:36:30 PM
Hello all-
I have some static C++ libraries that I wrote in VS2003 but which
upgraded fine when i went to VS2005 Pro. In them i overload the global
versions of operators new, new[], delete, and delete[]. I also use the
STL and parts of boost (shared_ptr<> and weak_ptr<>) pretty heavily.... more >>
Help with simple if statemant
Posted by cnickl at 2/24/2006 9:20:28 PM
VS 2005 / C++ __gc program / Converted from VS2003
i have a simple statemant in my program:
if(this->txt_MediaDir->Text != "")
txt_MediaDir is a standart singe line textbox. For some reason in my code
this statemant ALWAYS evaluates to "True". Does anyone have any experance or
idea what... more >>
Help with Threading
Posted by cnickl at 2/24/2006 7:22:26 PM
VS 2005 / C++ / __gc program (converted from VS 2003)
i have this code in my program:
int found;
String *temp;
this->ofdOpen->ShowDialog();
the last line produces the folloing unhandleld exeption:
An unhandled exception of type 'System.Threading.ThreadStateException'
occurred in Sy... more >>
How can I convert char to int (Int32) in multidimensional array?
Posted by Allen Maki at 2/24/2006 2:47:24 AM
Hi Everybody,
I am new to VC.NET and I need your help.
I would like the array to print characters as '.'s (dots) instead of 0s as
in (see below in front of //------>>>>>.
I tried to use casting like this:
multArray2[m,n] = int ('.');
If these are confusing. My question ... more >>
MC++ and /MD
Posted by gauss at 2/24/2006 12:00:00 AM
Hi,
I am using VS2003.NET. When /clr option is activated, /MT(d) is
automatically chosen (just as said in the doc). Can I changed that to
/MD(d)? Knowing that in VS2005 /MD is chosen by default. And not forgetting
the non-deterministic Mixed DLL problem under VS2003.Net
The situation is ... more >>
Combine Managed and Unmanaged Code
Posted by Ulrich Sprick at 2/23/2006 6:53:21 PM
Hi,
I have to write a managed C++ wrapper around an existing, unmanaged C++
class. First tests suggested it should work, but after adding the complete
unmanaged code, I get the following linker errors:
LINK : error LNK2020: unresolved token (0A00001A) _CxxThrowException
LINK : error LNK20... more >>
screen pixel color
Posted by tlemcenvisit at 2/23/2006 3:29:27 PM
hi,
I'd like to have the color of the screen's pixel which I point with the
mouse cursor
Please, help me
Thanks in advance... more >>
My website : Opinions please.
Posted by John Swan at 2/23/2006 12:13:32 PM
Please, I have just created this site and am wondering what your opinion is
from both professionals and amatures or the curious alike.
Any opinions?
www.integrated-dev-sol.co.uk
Remove 123 from email address to reply.
Anti spam and virus measure.
... more >>
Instance classes at runtime
Posted by Ernesto Díaz at 2/23/2006 11:34:32 AM
Hi
I need to instance a class at runtime, at runtime a can get the name in a
string, i would like to know if its possible to instance the class at
runtime with the name in a string.
Thanks for your assistance.
Ernesto Díaz
... more >>
How do you resolve "standard" DLLs?
Posted by Jeff Lynn at 2/23/2006 7:05:27 AM
Help!
I recently upgraded my VS V6 to VS 2005 and was unable to build projects
that were perfectly ok under VS V6. Where VS 2005 fails was in the linker
resolving external DLLs, which are Open Source DLLs like "log4Cxx" and
"Xerces C++" DLL libraries.
VS 2005 converted my projects witho... more >>
[Serializable] and generic inheritance
Posted by Herby at 2/23/2006 6:53:44 AM
I have a class like the following:
using namespace System::Collections::Generics;
[Serializable]
public ref class StringMap : public Dictionary<String^, String^>
{
public:
};
But when deserializing, the framework throws an exception that no
default constructor could be found for cla... more >>
a general question about C++.net
Posted by www.brook NO[at]SPAM gmail.com at 2/22/2006 10:29:38 PM
I have a lot of Visual c++ code, I am wondering how difficult it is to
use them in c++.net,
I guess it is a lot of work to do the conversion.
... more >>
VS2005 Error 2022
Posted by Rick at 2/22/2006 5:27:51 PM
Error 42 error LNK2022: metadata operation failed (8013118D) : Inconsistent
layout information in duplicated types (mvl_net_info): (0x02000097).
MVL_SERV.obj
Hi guys, im migrating from VC 6.0 to VS2005, my app actually works under
vs2005 but just as native code (no CLR support). I'm trying ... more >>
Disabling Intellisense w/ VC 2005
Posted by RossettoeCioccolato at 2/22/2006 4:33:51 PM
How do I disable Intellisense in VC2005?
Regards,
George.
... more >>
What is the convention for Command Prompt window arguments
Posted by academic at 2/22/2006 12:11:46 PM
What is the convention for Command Window arguments?
If I write a program called QQQ that takes one argument should I expect a
user to type:
QQQ arg
QQQ -arg
QQQ /arg
or what?
That is, what is the natural thing for Windows users to expect a program to
looks for?
Thanks
... more >>
Header differerences between console app and DLL app with #import
Posted by dennishijk NO[at]SPAM cox.net at 2/22/2006 9:41:40 AM
I'm having trouble porting simple MS sample COM code from a console app
to the actual DLL app for my application. The code is pasted in from a
MS sample which was a console app.
The code compiles and executes as desired from a console app.
>From a managed DLL app, after adding additional lib... more >>
Templates Need Explicit Copy Constructor?
Posted by Greg at 2/22/2006 7:51:29 AM
Referring to Managed: why do templates require an explicit copy constructor
to be defined in order to use gcnew whereas simply declaring an object as a
local (still uses managed heap of course) does not require the template to
have a default constructor defined?
--
Greg McPherran
www.McP... more >>
Get the length of data a pointer is pointing to
Posted by Tran Hong Quang at 2/22/2006 12:42:27 AM
Hi,
I have code like this:
unsigned char *buf
*buf=1234567;
How I detect the the size of data buf is pointing to? (In this case is 7)
Thanks
Tran Hong Quang... more >>
How to change sound card to a A/D card?
Posted by larry at 2/21/2006 11:27:45 AM
Hi, my friends,
My boss asked me to use sound card to do analog to digital conversion
for my application. I know when we record sound, sound card changes
anolog signal to digital file. I have no idea where should I start? Do I
need to write a driver for sound card? Is there any tool from Visua... more >>
pin_ptr vs malloc for unmanaged array
Posted by _DS at 2/21/2006 7:33:42 AM
My managed code needs to shuttle an unmanaged buffer between a couple
unmanaged functions. I know this could be done via pin_ptr, and I
understand the implications re managed heap fragmentation (I'll set it
up at the start of the program and leave it).
I believe that this could also be done... more >>
General object wrapper
Posted by Ole Nielsby at 2/21/2006 12:35:48 AM
I need to wrap managed objects in unmanaged objects in a
general manner, i.e. I need a C++ COM style object that
will wrap any managed object.
I expected (optimistically) to be able to declare my class
as something like:
class GeneralObjectWrapper : public IUnknown
{
public:
General... more >>
Explain the code
Posted by Tran Hong Quang at 2/20/2006 3:59:18 PM
Hi,
I have a look on zlib source code and see declarations like this:
void test_compress OF((Byte *compr, uLong comprLen,
Byte *uncompr, uLong uncomprLen));
What is OF ?
Thanks
Tran Hong Quang... more >>
|