visual-c++

Certain fields in .ini files do not get saved if the path name of the .ini is longer than 128 chars.

I am working on a program in Visual Studio 2003 C++ that saves data with .ini files. The program is already written; it's a full blown windows application that analyses patient data taken from a sleep lab (lots and lots of lines of code). The program uses .ini files to read and write patient data, such as patient name, patient id, do...

HOw to group header files in header subfolders under the general header files folder using Cmake

Hi I am building Cmake based build system. I would like to group header files in folders (VC++ can do it) under the general folder Headr Files. Similar I would like to group the corresponding .cpp files in folders under the Source Files directory. Unfortunately I could not find any instructions of how to do it. Please help. Dimitre ...

[VC/MFC]why the app window is affected by other items which move across it ?

I've made two screen shots in order to make the problem specified. The normal style: the affected style after I move some windows such as browsers across it: I wonder why this happened?And How can fix this problem?I'm working with VS2008 on Windows. Thanks in advance! ...

Network Adaptro configured with ip address or not? How to check using vc++/Windows api?

Hi Could any one share about Network Adaptor configured with ip address or not eithor using dhcp or manual. How to check using vc++/Windows api? ...

Visual C++ says "LNK1104: cannot open file 'stlport_statix.lib'"

When trying to link my C++ solution in Visual Studio 2008, I get the message "LNK1104: cannot open file 'stlport_statix.lib'". I have installed STLport, and the correct path is set in Tools->Options->Projects And Solutions->VC++ Directories->Library Files. STLport does however not provide a file called stlport_statix.lib, only stlport_s...

programmatically obtaining special folder write permission using User Access Control in Windows 7 and Vista

I need to write a shortcut in the automatic startup folder for all users. The scenario is that a user with administrator privileges, through the configuration dialog of the application, must be able to set the application to start automatically for all normal users when they log in. I get the startup folder using SHGetSpecialFolderPa...

Visual C++/CLI mutual access between two class objects?

Here is the problem: namespace Program1 { public ref class Form1 : public System::Windows::Forms::Form { public: Form1(void) {....} private: RunnableThread^ peerThread; private: System::Void loginButton_MouseDown(System::Object^ sender, System::Windows::Forms::MouseEventArgs^ e) { String^ ip = this->ipTextFi...

Why arrow keys are not getnerating WM_KEYDOWN message VC++ ??

I am created a custom window and want to handle arrow keys ... But i don't know why they don't generate wm_keydown message ?? ...

Visual C++/CLI (CLR) Null pointer

I wan't to implement the following code - the check if the pointer is null or not null. If the pointer points to object, then do sth with that object, if not - skip that code block. My code: ref class EchoClient { private: GameMatrix^ gameMatrix; public: EchoClient(void); EchoClient(GameMatrix^); void do(); }; EchoClie...

C++ - Issue dynamic commands to an active process

Hi All, I need to write a piece of code which will invoke a process and dynamically issue commands to the process. For example, I may have to run FTP and then when the process is up, I've to issue ftp commands to this process. I need to do this in C++. I don't have a single clue of where to start. ...

Why native C++ Win32 DLL does not working properly in C++/CLI managed code?

Hello, I have native C++ DLL code to call from C++/CLI functions. It's not working properly. I am copying those areas of code here which causing problems. Note: I made native C++ stub and called that native dll's functions and it worked fine as per context. Native C++ DLL: void ExecutorFactory::GetTESService(string a_strFileToProce...

Changing shortcuts in Notepad2

I'm sure many in here are familiar with it (obligatory link). However, I cannot in the newer versions get accustomed to the shortcut for delete line, and would like to change it to Ctrl-E as it was in the previous versions. I gather this will require recompiling the whole thing, but where do I change it in the code? (If it doesn't requi...

wxWidgets - How to add configurations to wx-config with VC++?

I'm using the MSYS shell to compile on Windows with Microsoft VC++ using make with my own makefile that invokes cl (VC++) using wx-config to grab the appropriate command line options (I also use the same makefile on Linux with g++). I've been doing this with a release version of wxWidgets 2.8.7 for quite a while without problems. I now ...

Why could an enum type be used without defined

I am using VC2008 as my complier, and it is surprised to me that an enum could be used without defined: void func(enum EnumType type) { } Code above could be compiled and run without a problem, could anyone explain why it works? Update: I could define an empty enum in C++, as follow: enum EnumType {}; ...

10038 socket error

Is there any solution for 10038 server error .i have done coding in c++; the server runs fine 10 to 12 hours but sudenly it gives 10038 socket error ...

how to check if ms office product is installed and version of it VC++ ?

I want to find whether ms office is installed and version of it... how can i do it ? ...

Build Succeeded, but no .lib file gets created

Hello, I inherited a substantial amount of code, including a visual studio project that is supposed to (as best as I can tell) build a .lib file. Visual studio says "... Generating Code... Creating Library... Creating browse information file...", and at the end, it says the build succeeded. In the release/debug folder, it has a bunch ...

Is there a compiler flag for Visual C++ to check for type safety for calls to printf()?

I have read there are a few flags in gcc to do catch some of the type violations for calls to printf, I haven't been able to find if there are similar ways to achieve this in Visual C++'s compiler (any version of VC++, from 2005 onward). ...

Downcasting a pointer using a function instead of giant if statement.

I have a vector with pointers of type Vehicle. Vehicle is the base class and there are many derived types like MotorCycle, Car, Plane, etc. Now, in my program there comes a point where I need the derived type while traversing the vector. Each Vehicle class has a GetType() function which returns an int which tells me what the derived type...

Draw Thick Line with Border

I am trying to draw a thick line using c++, and add a border to this line from all side. I am using moveto, lineto functions, but not sure how to track the line width to draw borders. this is require for generic line. ...