Psst! Did you know DevelopmentNow is a mobile web site design agency?

Contact us for help mobilizing your site, or to sign up for our beta Mobile Web SDK!


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 > september 2005

Filter by week: 1 2 3 4 5

Unmanaged DLL calling back C++ Managed application function ... Ho
Posted by H.B. at 9/30/2005 9:37:15 AM
Hi, I need to make a function that can display data on my Managed C++ app and be called by an unmanaged C++ DLL. Something like : void Form1::Form1_Load(System::Object * sender, System::EventArgs * e) { MyDLLInit(MyAppDisplayFunction); } void Form1::MyAppDisplayFunction() { ...more >>


opengl with visual studio express
Posted by iredshift NO[at]SPAM myway.com at 9/30/2005 7:51:13 AM
Hello, I am trying to use visual c++ express to write opengl programs for a class because I don't have the full visual studio program. However, when I downloaded and installed visual c++ express beta2, the include files in "C:\Program Files\Microsoft Visual Studio 8\VC\include" do not includ...more >>

Convert MFC 6.0 static libraries to managed application
Posted by Dani Peer at 9/30/2005 12:27:16 AM
Hi, We have few MFC 6.0 applications that are using many static libraries that are basically our infrastructure. Now we want to develop in C#, and we don't want to redesign all the infrastructure, that basically the libs are also using dependencies between them. From where to start ? and sugg...more >>

__FILE__ macro
Posted by lauch2 at 9/29/2005 8:24:03 PM
VC7.1 changes the __FILE__. In vc6, the __FILE__ returns the [full path name of the file]. However, in vc7.1, the __FILE__ just returns the [.\file name]. It looks like vc7.1 changes a lot of things which makes it quite difficult to migrate vc6 code to vc7.1. I am a little bit disappointed ...more >>

Removing the title bar
Posted by Eitan at 9/29/2005 7:33:02 PM
Hello, I am developing an SDI application, based CFormView. I would like to prevent the user from moving the window around. How do I do that? Eitan...more >>

CRecordset not writing record nor giving errors on some XP Build 5.1 SP2
Posted by robdob2003 NO[at]SPAM yahoo.com at 9/29/2005 12:15:32 PM
Hi, I have a VC7++ VS2003 program that uses CRecordSet to write one record to a SQLAnywhere database via ODBC, a Code Sniplet is contained below, on most machine running the same OS and Build it works flawlessly, however on this one XP Build 5.1 SP@ machine it never ends up writing the recor...more >>

Mixed managed and unmanaged code - How to do it?
Posted by Thorsten at 9/29/2005 11:49:16 AM
HI I'm a C# developer and unfortunately I have to write now some code in managed and unmanaged C++. In this area I'm Newbie and therefore please forgive me if this is a really simple question. 1) I have two classes defined in two header files, it is possible to have a member ...more >>

How to use char[] or char* strings with ListBox ... Add()
Posted by H.B. at 9/29/2005 10:49:01 AM
Hi, How can I easily use char strings to display text in listbox. I need to do something like: char MyText[] = "The text"; MyListBox->Items->Add(MyText); Thanks, Hugo...more >>



call managed/unmanaged classes from unmanaged code
Posted by bonk at 9/29/2005 9:43:49 AM
Hello, I am trying to create a c++ dll or lib (not COM) that contains a little bit of managed code and a lot of unmanged code using c++/CLI. Basically some classes rely on managed bits internally. But nothing of that managed stuff will be exposed to the outside. The user of that dll is su...more >>

C++/C# interop causes OleInitialize (STA) to fail?
Posted by Bill Cumming at 9/29/2005 8:26:02 AM
Is there something about C++ / C# interop that initializes the threading model to MTA so that OleInitialize will fail? I have a mostly C++ app that calls a single C# class DLL. Only one source file in the C++ app is compiled as managed (with /clr) – the single file in which only one of th...more >>

callback to managed code from unmanaged code
Posted by bill at 9/29/2005 7:35:47 AM
All, How can I supply a C++ function callback pointer to an unmanaged DLL and have it call back into my managed code? TIA Bill ...more >>

identifier not found: CreateProcessWithLogonW
Posted by chris at 9/28/2005 7:36:16 PM
Hi! I'm trying to start a process with different credentials. But I cannot even compile my code as the compiler (VC++.NET) says "error C3861: 'CreateProcessWithLogonW': identifier not found, even with argument-dependent lookup". I have included the following headers etc, which I belive s...more >>

Any body give me a hand on automate my build process
Posted by Mary at 9/28/2005 6:31:07 PM
Hi all; I have a client/server application that are built in VC .NET. The source codes are versioned in Perforce. I need automate the process to: Setup environment variable, Check out latest changes, build Client/Server projects, copy files to desired location, and so on. Anybody can give...more >>

Typedef in Managed C++
Posted by Shane Bush at 9/28/2005 3:08:35 PM
I'm trying to expose a typedef from an assembly in a managed C++ code and cannot seem to make it work. See following code below: namespace MyTypedef { public __gc class MyClass { public: bool b() {return true;} }; typedef MyClass NewNa...more >>

repeat.
Posted by Dan at 9/28/2005 1:30:03 PM
sorry, could someone read my query regarding borderless windows - about 6-ish posts down. i didn't originally mention i was using vc v6. thanks....more >>

Overloaded unary negation operator
Posted by Heloise at 9/28/2005 11:22:25 AM
Hi all, I'm trying to write an overloaded operator for unary negation e.g., MyClass a(5); MyClass b(0); b = -a; Here is my class implementation: public ref class Angle { double radianValue; // value of the angle in radians Angle():radianValue(0.0){}; Angle(doubl...more >>

managed c++ pinned pointer cast
Posted by Tim at 9/28/2005 8:55:03 AM
I'm trying to co-erce a __gc array of Byte to a __nogc pointer to char to pass to a native function call in a bit of managed c++ code like this: Byte field __gc[] = dynamic_cast<Byte __gc[]>(record->get_Item(i)); .. .. .. Byte __pin * p = &field[0]; // << this is the proscribed way to...more >>

Call SetServiceStatus( , SERVICE_STOPPED) in ServiceMain()
Posted by lauch2 at 9/27/2005 9:21:03 PM
I am writing a service. Before exiting the ServiceMain(), I want to call SetServiceStatus(hServiceHandle, SERVICE_STOPPED) to set the service status to SERVICE_STOPPED, but the SetServiceStatus() function crash immediately. For example: ServiceMain(...) { SERVICE_STATUS MyServi...more >>

borderless windows in vc++
Posted by Dan at 9/27/2005 8:03:02 PM
i really need to create a window/dialog that just contains a bitmap and nothing else - no window frame, caption or buttons, or any sign of a grey background. so far ive only managed to get rid of system buttons and frames, but i still can't get rid of a grey border that windows insists on sho...more >>

Possible problem with iterators in STL
Posted by babak at 9/27/2005 1:46:35 AM
Hi everyone I have a problem with Iterators and Containers in STL that hopefully someone can help me with. This is what I try to do: I have an associative (map) container and I have a function where I with the help of iterators want to search through the container and remove a certain object...more >>

swap classes that need /clr out to dll
Posted by bonk at 9/27/2005 12:00:00 AM
I have a set of unmanaged c++ classes that internally need to use managed classes (WPF formerly know as "Avalon") but I do not want to compile the whole MFC project with the /clr switch. What options do I have in that case? Could I a) swap out all the classes that need to use managed classes ...more >>

C++ namespace for Excel application
Posted by bill at 9/26/2005 5:27:51 AM
All, I cannot find any examples of doing Excel automation from a VC++ .Net environment. Does anyone ay least know what the namespace should be to expose the Excel app? i.e. using namespace System::????????????????? TIA, Bill ...more >>

Bug report: static string in dllimport-ed class causes internal co
Posted by reom at 9/26/2005 3:09:03 AM
[ Microsoft Visual C++ .NET 69586-335-0000007-18332 ] Hi, I'm not sure this is the right place to report bugs in MS Visual C++ .NET 2003. I posted the same message on MSDN forums (http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=95745). In any case, the code below causes the fol...more >>

C++/CLI: Improved linkage to legacy Win32 DLLs?
Posted by _R at 9/24/2005 1:47:59 PM
I've had to write a lot of code to interface C# to older Win32 DLLs. Basically, an unmanaged C++ class talks directly to the Win32 DLL. A managed C++ class encloses the unmanaged C++ class. C# talks to the managed C++ class. Lots of work. Is this simplified in C++/CLI? Any sample code anywh...more >>

C++/CLI how to assign null?
Posted by Lenard Gunda at 9/23/2005 10:12:26 PM
Hey, How can I assign 'null' value to a handle in C++/CLI? I searched for this for some while now, finding nothing so far. In C# I could write: something = null; or if ( something == null ) ... However, C++/CLI does not understand null. NULL is not defined, and it shouldn't be. ...more >>

Including time.h header causes VC 7.1 to barf ? ...
Posted by Alfonso Morra at 9/23/2005 8:43:45 PM
Hi I'm compiling some code and need to generate some random numbers. To save time, I decided to use the srand, rand and time functions. My code worked (atleast built fine) until I added time.h, then the compiler (VC7.1) barfed up this lot: c:\Program Files\Microsoft Visual Studio .NET 20...more >>

C4239 - why here?
Posted by Goran Pusic at 9/23/2005 12:15:26 PM
Hi all! I understand the rationale behind the warning 4239 (I think :-)) (warning C4239: nonstandard extension used : 'argument' : conversion from X to Y A reference that is not to 'const' cannot be bound to a non-lvalue; assigment operator takes a reference to non-const) However, in this s...more >>

is the best way to wrap C functions with mananged C++ or C#?
Posted by teds NO[at]SPAM intex.com at 9/23/2005 11:53:24 AM
Hi, As a newbie to .Net, I am interested in wrapping a library's C functions to be accessible from .Net. These C functions take strings as input and output parameters and may reallocate strings internally if they need to be extended. It appears that there are (at least) 2 ways to wrap my C...more >>

Returning vectors from a managed dll
Posted by HealsJnr at 9/22/2005 11:29:20 PM
Hi all, Just wondering if there is any way to return a vector from a mixed mode dll? I understand that it is quite easy to pass by reference to achieve the same end, but i'd like to know if it is possible to return a vector. Cheers, ...more >>

Reference to an un-initialized variable in release build in VC6/VC
Posted by lauch2 at 9/22/2005 8:31:03 PM
Can anyone talk me is there existed a "default" value for a un-initialized int variable in a release build in VC6 and VC7.1. (I know there is a compilation warning) For Example: main(){ int a; printf("variable 'a' is un-initialized and its value is = %d\n", a); } I want to know wheth...more >>

LNK4243 with native-code DLL?
Posted by Lee F at 9/22/2005 2:09:03 PM
Hello, I am currently converting a series of ATL COM DLLs that have previously been built with VC++ 6 to VC++ .Net (7.1? using VS.Net 2003). In any case, I am encountering the linker error: """ Objects warning LNK4243: DLL containing objects compiled with /clr is not linked with /NOENTR...more >>

compilation errors
Posted by ravinderthakur NO[at]SPAM gmail.com at 9/22/2005 6:46:29 AM
class Party{ public: double averageNames(int n, int personA[], int personB[]){ vector<set<int>> personsKnown; //vector< set<int> > personsKnown; } }; int main(){ Party p; return 0; } can anybody plz explain me why the code dosn't compile on msvc6 wheere as the ...more >>

how to change the project name in msvc6
Posted by ravinderthakur NO[at]SPAM gmail.com at 9/22/2005 5:00:28 AM
hi all, i have a project in msvc6 and i want to change the name of the project from existing to some new project. how can i do the same. what entries in the .dsp file i have to change to chagne the name of the project. thanks rt ...more >>

abort thread
Posted by one2001boy NO[at]SPAM yahoo.com at 9/21/2005 9:07:33 PM
Hello, is there a function to abort the running thread (thread-a) from another thread (thread-b)? thanks....more >>

vc 7.1 compiler bug
Posted by Christian at 9/21/2005 6:01:01 AM
I'm new to this list so please forgive in case this is not the correct forum. If so, please let me know to where I can direct bug reports for vc. The following crashes using whole program optimization (i.e. invoking LTCG) under vc7.1 Professional. #include <string> #include <boost/functio...more >>

[c++/CLI] let an unmanaged class consume an event
Posted by bonk at 9/21/2005 12:00:00 AM
Hello, I have a managed type that defines an Event as one of its public members. Is it possible for an unmanaged c++ class to register to that event ? How can an unmanaged classmethod be called as a response to a raised event ? Within my unmanaged class I tried to following: void MyUn...more >>

Form Takes a Long Time to Open
Posted by M. Shorman at 9/20/2005 7:32:01 PM
Form Takes a Long Time to Open when switching from code view to design view. This bug is discussed in this article: http://support.microsoft.com/default.aspx?scid=kb;en-us;901374 I believe I am having the exact same problem. The problem is that I have to contact Microsoft Tech Support to ...more >>

non-sense assertion in VC7.1
Posted by lauch2 at 9/20/2005 6:59:02 PM
Try to compiler and run the following code in DEBUG mode, an assertion dialog will be popped. Can I ignore this assertion dialog and why does this code cause to an assertion? -- int _tmain(int argc, _TCHAR* argv[]) { char c = -3; if(isdigit(c)) { puts("Character '-3' is a digit");...more >>

UINT16 error
Posted by James Crouch at 9/20/2005 11:04:33 AM
I am trying to create a managed c++ wrapper and have run into a problem is when SetNewNetworkCallBack is run. It doesn't like that NetworkID isn't an UInt16. I get the error: CCommManager::SetNewNetworkCallBack' : cannot convert parameter 1 from 'void (unsigned short,void *)' to 'void (__...more >>

Managed C++ Dll - Where's my output?
Posted by quortex at 9/20/2005 1:29:18 AM
Hi, I have created a very small test wrapper class in Managed C++ which wraps up some very simple native code. I am using C# 2 + Visual Studio 2005 Beta 2. I have the back end C++ library without CLR which is to be wrapped that outputs fine to a static .lib as expected. Then I import the...more >>

Deletion of a COM object in VC6.0
Posted by lauch2 at 9/19/2005 8:13:03 PM
I have a project that contains a COM object running in the in-process configuration. The project was developed by VC6.0 with SP 3. The project has been put into production for long period of time and it worked just fine. Right now, I want to migrate the project to VC7.1. During the migration, ...more >>

Coding Problem, Help Needed
Posted by batista at 9/19/2005 7:18:02 AM
Hello to ALL, I'll explain my problem by pseudo code class A { int x; char y; string z; } class B { GetVariable(int i) { A a = new A(); //Now I want to return the ith varaible //of class A } } class C { GetVar() { B b = new...more >>

Print ( char )10?
Posted by jceddy at 9/19/2005 4:36:03 AM
Hey, I'm trying to write a file with unix-style newlines (ASCII character 10) from a c++ program on Windows...it seems that the most straightforward way to do that is just to print ( char )10, but it seems that when I try to print that to the file, the program still prints the full CR+LF Windo...more >>

problem with minitialize() and mterminate()
Posted by scottrm at 9/19/2005 1:11:02 AM
I have a mix-mode Managed C++ dll which wraps some C++ static library and exposes functions to C# IRTDServer. So the scenario is like this: C++ Static library (with static member variables in classes) | | v Managed C++ dll | ...more >>

Another newbie question...
Posted by Victor at 9/17/2005 12:13:54 PM
Hi everybody! I am just trying to switch from C++ 6 to the C++.NET and face an immediate problem I cannot tackle. Please help! I created a new VC++ standard SDI project in the Visual Studio .NET 2003. Now I want to have a bitmap on the background of the mainframe window. So, I added to the ...more >>

wat is .net framework?
Posted by mujeebrm at 9/17/2005 9:49:46 AM
hello everyone, wat is .net framework from MS? wat is supposed to do programming world? any easy & meaningful explanation? thanx, _MrM_ ...more >>

Best book for learning MFC/VC 7.1 for developing rich GUI apps ?
Posted by Alfonso Morra at 9/17/2005 1:45:18 AM
Hi, I am a C/C++ developer of quite a few yesrs, although I am relatively new to Windows (Unix background). I am about to begin work on a project that would require me to develop several GUI rich frontend applications. I would like to hear from developers ou there if there is a book they ...more >>

Console Project Icon
Posted by Steve N. at 9/16/2005 3:59:44 PM
Hi, How do I set the icon of the .exe file created by a Win32 Console project? Thanks....more >>

Animated GIFS
Posted by mike east at 9/16/2005 1:37:13 PM
I have Visual C++.net V2003. I would like to load in an animated GIF file and display it (animate it). How would I do that in C++, is there a MFC that displays animated GIFS ?? Thanks for the help. Mike...more >>

vc++.net, Server Application?
Posted by batista at 9/16/2005 6:05:10 AM
Hello to all, I want to know that wat's the future of vc++.net? I mean is it going to remain there or not, and if does then wud there be big changes to it or they'll stick with the current one? I want to know this because there is client/server application that i want to build. Now the serv...more >>


DevelopmentNow Blog