Answer Questions
Sune Hansen A problem of CComUnkArray::Add() in the atlcom.h
Hi all, The excerpts of the function look like this : DWORD dwCookie = 1; for loop () { if (condition match) { return dwCookie; } aiwdwCookie ++; } Look! What is aiwdwCookie I think this is a bug of atlcom.h. Could you help me to identify this issue Look at the modification date! Take a look at the sa ...Show All
Jean-Francois H. 'm_hWndLastControl' : is not a member of 'CDataExchange'
hi, i am moving an existing project from VS 6.0 to VS 8. The m_hWndLastControl is removed from CDataExchange and instead we have UINT m_idLastControl. The below piece of code CDataExchange* pDX; pDX->m_hWndLastControl =GetSafeHwnd(); gives the following error in VS 8 error C2039: 'm_hWndLastControl' : is not a member of 'CDataExchange' Any workaround to update the m_idLastControl instead of the m_hWndLastControl ...Show All
yoder30 Where is CWnd::CreateControl ?
Hi, I am investigating if MSVC 8 provides a viable upgrade path for us. I have ported my MSVC 6 applications to MSVC 8 and have gotten all my libraries to compile. However, every application that uses an ActiveX control generates a linker error regarding CWnd::CreateControl. But my other MFC based applications link and apparently run correctly. What gives Moving to the c++ ...Show All
Lakshan Fernando create C++ DLL to be used by C# ?
I want to write a native C++ function that I can later access from C#. Please keep in mind I do not have much experience developing on windows, (mostly unix) and that my only windows compiler is VS2005. I tried creating a MFC DLL. I am able to access this from a C++ .net program, but not from a C# program using P/Invoke. It seems that a plain MFC DLL is not "good enough" for use with DllImport. Is this correct It seems that I h ...Show All
Ujjwal Shrestha Problems compiling C++ Visual Studio 2005
Hi! I have a large C++ unmanaged application which I compile and run perfectly using Visual Studio 2003. Now, I wanto to compile and run it using Visual Studio 2005. When I compile it in release mode everything works fine, but I get about a thousand comiler errors when trying to compile it in debug mode. All of these compiler errors appear in files that belong to Visual Studio 2005 such as stdlib.h, cstdlib.h,etc. I would appreciate very much s ...Show All
RZ4 Need help with a funtion to take a name entered by a user
I want this function to take the name of the user and then display it. However it will only display a number when I run the program. I am new to C++ and programming for that matter so any help would be appreciated. char GetNameOfInvestor( char name) { numberOfYourFunctionsCalled++; Console::Write(S"Please enter your name: "); String __gc * input = Console::ReadLine(); return name; I would say www.codeproject.com is a great p ...Show All
NemosNemos converting c++ stl strings --> Tchars? (NO MFC)
How would I go about doing this Thanks! This isn't exactly what was asked, but I find it useful when mixing std:: string into a project where TCHAR is used. To make std:: string use TCHAR instead of char: #include <string> using std::basic_string; using std::char_traits; using std::allocator; typedef basic_string<_TCHAR, char_traits<_TCHAR>, allocator<_TCHAR> > string; or similarly: ...Show All
timbador2 How do I determine a Print Processor for a Printer Driver?
I have written an application which automates some of our printer administration. However, in working with the Win32 functions and structures I'm not seeing how one would determine what print processor should be selected for a given print driver. When using the AddPrinter() function and PRINTER_INFO_2 struct, the pPrinterProcessor must be set. If you add a printer by hand (normal GUI wizards), certain drivers use print processors other than W ...Show All
Khammonh Interoperability of different compiler versions
I'm developing a DLL that will be used by a customer using Visual Studio 6, and it will in turn connect to vendor DLL's developed with the same tools. How interoperable are DLL's developed by the latest MS toolchain with binaries produced by the older tools For example, has the C++ ABI changed Can I safely expose a C++ interface in my headers or do I need to drop down to a C-based public interface If C++ is ok, what idioms should I avoid in pub ...Show All
Yashwant applying an icon
How do you apply an icon to your app after you have manually editted the app.rc file Because when I look at the icon now it's just that regular old ugly version of the window. But when I open the file it shows the icon I had originally applied to it on the top left. It worked Than it might be an other problem. What code did you changed in the rc file because it worked just fine until I erased the code that was already in the app ...Show All
voodoosg Visual Studio 2005 File Samples
Hi, On the MSDN web site there are VS 2005 code examples for C#, VB, and C++. I have been able to download the C# and VB, but the C++ download refers to a "Download Samples" button that does not exist. How does one download VS 2005 sample code Thanks Jeff Hi, That is what I was looking for. I use all three languages, VB, C#, and C++. Seems strange to me that with VB and C# I can dow ...Show All
Osamakhattab LNK1104 cannot find atlthunk.lib with VC++2005xpr and PSDK
All, I am trying to compile a modified amcap sample out of the DirectShow fold with VC++ 2005 Express Beta 2 and the 2003 PSDK SP1, targeting 32-bit x86; I don't have any 64-bit stuff installed. OS is Windows 2000 Professional SP4 Rollup 1. After weeding out a number of compilation errors, I am now left with the linker not finding "atlthunk.lib". Right - it does not exist on my harddrive. I am sure that my modificati ...Show All
Neil Kirby Timing issue using DateTime
I wish to have a progress bar counting up from 0 seconds towards a specified time, and above this a label showing currenttime / totaltime updating every second. I have a value (as an int) of the number of seconds that make up the total time, so I wish to make the total time by using: System::DateTime currentTime = currentTime.Now; System::DateTime PieceLength = currentTime; PieceLength.AddSeconds (Convert::ToDouble(TotalLengthInt)); TimeSpan pl ...Show All
saif VC++ 05 beta 2: pgodb80.dll not found
Hi, I was hoping to try out the profile guided optimisations, however, when I try to build an intrumented application I get the following error: "fatal error C1350: error loading dll 'pgodb80.dll': dll not found" The pgodb80.dll simply does not exist in the installation. Does anyone know where I can get hold of this dll so I can move forward to test out the PGO capabilities Best wishes, Mark ...Show All
Animine Problem compiling a program
Hi all, recently i had to work on a program which was running ok on VC++ 6. Due to certain restrictions i only can work with visual studio 2005 express beta 2. When i tried to compile the program in VS 2005 express beta 2, i got these errors which never occurred in VC++ 6: Compiling... STDAFX.CPP Compiling... Database.cpp DatabaseMarpos.cpp DataCom.CPP DBMarpos.cpp EBlockEntry.cpp EBlockLabel.cpp EdcsSettings.cpp EDCSSetupDialog ...Show All
