Answer Questions
TopSQL NewQuestions
I'm building a project for myself really; however, this problem is sticking me in the side. Can anyone tell me why this particular problem isn't working #include "pl_en_stats.h" // in *.cpp file for icPlayerInformation_Data struct usage. // in *.h file for Class definition. class LoadGameData { private: char PlayerInformation; icPlayerInformation_Data* pl_statistics; public: LoadGameData(); bool load_SaveData_Open(); ...Show All
Reta Debugger's Bug?
I encountered a weird thing about debugging in Visual Studio 2005 Professional. You could try it in your VS. May be it is a bug. 1. Make sure the "Debug" toolbar is dragged out. All the operation is on it. 2. Set a breakpoint. 3. Start Debugging from the Debug toolbar, wait until reach the breakpoint. 4. Stop Debugging and immediately Start Debugging. After you stopped debugging, it will take about 1 second that the "Stop Debugging" becomes ...Show All
Nathan Griffiths Can I build a simple Console application that does not use Sxs.
Basically I just want to build some simple console programs that I can move from system to system (2000/XP) as a single .exe without having to get into the detail of Isolated Applications or Side-by-Side Assemblies. I currently get an error at execution of 'This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.' if I just bring my SimpleC++program.exe to a Windo ...Show All
bertuahki How to change paper size while printing
Hello everyone, I'm trying to print a couple of pages using the MFC platform of CView, but while printing I want to change the paper size from landscape to portrait. I now override the following functions : - OnPreparePrinting Here I set the papersize to landscape using the following code (from MSDN) PRINTDLG pd; pd.lStructSize=(DWORD) sizeof ...Show All
pingping MessageBox memory leak/corruption problem
I have a main thread that displays a message box using CDialog's MessageBox function. And there's another thread that exits the application. Termination of the MessageBox (without the user pressing "OK") is corrupting memory or causing memory leaks. In debug mode it says "user breakpoint is reached in code .. ". Is there a simple way to close the messagebox before terminating the application so that there won't be ...Show All
Natuk cannot overload operator >> , << in VC 6
I wrote a CMyString class and want to overload operator << to output the content, In my class, I declare : friend ostream& operator << (ostream& outDev,const CMyString a); outside the class, I have : ostream& operator << (ostream& outDev,const CMyString a) { outDev << a.mpContent; return outDev; } but the project cant compile, it says : error C2143: syntax error : missing ';' before '&' . It ...Show All
HalW MSFT Find symbol fails if function has different parameter name in declaration and implementation
I'm working on a legacy codebase where, for some functions, the declaration in the .H file and the implementation in the .CPP file differ with respect to the parameter names. Example: ----- Foo.h ----- void Foo( int aa); ----- Foo.cpp ----- #include "Foo.h" void Foo( int a) { SleepEx (a, TRUE); } void Bar() { Foo (1); Foo (2); &n ...Show All
Leitch Integration with GNU Emacs
Many of my current projects involve coding for non-Microsoft platforms. I have found GNU Emacs to be a very useful tool and I would prefer to use it for my Microsoft Windows C++ development. I have had success with using GNU Make, GNU Emacs and bash from Cygwin on top of a Visual Studio 2005 Command prompt. I am able to use cl.exe as the compiler without any problems. This takes the place of g++ or CC from the UNIX environments as long as I chan ...Show All
ChrisDurbin Passing Arrays to DLL 'System.AccessViolationException'
I am trying to pass an array of structures from C# to an unmanaged DLL to be filled in by the C++ code. I have the following defined: In C#: [ DllImport ( "RespackDLL.dll" )] static extern void MyMethod( [ In , Out ] RES_ENTRY [] entry, int size); [ StructLayout ( LayoutKind .Sequential)] public struct RES_ENTRY { String name; long compression; long offset; long size; long compsize; ...Show All
Peetzore windows.h not found...
WOW, I can't believe this information isn't easier to find. I downloaded and installed Visual C++ 2005 Express, and then downloaded and installed the Platform SDK SP2. NOTHING WORKS! The Directories are not found and there is no apparent way to set them. Apparently users have found a hack to make it work, but this is crazy. It seems like the first Microsoft person to install this would notice that it doesn't work an ...Show All
Carter33 Keyboard Input behavior
Hello I don't seem to be able to receive more than one message WM_KEYDOWN from the keyboard without to have to click on another window then click back on my window and press a key. I've tried to override WindowProc() but no messages seem to be sent there so no way to filter the event that way. I'd like to be able to use the keyboard as well as the mouse without having to click all over my application for each key stroke. What Message ...Show All
mrmrcoleman Can I make just plain exe, no dll-s in VS 2005?
I just finished my project in VS 2005. When I compiled a release version, it doesn't work on machines without VS 2005 installed! Is it even possible to make a exe file and distriubute it without an installer or, God forgive me, .NET framework How do you do that Solution Properties -> References If you are writing a small application that only depends on the C and ...Show All
JHPE New Secure-CRT function: swscanf_w
Hi, I tried to use the new "secure" functions and the swscanf_w function crashes with an access violation; the normal swscanf function works perfectly. Does anybody see a bug in the code, or is it a Visual Studio 2005 MSCRT80.DLL bug int iNumOfItems = 0; int iNum1 = 0; int iNum2 = 0; int iNum3 = 0; wchar_t Sep1[2]; wchar_t Sep2[2]; CComBSTR bstrStartTimeDBMaint; CComBSTR bstrDBMaintTimeSpec; bstrDBMaintTimeSpec = L"0-0-10"; bstr ...Show All
Mark Bailey C6.0->VS2005 -user messsages- ON_MESSAGE error C2440: 'static_cast'
Help Needed: I'm moving a program from C6.0 to Visual Studio 2005 C++. It's an MFC program. The problem I am having is with ON_MESSAGE handling user messages. The compiler is not happy with the function prototype for the message handler. I've made the needed changes to the code to satisfy the stronger type checking of this compliler, but don't understand the 'static_cast' comment. I've tried making the function ' ...Show All
Giri_Ganesh Take a look at the GDI+ help?
every master,I have a old draw programe in VC6.0,now i want to transform to VC2003,but I dont want to use managed C++,I still want to use MFC, so how to program using GDI+ Thank you very much.I think I can get a good start from your help. I just take a example code from http://msdn.microsoft.com/library/default.asp url=/library/en-us/gdicpp/gdiplus/gdiplus.asp . Using GDI+->Draw a line, after I paste the code into a empty ...Show All
