Archived Months
June 2003
July 2003
August 2003
September 2003
October 2003
November 2003
December 2003
January 2004
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
all groups > visual c > december 2003

Filter by week: 1 2 3 4 5

Have you faced error while loading BMP from disk???
Posted by Jigar Mehta at 12/31/2003 7:40:07 PM
Hye friends!! Jigar Mehta from India. Currently I am loading one BMP file around 2.5 MB from the disk from my VC program and show it to its DC... But while CBitmap object tries to load it by LoadBitmap("c:\\my.bmp"); it gives error... I get error code of 1814.. I have also tried same program...more >>


DotNet UI with C++ backend - best way forward?
Posted by Takeshi at 12/31/2003 6:37:04 PM
Hi All, I am impressed with the aesthetic (UI) appeal of DotNet, but not by much else, like it's new fangled languages etc... I have a legacy C++ 3tier application, which uses C++ DLLs. I would like to use the DotNet frontend (e.g. the PL provided by infragistics). However, I don't want t...more >>

IJW - How exactly?
Posted by Austin Ehlers at 12/31/2003 5:45:05 PM
(I apologize if this is a fairly trivial question, but I mostly use C#, not MC++.) Problem: I've got an unmanaged DLL (and the LIB file), that exports a bunch of static functions. I'd like to be able to wrap this with a __gc class, and then access it from C#. All of the examples I've seen ...more >>

Help needed installing GinaStub example.
Posted by gregory_may at 12/31/2003 4:44:56 PM
I am dying trying to get the GinaStub example to work at: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcsample98/html/vcsmpginastubsample.asp Any help is greatly appreciated and much thanks given in advance. I am very new to the Visual C++ environment, so I am hoping is ...more >>

How to compress BMP image programatically..
Posted by Jigar Mehta at 12/31/2003 2:57:41 PM
Hye Friends!!, Happy New Year!! I am Jigar Mehta from India. Currently I am working on a project in which I need to compress some images on the harddisk... I want to make an engine that reads whole BMP image and then compress it.. The target location can be of any type.. BMP, TIFF, JPG or...more >>

When can WaitForSingleObject return WAIT_FAILED?
Posted by Sean Kelly at 12/31/2003 1:57:57 PM
When both waiting on an event and a simple unnamed mutex, I'm wondering when WaitForSingleObject might return WAIT_FAILED. These are both execution paths I'd very much like to avoid exceptional behavior but I haven't found much documentation on the specifics. Can anyone offer advice? Sean...more >>

STL template symbol "already defined in" errors ...
Posted by Gianni Mariani at 12/31/2003 1:51:03 PM
I'm getting "multiply defined" errors on STL symbols. Isn't this a linker error ? By definition, doesn't the compiler/linker need to guarentee the "one definition rule". Linking... msvcprtd.lib(MSVCP71D.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char...more >>

.Net Sockets
Posted by yawnb NO[at]SPAM triad.rr-dot-com.no-spam.invalid at 12/31/2003 10:43:24 AM
I am using VC++ .Net 2003 and have a question about putting a byte array returned from a socket receivefrom method in to a struct. Here is what I have: Socket* s = 0; Byte RecvBytes[] = new Byte[1500]; try { IPEndPoint* endPoint = new IPEndPoint(IPAddress::Any, 1646); s = new Socke...more >>



Very very large number
Posted by Joshco at 12/31/2003 9:51:24 AM
Does anybody know how to force visual to use a number this is around 1000 digits long and 64 bit floating point. I am a beginner in programing....more >>

setting a CListBox to multiple selection dynamically
Posted by Brent Baker at 12/30/2003 8:42:24 PM
Is there a way to change a CListBox from single selection to multiple selection, or back again, from inside the program after the CListBox has been created? Our application has several ListBoxes. I know its easy to use the properties dialog control it set the control to be single, or multip...more >>

Mixed-Mode library assembly bug
Posted by Steve Terepin at 12/30/2003 2:39:26 PM
I've found some rather worrying articles (Mixed Mode Library Assembly bug, Richard Grimes, Windows Developer Network Sept 2003 ; and Knowledge Base Article 814472 ) that point out the need to use the /noentry switch and an explicit initialisation procedure, to be able to safely use Managed C++ a...more >>

VC++ Net 2002 - 2003 upgrade
Posted by Tim at 12/30/2003 2:07:52 PM
Is there a way to upgrade from Visual C++ Net 2002 to Visual C++ Net 2003? The 2002 version does not provide a Windows Forms Designer. I can't find any upgrade package on Microsoft's website. Thanks, Tim...more >>

How can I find data in a wave file ... ? ... ?
Posted by DaniloAlmeida at 12/30/2003 11:59:57 AM
Hi everyone, How are you ? Happy new year for all !!! Well I want to know how can I find some data like a tone in a recorded wave file in WindowsPCM format in 11kHz - 8bits. This file(s) will contain some conversations like phone conversations and some tones in midlle so I need to find...more >>

MC++ problem with virtual function overrides and collection editor
Posted by Edward Diener at 12/30/2003 9:52:56 AM
In C++ an overridden virtual function in a derived class must have the exact same signature of the function which is overridden in the base class, except for the return type which may return a pointer or reference to a derived type of the base class's return type. In .NET the overridden virtua...more >>

Can I create a service, make it run automatically, and record windows login password?
Posted by Larry at 12/29/2003 3:54:46 PM
Hi, my friends, As I know, service and start automatically even before user login. So If it's possible to create a service, make it running when system start , and record windows login password when a user login. Best reards, Larry ...more >>

Server Ports
Posted by Filip at 12/29/2003 10:04:49 AM
Hello, I am wondering if VC.NET has any built in support Server appliactions. I need a package to open a port, connect to a port, etc, but I'm not sure it that is delivered built in, or if I need to purchase an outside package. If it's built in, any directional help as in a sampl...more >>

Threading in Visual C++.NET
Posted by Filip at 12/29/2003 10:03:18 AM
Hi, I was wondering if anyone can assist me in initating some threading appliaction in VC.NET. I am trying to do a server, and will need to spawn multiple ports to listen on, but I can seem to find any decent sample on code that will allow threading. Any assistance will be great...more >>

why when i run the project my pc go in crash?
Posted by Tommy at 12/29/2003 5:18:52 AM
and it block itself? I must reset the pc to unblock!...more >>

HELP: Controlling Console Output
Posted by cplusplusstudent at 12/28/2003 7:41:13 PM
Hello I am a new C++ programmer and am working with the Visual C++ studio. I am attempting to create a simple console application for myself but I fin that neither of the introductory C++ books I own tell me how to clear the console screen or change the font color. Is there some way to do this...more >>

DateTimePicker Format changes from Time to Short Date
Posted by Edward Mitchell at 12/27/2003 9:35:10 PM
I have a number of DateTimePicker controls, some set to dates, some set to a format of Time. The controls are all embedded in dialogs. I created the controls by dragging the DateTime picker from the Toolbox and then set the Format property appropriately. I have noticed that sometimes the Time ...more >>

limits.h question
Posted by blaat at 12/27/2003 9:32:28 PM
Hey, I'm learning about the limits header, and I don't understand one snippit of code. If I code: #include <limits.h> #include <stdio.h> int main() { printf("Smallest signed long long: %lld\n", LLONG_MIN); return 0; } I get the output: Smallest signed long long: 0 Why is this...more >>

Posts and MVP Support on this NG
Posted by Edward Diener at 12/27/2003 10:16:50 AM
There are very few posts on this NG, and very little MS MVP support. Is there a better NG on the Microsoft news server to post questions about programming with Managed C++ ? I know I can't be the only C++ programmer doing .NET development in that language. If I look at the C# NG, it has at least...more >>

Adding delegates via +=
Posted by Edward Diener at 12/27/2003 9:11:34 AM
Does the += notation for adding delegates to a delegate pointer object work even if the delegate pointer is 0 ? As an example: __gc class SomeObjectClass { public: void SomeObjectMethod() { } }; SomeObjectClass * someObjectPointer(new SomeObjectClass); __delegate void MyDelegate(); MyDelegate...more >>

Which mechanism is better?
Posted by Mihajlo Cvetanovic at 12/26/2003 6:34:38 PM
Hi, I have to create a dll with communication functionality. The first idea was to implement only functions for sending, and user to implement (and pass me a pointer to) function for receiving. Dll would call those receiving events in internally created thread. The other idea is mechani...more >>

my first trying with c++.net please help me
Posted by Rem at 12/26/2003 1:58:16 PM
I'm trying to understand how is it possible implement function inside a .h file and not in a .cpp leaving the .h only for the prototype. For example: private: ...... ........ ........ private: System::Void NewClick(System::Object * sender, System::EventArgs * e) { // } ...more >>

Specify System::Windows::Forms::KeyEventArgs gets error
Posted by Edward Diener at 12/26/2003 12:30:47 PM
If I try to reference System::Windows::Forms::KeyEventArgs in a header file I get the error: MyHeader.h(236) : error C2039: 'Windows' : is not a member of 'System' Any ideas why this is happening ? Can I not reference a name using its full path in MC++ or is this just a bug in the compiler ?...more >>

Bounds Checker no longer works
Posted by Tom Parke at 12/26/2003 7:46:34 AM
I am looking for a good bounds checker/memory leak check utility as Numega's Bounds Checker v6.01 is not working with VC.net. Any suggestions? Tom ...more >>

Visual C++ 2003 optimization bug
Posted by Andrew Burlak at 12/25/2003 7:27:00 PM
This piece of code prints "Hello, World!" only once if optimizations are enabled. It is expected to print "Hello, World!" 2^32 times. Optimizations: /O2 Compiler version: 13.10.3077 (VS.Net 2003) = = = = = = = = = #include <stdio.h> void main(void) { unsigned i = 0; do ...more >>

bit variable
Posted by Avi Laviad at 12/25/2003 2:59:48 PM
hi, sorry for the dumb question but how do i code a bit variable in c? i mean - shoudlnt the synax need to be: bit j; j = 1; correct me if im wrong (and i suppose i am). Avi....more >>

template question again
Posted by booker at 12/25/2003 2:26:49 PM
The following codes can't pass compilation in vc7.1, error occured at the possition where Foo is called. ************************************************************8 template<typename type> class base1 { template<typename type> class base2; private: typedef base2<type> base2type; publi...more >>

How to get form handle
Posted by GAEL at 12/24/2003 7:57:36 PM
I would like to know a function that returns the handle of a form. The type has to be HWND. I know that there is a funtion (this.Handle) that gives me a handle of type IntPtr but the type I need is HWND. How can I do?...more >>

Event method accessibility
Posted by Edward Diener at 12/24/2003 4:16:39 PM
According to the CLS specification, the accessibility of the methods for adding, removing, and raising an event must be identical. There appear to be a few problems with this: 1) According to the Managed C++ specifications, if one declares a public event without any attempt to provide one's ow...more >>

Call to webservice doesn't wait to return
Posted by shailesh at 12/24/2003 3:40:47 PM
Hi All, I have created a ASP.NET web service with a web method. This method retrives data from SQL Server and returns it as an XML string. Now I have added a web reference to this web service in a VC++ 7.1 (unmanaged) project. I call the web method in my VC++ code. The problem I am facing i...more >>

possible to connect OdbcDataAdapter to 3rd party driver with VC++.NET Standard??
Posted by Dave at 12/24/2003 1:15:18 PM
I am trying to learn .NET with the standard edition of VC++.NET 2003 Standard edition. When I use the wizard in the toolbox to connect to a non-microsoft ODBC data source, I get the error message "It is only possible to connect to SQL Server Desktop Engine databases and Microsoft Access da...more >>

'$' in C identifiers?
Posted by SaGS at 12/24/2003 11:20:42 AM
Hi all, Either I'm missing something big here, or there's a problem with the C compiler in .NET 2003; and with the C compiler in Visual Studio 6 SP5 too .... Consider the following 2 lines: #define TEST_$$$ 0x05 static test_$$$[] = { TEST_$$$ }; The compiler works as ...more >>

Cannot use ExitWindowEx(...)
Posted by Liang Yitao at 12/24/2003 7:02:40 AM
Before I using this function, I've done all the prepare things. This included: GetCurrentProcess(); OpenProcessToken(...); LookupPrivilegeValue(...); AdjustTokenPrivileges(...); And the return code or the error code set by these functions indicated that they all executed suc...more >>

Return values from __events
Posted by Edward Diener at 12/24/2003 12:09:19 AM
I am gathering from the documentation that return values from __events are not illegal but are frowned upon in .NET. If this is the case, does one pass back values from an event handler via "in/out" or "out" parameters ? Or is it simply that events are just notifications and are not interested in...more >>

Writing event methods in MC++ with custom code
Posted by Edward Diener at 12/24/2003 12:00:26 AM
I understand that specifying an __event, let's call it X, actually generates add_X, remove_X, and raise_X methods in the class of the __event. If one wants to allow the adding, subtracting, and calling of an event from outside the class, and one is implementing these methods for oneself with cust...more >>

a question about types
Posted by GAEL at 12/23/2003 5:35:08 PM
I am creating an unmanaged Diretcx 9 application but I want to integrate it to my managed c++ application. Here is the problem: I dont want to use m_hWnd = CreateWindow( _T("D3D Window"),m_strWindowTitle, m_dwWindowStyle, CW_USEDEFAULT, (rc.right-rc.left), (rc.bottom-rc.top), 0,LoadMenu(...more >>

Interesting Run-Time Check Failure #2 Information
Posted by hateyourjunkmail NO[at]SPAM yahoo.com at 12/23/2003 3:52:51 PM
I got this error from my compiler with a little test class I was playing with one afternoon. It's not production code or anything, but it's small and I looked it over pretty carefully and couldn't find anything wrong. I am just playing around with winsock at a low level and I want it to be cr...more >>

Closing a Context Menu
Posted by Gustavo Franco at 12/23/2003 2:55:47 PM
Hi, Basic Question, difficult answer 1) Thread one; Open Context Menu. 2) Thread two; it needs close the Context Menu without Mouse interaction. Thread two has all the information about the Context Menu Somebody knows how to do it? Basically I need close the Conte...more >>

explanation
Posted by trinix at 12/23/2003 2:39:52 PM
I need somebody to explan to me what LINEAR SEARCH and BINARY SEARCH is. This is the subject of arrays, so It should be easy to explain. THnak you for your time....more >>

Compile and link time.
Posted by AP at 12/23/2003 11:52:25 AM
Hi, Does anyone have suggestions (maybe options etc) as to how I could improve my compile and link time in VC7.1. I'm seeing a pretty bad deterioration from VC6. BTW, I use pre-compiled headers. Thanks in advance. AP....more >>

Run time error checks
Posted by patila NO[at]SPAM grex.org at 12/23/2003 11:33:51 AM
Hi, In VC7.1 there is the compiler option to turn on run time error checks (/RTC compiler options). So if there are any uninitialized data a dialog pops up. I know it's useful but is there a way to turn this off for the session at least because it is a nuisance while debugging? It's not always...more >>

MC++ changing access in a derived class
Posted by Edward Diener at 12/23/2003 8:24:33 AM
Since a C++ using declaration isn't allowed in MC++, is there a way to specify that a property, method, event, or field's access can be changed in a derived class, ie. is protected in one class and is made public in a derived class ? ...more >>

Property/Event in Component Designer
Posted by Edward Diener at 12/23/2003 8:20:00 AM
How does one specify that a given property or event should not be shown in the Component or Windows Form Designer so that the end-user can not manipulate it at design time ? I suspect an attribute exists for doing so, but I have no idea what it is. ...more >>

Problems building COM project - VC7
Posted by ojw NO[at]SPAM iprimus.com.au at 12/22/2003 10:33:30 PM
Hi folks, I'm having trouble building a new COM project I created in VC7. The following linking errors occur: nafxcw.lib(thrdcore.obj) : error LNK2019: unresolved external symbol __endthreadex referenced in function "void __stdcall AfxEndThread(unsigned int,int)" (?AfxEndThread@@YGXIH@Z) n...more >>

File Load Exception
Posted by Andrew Moore at 12/22/2003 7:46:55 PM
Hello, I have a Managed C++ dll to contain an AVI Capture tool. This dll contains a __gc class to interface with a C# application, and a __nogc class to contain calls to the Win32 API and VFW libraries. This code works well on XP, but when I call the constructor for my __gc class from a C# ...more >>

Differences between Windows Form design in VC++ and C#
Posted by Jiang Yue Brandon at 12/22/2003 6:48:27 PM
I am very confused about the different ways of VC++ and C# for doing windows form/dialog design in Visual Studio.NET. In C#, after you drag & drop the components to the form, the underlying codes will be automatically modified to add corresponding objects. However, in VC++, in order to...more >>

using template
Posted by booker at 12/22/2003 6:11:01 PM
the following codes can pass the compilation in VC6 but not in VC7.1.. is it a bug? #include <list> template<class type> class myclass { typedef myclass<type> mytype; std::list<mytype *>::iterator myit; } ...more >>


DevelopmentNow Blog