-
- Setting breakpoints in code defined in unnamed namespaces
by Claus Brod
- 7 Replies
- Last post
by Claus Brod
- Hi all, in the following C++ code, I'm defining a class inside an unnamed namespace. This works as expected, but I'm having trouble setting a breakpoint in the Foo constructor. Well, I can navigate to the code and set a breakpoint by clicking on the line containing the code, but I can't seem to find the right way of specifying the breakpoint location by name. I tried "Foo::Foo" and thing
-
- Is there a tool to develop, in an automated way, design patterns from Visual Studio 2005? Extending CEdit problem
by MtEvans
- 7 Replies
- Last post
by Marius Bancila
- Used Class view to Create a new Class: class CEditEx:public CEdit.
Without doing anything further an attempt a complining gets the following results:
EditEx.cpp(12): error C2440: 'initializing' : cannot convert from 'size_t' to 'LPCSTR' EditEx.cpp(12): error C2440: 'initializing' : cannot convert from 'CRuntimeClass *(__stdcall *)(void)' to 'CObject *(__stdcall *)(void)'
Everything is poi
-
- Lost WMKEYDOWN messages
by plamen.petrov
- 9 Replies
- Last post
by plamen.petrov
- Hello,
Our application loses part of the keyboard input. The user presses a series of RETURNs (Spy++ shows all of them), but the focused window has processing in OnIdle() which coud take more than 0.5 sec and it happens, that if during this processing a WM_KEYDOWN comes, it is lost.
A concrete question: since Spy++ shows, that this window receives all WM_KEYDOWN messages but the trac
-
- CString
by m1n
- 5 Replies
- Last post
by Simple Samples
- Hi, i have one CString variable, and i have one file, about 600 characters, i try to put all the data file in the Cstring, my algorithm is :
Code Snippet
CString strTemp; while( ar.ReadString(strTemp) ) m_strFileBuffer += strTemp + _T(" "); ar is CArchive. Proble is that: when algorithm go few times throught 'ReadString' data readed in 'strTemp' are not aded to 'm_strF
-
- Why Visual Studion "find in files" sometimes does not work?
by PaulDotNet
- 10 Replies
- Last post
by PaulDotNet
- Sometimes for no apparent reason "find in files" does not search at all. It says something like "no files found". Pressing Ctrl-ScrollLock fixes the problem and find in files works again. I could never figure out the purpose of this "feature" and when it disables "find in files". The same annoying bug/feature exists in VS 6 and VS 2005. If I invoke "fin
-
- Passing template function to _beginthreadex
by dhelmer
- 4 Replies
- Last post
by einaros
- I'm creating a new thread but I'd like to supply a templated function to beginthreadex.
My thread function prototype is:
template<typename T> unsigned int _stdcall GetArrayThread(void* pvStruct)
However, when a supply: "GetArrayThread<IClass1>" as the 3rd parameter to _beginthreadex, the compiler gives the following error:
error C2664: '_beginthreadex' :
-
- How do I get myArray into the Safe Array?
by Kamii47
- 1 Replies
- Last post
by TilakGopi
- Hi every body.
I have a COM method that takes a SAFEARRAY* as an [in] parameter: MyInterface: :MyComMethod( SAFEARRAY * psa); It can be assumed that the method treats the Safe Array as an array of unsigned chars . I then have a managed C++ function that calls this method which itself takes a managed array of unsigned chars as a parameter: MyManagedClass: :MyFunction( unsigned
-
- cannot convert parameter 1 from 'char *' to 'System::String ^'
by AliiZ
- 10 Replies
- Last post
by Holger Grund
- Hello!
I'm trying to read a variable from a ini file and put this data into a input box.
Here's my code:
char * lpstrINIFile = "inca.ini" ; char * lpstrBuffer = new char [255+1]; GetPrivateProfileString( LPCWSTR( "ADR" ), LPCWSTR( "ADRxPos" ), NULL, LPWSTR(lpstrBuffer), 255, LPCWSTR(lpstrINIFile));
ADRxPos->Text = lpstrBuffer;
ADRxPos is the name of the input box, but s
-
- Copying file trees in a custom build
by John J Stephen
- 8 Replies
- Last post
by John J Stephen
- I have a large number of files which I want to include as part of my build process but which only need to be copied to the output directory in the same relative folder that they're in for the project (ie, if the file is in Documentation/Images/Header.jpg relative to the project then I want to copy it to $(OutputDir)/Documentation/Images/Header.jpg). I can create the custom build steps for these fi
-
- VC++ 2005 redistributable
by Jay K
- 14 Replies
- Last post
by Nelson B
- Hi, I'm trying to get an MFC application compiled with VC++ 2005 to run on a machine with VC++ 2005 express. There seems to be a problem with the manifest (which I don't fully understand despite reading the info on msdn). The original error in the event log when I tried to run it said Microsoft.VC80.CRT not installed so I installed the platform SDK and also copied over the atlmfc directory from th
-
- How to set the extension and an application for any extension.
by THE_SATAN
- 1 Replies
- Last post
by Marius Bancila
- Hey Every ONE
I am building an SDI app and i want that the document of that app always open in the application i am making. and that particaular extension file runs on my application. I think it is done in the string table of the project but exactly dont know how. so kindly help me.
-
- Compile VC8.0 program from commandline
by AlbyIndia
- 3 Replies
- Last post
by Sdi
- I have an application to test some API. Can I make use of VC8.0 compiler through commandline to compile it Is the binary portable any dependencies
-
- how do I use the old version of common controls DLL ( comctl32.dll ) with VS2005 builds?
by Superlexx
- 2 Replies
- Last post
by dtrenaman
- hello,
I am moving our application from VC6+eVC3+eVC4 to VS2005+eVC3, and it seems that it uses a new version of comctl32.dll (visual themes apply to scrollbars now) when built with VS2005. This is no good at all as our app uses hacks to work around code from comctl32 (not my fault, blame the marketing people) and it is unknown to us how using new version of the DLL changes the behaviour of our
-
- Some problem in Visual C Language
by zl6626
- 3 Replies
- Last post
by zl6626
- The following program can be compiled and linked in Visual C++ Command Prompt, but when it runs, it cause come problem and has to be closed.
/* Demonstrates passing a structure to a function. */
2:
3: #include <stdio.h>
4:
5: /* Declare and define a structure to hold the data. */
6:
7: struct data{
8: float amount;
9: char fname[30];
10: char lname[30];
11: } rec;
12:
13:
-
- Visual C++ Coding Help
by Shadowz O Death
- 5 Replies
- Last post
by SDKCodeMonkey
- Hello everyone! May someone please write a quick code for me I've did some re-search on www.google.com , but no luck...
Start Button Click
{
x = www.microsoft.com load time in milliseconds
y = 2000 - x
z = y * 2
If x is over 2000 milliseconds:
{
Pop-up message box reading "An error has occured."
}
If x is not over 2000 milliseconds
{
Loop
-
- Microsoft C++ x64 compiler very slow at floating point math
by Brad Robinson
- 12 Replies
- Last post
by Brad Robinson
- Hi,
I've been working on performance tuning some audio sample rate conversion routines and firstly I must say how impressed I've been with VS05's x86 optimizing compiler - it does some really amazing things, often matching and occasionally outperforming some hand written assembler I have. Today however I recompiled these routines with the x64 compiler and was shocked at the drop in perform
-
- Function does not match delegate type
by dec0ded
- 2 Replies
- Last post
by dec0ded
- Hello all, I have ported a chunk of code from C# to C++ and have 1 error on compile which I can't seem to fix. The main problem is that I don't understand what the error is trying to tell me, so if anyone could shed some light on the matter, or point out why I am getting the error that would be great. The code is below, and the line the error occurs on is in bold:
Code Snippet
private:
-
- Command Prompt Compiling with Multi...
by Oli
- 11 Replies
- Last post
by crescens2k
- If I have two source files, one.cpp that contains function definitions, two.cpp that uses the functions in one.cpp as calls (like: function()), then how do I compile two.cpp from the command line I mean it is not obvious how comiling two.cpp provides access to the function definitions contained in the other source file...
I have tried to find documentation that will explain this but I am to
-
- Help: C2679: binary '=' : no operator found which takes .......About CAutoPtr
by harrrysh
- 5 Replies
- Last post
by harrrysh
- class definition:
class CFGManager : public CUnknown , public IGraphBuilder2 , public IGraphBuilderDeadEnd , public CCritSec { public: struct path_t {CLSID clsid; CString filter, pin;};
class CStreamPath : public CAtlList<path_t> { public: void Append(IBaseFilter* pBF, IPin* pPin); bool Compare(const CStreamPath&am
-
- Resource Modification
by SaintAnger
- 1 Replies
- Last post
by SaintAnger
- Hi,
I am trying to modify a dialog box from my resources and the changes do not seem to take effect!!! Not only that but when i close the page with the dialog in question visual studio first asks me to save and then it crashes and closes...
I do not seem to find what is the problem and it is becoming very annoying having to re launce visual studio every time.
Does anyone have any
-
- build output missing in output window (vs 2005)
by Marc.A.
- 8 Replies
- Last post
by Dennis Volodomanov
- Hi,
I've been tinkering around with this problem now for a while..
When building any C++ solution with my VS2005 Team Suite SP1 I get no output of the compilation process at my output window,
only "Build started" and then something like: "========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped =========="
but no error messages, the error doesn't appear in t
-
- When using Additional Library Directories, Additional Dependencies appear twice
by Yogi Watcher
- 2 Replies
- Last post
by Yogi Watcher
- Hello,
I am using Visual Studio-2003. I created a project to build my library & executable using C/C++. I am using third party tool kit libraries as well for my project. Hence I have specified those additional library dependencies as "Additional Dependencies" under Linker-Input options of the project. Since those libraries are also in different directory, I specified that libr
-
- Loading Libraries
by michaeln31
- 4 Replies
- Last post
by Ramkrishna Pawar
- Hey all, Can anyone point me in the direction of how i can include a ddl file into my Win32 application I have the header file to the ddl but i dont know how to include the ddl library. I have an MFC example where the library is load simply by saying m_hmodule = LoadLibrary("Ftd2xx.dll");. Is there a win32 equivilant Thanks for any help! Mike
-
- VS 2005: DLL linking using Debug vs Release modes
by Dan-0
- 4 Replies
- Last post
by Dan-0
- I'm having trouble creating and linking to a DLL library from my main program, when compiling in "Release" mode. When I compile in "Debug" mode, the program runs fine. It appears that this is caused by needing to free variables and rewind files on the same side of the fence (i.e. main program vs DLL side) that the variables were malloc'd or files were opened. Can anyone tell me
-
- Lost in arrays and structs
by BjornC
- 6 Replies
- Last post
by BjornC
- Hi!
I'm kind of new to this .NET stuff (mechatronics student)
I'm trying to use a array of structs to store data globally, but every time I try to write to my array, all of it (all structs in it) gets overwritten by the new data.
This is my declaration:
Code Snippet
// Globals.h #pragma once using namespace System; ref class Globals { public: static array< int >