Visual C++ Language - Visual C++
Recent update: 2008-3-21

Retriving a key pressed in a different Application

436 byte By MVPUser at 2008-3-7
<Gal Beniamini@discussions.microsoft.com> wrote in messagenews:d1c96286-5525-41a4-9d28-579d9d7d3011@discussions.microsoft.com > Hello, I have a question; how is it possible to get the event of a> key pressed in a different application while my application is> running in the ...

File link Question

203 byte By help_m_with_extern_linkage at 2008-3-6
Hi There, I am trying to link a .ilk file of a c++ code to my c code. I am not sure how to do this. I'd truely appriciate if someone could tell me how to go about it. Thanks. Regards, Sahil

Unnecessary calls to copy constructor when creating std::vector

2269 byte By RichardLatham at 2008-3-5
I created a vector as std::vector<MyClass> my_vec(3); I expected that this to call the default constructor for MyClass 3 times. Instead it called the default constructor once and the copy constructor 3 time. In other words, it was creating a MyClass object and then copying it to each ...

Bypassing the Outlook Security Popups when sending mail through application

1686 byte By Sharat at 2008-3-3
HiI have developed an application in VC++ that has a certain mailing feature. The user can send multiple mails to some id using this feature by a single button click. The problem is that the Outlook Security popup appears each time a third party tool is trying to send a mail and once can ...

SSE3 Programming question

890 byte By VijayHariharan at 2008-3-1
I am trying to use the sample code in Visual Studio 2005 Beta 2 to compile SSE3 math operations, and am having problems. The first issue is that the intrinsic math functions (_mm_addsub_pd for example) are not declared in emmintrin.h. This is the only file that the MSDN help says is needed to ...

Serializing a COleDateTime object failes with VC++ 2005

1264 byte By ManfredD at 2008-2-28
I'm trying to build and run a MFC-based program with VS2005. It contains these lines of code:m_pTime = new Dat_DateTime; // Dat_DateTime is derived from COleDateTimem_pTime->m_status = COleDateTime::valid;ar >> m_pTime->m_dt; // ar is of type CArchive&When I compile this with ...

Serializing a COleDateTime object failes with VC++ 2005

1264 byte By ManfredD at 2008-2-27
I'm trying to build and run a MFC-based program with VS2005. It contains these lines of code:m_pTime = new Dat_DateTime; // Dat_DateTime is derived from COleDateTimem_pTime->m_status = COleDateTime::valid;ar >> m_pTime->m_dt; // ar is of type CArchive&When I compile this with ...

Two Dlls, Same Namespace, Cast Problem

2 byte By dotnetrob at 2008-2-26
.

.

2 byte By dotnetrob at 2008-2-25
.

Convert std::string* to BSTR*

191 byte By Karthik.T at 2008-2-24
Hello! I am using VC++ .NET to convert std::string* to BSTR*. Could any of provide a sample/pseudo code as to how this could be done! :-) Thanks a much! Karthik

error LNK2019: std

4634 byte By Fatt at 2008-2-23
In VC7 I got this link error:filesys.obj : error LNK2019: unresolved external symbol "public: bool __thiscall std::locale::_Iscloc(void)const " (?_Iscloc@locale@std@@QBE_NXZ) ,This symbol is in the function "class std::num_put<char,class std::ostreambuf_iterator<char,struct ...

Mixing ml64.exe and Win32 C++: is it possible?

1252 byte By bakerbud9 at 2008-2-22
I am currently running WinXP Pro on a dual AMD Opteron system. The development project I'm working on is a high-performance CAD/graphics program. The project is mostly Win32 C/C++, but we also have many specialized performance-critical subroutines hand written in assembler. These assembler ...

Problem when using CLI in MFC Application

468 byte By Orochi at 2008-2-22
Hello, everyone.this is the first time I came here. my problem is: I created a project with MFC Application project type. and now i want to add CLI support to this project. So I open the project properties dialog and select "Common Language Runtime support (/clr)" options, when compile, an ...

Trying to get metainfo sample application to compile

1386 byte By JasonHaley at 2008-2-21
I am currently trying to get the metainfo sample application that comes with VS 2003. The application code is located at (for a standard VS.Net install):C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Tool Developers Guide\Samples\metainfoSince I am learning VC++ and the ins and ...

Help with Extern Linkage

587 byte By help_m_with_extern_linkage at 2008-2-20
Hi Everyone,I am new to visual c/c++ and i am using visual studio. I am working on a project that compiles with C. Now, i have to use some header files which have structures, templates, etc which are written in C++. I have no idea how to link these two languages together. The command that i ...

(/Za) Option

528 byte By Nazgob at 2008-2-19
Hey, what can I do to have my code as much anci C(I have set an option to compile as C) as possible? I think /Za turns of MS extensions. Where can I find document describing those extensions? Do I have to set some more options? I code C using Visual C++ 2003 Standard and testing C++ Express ...

Next Standard

125 byte By RITZ at 2008-2-18
I am curious what is in store for inline functions for the next standard reguarding internal linkage. Anyone have some links?

operator const char*

2058 byte By cro at 2008-2-17
Why that the function c_str and operator const char* didn't return the same value in this code ?#include <iostream>using namespace std; class MyString{ char* buffer; int length; public: MyString(const char* pChaine); ~MyString(); const char* c_str() const; operator const char*() ...

error CS0229: Ambiguity between 'XX.Name' and 'YY.Name'

1412 byte By Chris.G at 2008-2-16
I tried to implement the following scenario in VC++ 2005 beta2: an object implements 2 interfaces, one defining a property get and the other defining a property set.This works perfectly well when implemented in C#. However, in C++, I get the compiler error message transcripted below.Here is the ...

Visual C++ 2005 compliance with The C++ Standard

1217 byte By DavidChristie at 2008-2-15
Despite a boat-load of documentation on Microsoft extensions to the C++ language, I have been unable to find a single page describing how VC++ 2005 differs from VC++ 2003 (7.1) with respect to the serious non-compliance issues that plagued users of VC++ 2003 (7.1). This document ...

Ok I am in dire need of some help here :/

1372 byte By Fixxer at 2008-2-15
I cant even get a hello world console app to work. I downloaded Visual C++ 2005 express beta 2, and the Platform SDK. I just chose to do a Win32 console application, chose to use the pre compiled header, and typed in the very simple code. #include "stdafx.h" int _tmain(int argc, _TCHAR* ...

A question for Gurus about an application which should run before login screen

1361 byte By Wolvorine at 2008-2-15
hi!I am developing a program VC++, which could make any application to run before login screen, and never show desktop etc....why i am making this kind of application here is the story! Well Once i went to the Game cafe where all ppls were playing Counter srike(game), i bought a ticket and then ...

.

1 byte By dotnetrob at 2008-2-15
.

_findfirst() prototype changes

977 byte By HenrikGoldman at 2008-2-15
I recently noticed a difference in the function _findfirst()From msdn we have:VC6:long _findfirst( char *filespec, struct _finddata_t *fileinfo );VC2005:intptr_t _findfirst( const char *filespec, struct _finddata_t *fileinfo );Since I need to build code to support multiple versions of VC++ I ...

fatal error

853 byte By MVPUser at 2008-2-14
<talotore@discussions.microsoft.com> wrote in messagenews:180ecc6c-010b-4d3d-899c-8c78a26e0562@discussions.microsoft.com > #ifndef RC_INVOKED> #include_next <stddef.h>> #endif> > can someone tell me why im getting this error> > > "fatal error C1021: invalid ...

Getting a C++ Compiler without an IDE

253 byte By Digital-Pioneer at 2008-2-14
<span>Hi. Can anyone tell me how I can compile a source without getting an IDE?</span><span> The IDE would take up too much space on my hard-drive for the use I would get from it. I get some source occaisonally, but don't have the compiler. </span>

Problem Converting char** to cli::array<System::String^>^ and vice-versa

452 byte By jasonRS at 2008-2-13
I am trying to convert an (unmanaged) array of char* to an array of (managed) Strings, and vice-versa.Is there a nice way of doing this?I get confused when trying to create an array of pointers, and cant quite figure out a nice way of doing this.Any help here would be appreciated.I have been ...

.NET Framework - why does my program require it?

1019 byte By MrTufty at 2008-2-13
Hi, I've got myself a little demo program created. It uses the Irrlicht 3D engine and the RakNet network library to provide a drawing window - basically anything drawn in the window on one of the clients gets passed across, via the server, to every other client. I'm quite happy with the way ...

Suggestion for the next standard...

3338 byte By MVPUser at 2008-2-12
<RITZ@discussions.microsoft.com> wrote in messagenews:0ab7fdae-8303-4a4e-95f9-5aee37fb96a6@discussions.microsoft.com > Hi, I have a small suggestion that I think is neccissary for the next> C++ standard release. The standard does not denote that structs need> to be contiguous, I ...

Visual Studio.NET C++ 2005 Express, functions defined in cpp file cause "is not class or na

3524 byte By mrhicks at 2008-2-11
Hello all, I am not sure if this is the correct group for this question, but I couldn't find a more appropriate one. I have Visual Studio.NET C++ 2005 Beta 2 installed and I was trying my hand at creating a simple Windows application. I have a main form that I used the desinger to create with ...

How do i make transparent button in VC++

416 byte By nayana4u at 2008-2-10
Dear all experts,I tried to make transparent button by puttin backgroung color ascolor ->web->transparentIt is succeed but it is not transparent on some objects.After i found it is not a real transparent button( http://www.bobpowell.net/transcontrols.htm)from this link. now i want to make real transp...

C++/CLI code porting problem

942 byte By HenrikGoldman at 2008-2-10
I'm trying to port a C++.NET (managed extensions) application to C++/CLI. However I'm not very strong with the syntax yet.What I'm trying to do is to create a wrapper for a C Dll file.To do this I'm using DllImport but I failed to found documentation on it's use. There are some problems ...

How can I test if a gcroot<String^> has a String assigned to?

394 byte By ManfredD at 2008-2-10
There must be a way to test if my "gcroot<String^> m_aString" has been a real String assigned to (by executing "m_aString = gcnew String(L"")"), but I cannot find it.The compiler accepts my setting the variable to nilptr (m_aString=nilptr) but wouldn't allow asking "m_aString == nilptr". ...

I wanna use IRTCMediaEvent's object in a Function, but Icant do it as it is

2137 byte By guest at 2008-2-8
Its compulsory for me to use that in this case: void CDlgMain::OnIRTCMediaEvent(IRTCMediaEvent mediaEvent) { RTC_MEDIA_EVENT_TYPE mediaType; HWND hwnd=m_Animate1.m_hWnd; m_Animate1.SetParent(thisDlg); mediaType = mediaEvent.EventType; switch (mediaType) { case RTCMET_STARTED: { // Get the video re...

Retrieving specific digits of a variable value

318 byte By SoheilsX at 2008-2-8
Hi guys, I just had a quick question. Say I have the user enter a value for a variable, x. How would i pull a specific digit from it? So if the value put in by the user is 23, it will assign 3 to the variable. Or if he enters 234619 it will take the 9 and assign it to x. Thanks in ...

Another problem with 2005 beta 2 and libcp.lib

2427 byte By DavidNeubelt at 2008-2-8
I'm using the boost library which I'm assuming uses the libcp.lib. If I try to compile I get this linker error LINK : fatal error LNK1104: cannot open file 'libcp.lib'If I try to ignore that library I get this error LINK : fatal error LNK1104: cannot open file 'LIBC.lib'If I try to ...

Is the /GS switch working as expected in Beta 2?

865 byte By GeorgeEckert at 2008-2-7
Something appears a little broken in VS 2005 Beta 2. The code below will produce the expected buffer overrun dialog box when compiled retail in VS 2003 but does not in VS 2005 unless I set optimization to /Od. void causeAnOverrun( _TCHAR *badName ) { _TCHAR myNameBuffer[5] = {0}; _tcscpy( ...

New to C++

166 byte By PLCweaver at 2008-2-7
Is this software diffcult to learn? This is my first adventure into these higher level lang. <img src="/library/msdn/emoticons/emotion-7.gif" alt="Tongue Tied" />

C++ Template problem with Visual Studio 2005 beta

3144 byte By MVPUser at 2008-2-7
<Roger C Garrett@discussions.microsoft.com> wrote in messagenews:ce13a80b-1b47-4687-b6f4-d617b16e17d4@discussions.microsoft.com > I'm trying to compile the source code for a MySQL C++ API (got it off> the www.mysql.com site). I'm using the very latest Visual Studio 2005> beta, ...

vector<bool>::iterator problem

2426 byte By HenrikGoldman at 2008-2-7
I have a function which starts with the following: bool CPrng::Seed() { // Used for recording succeses vector<bool> BoolVector; vector<bool>::iterator it;...The code works fine under gcc and VC6 + VC.NET 2003 but in Whidbey Beta2 it gives:C:\Program Files (x86)\Microsoft Visual ...

GetParent broke...

1690 byte By RITZ at 2008-2-6
GetParent doesn't return the correct HWND for a pop-up dialog box created with DialogBox it seems. GetParent always gives the root window handle in a dialog procedure instead of the correct owner. void Test(int test) { char blah[10]; itoa(test, blah, 10); MessageBox(0, blah, "Test", 0); } ...

DirectX SDK uses libcp.lib that was removed in VS 2005 beta 2

498 byte By AlexeiBaskakov at 2008-2-6
The latest Direct X sdk that supports Windows 2000 OS is dx90c december edition.d3dx9.lib from DirectX90c SDK (december 2004) has string /DEFAULTLIB:"libcp"There is no libcp.lib in VS2005.So, I haveLINK : fatal error LNK1104: cannot open file 'libcp.lib'Tell me please, how to fix this? I'm ...

Conversion problem

120 byte By Exore at 2008-2-5
I need help again! How do I convert a System::string to a native c++ string and vice versa. Thanks in advance!

error LNK2019: unresolved external symbol _CorBindToRuntimeEx@24 referenced in function _wmain

2516 byte By JasonHaley at 2008-2-5
I am still learning C++, so forgive me if this is a dumb question (my guess is I am missing some environment setting that I haven't stumbled across yet ... but what do I know). I am getting the following errors when I build the code below (code taken from Steven Pratschner's MSPress book ...

how do I delete this posting?

38 byte By LauraK at 2008-2-4
I don't see any delete button!

INI-files

658 byte By MVPUser at 2008-2-4
<Exore@discussions.microsoft.com> wrote in messagenews:f6dece0e-6af8-41c0-9a91-c4f45a90c90f@discussions.microsoft.com > How do I read and write to .ini files using Visual c++ 2005 Express> Edition Beta? GetPrivateProfileString, WritePrivateProfileString et al-- With best wishes, ...

Why are my posts being deleted ?

321 byte By YacineBenahmed at 2008-2-4
Hi, I was wondering why my posts are being deleted, I posted to threads on shell programming and both were deleted. I have not been vulgar or impolite in any of my posts and would really like to know why they have been deleted.Is shell programming taboo in these threads or something ? ...

MFC & NOMINMAX

1325 byte By MVPUser at 2008-2-4
<Thomas Kux@discussions.microsoft.com> wrote in messagenews:1db76d80-36f2-4b66-97b5-c0a2ad1e79f7@discussions.microsoft.com > 1. Create a new MFC-Application using the wizard.> 2. Define NOMINMAX in the C++ Preprocessor Settings.> 3. Add #include <algorithm> before #include ...

_TLOSS in _matherr

507 byte By JuanM.Aguirregabiria at 2008-2-3
I am porting a mathematics application from Borland C++ to Visual C++ 2005 Express Edition beta, but it seems that _matherr does not work as described in msdn. After some research and tries I have succedded in getting _matherr called with the _DOMAIN error (for instance when evaluating ...

Another wrinkle....

500 byte By nobodyman at 2008-2-3
I'm trying to recompile some old code that was formerly working under vs6, and I'm not having any luck in vs2003. Specifically, #include <strstrea.h> #include <fstream.h> However, the error I get is "Cannot open include file: 'strstrea.h': No such file or directory". I have ...