Answer Questions
Pelle Plutt Visual Studio 7 C++ application terminates unexpectedly
I have a VS C++ application that exhibits (new) and strange behavior. While apparently running normally, the application suddenly (and cleanly) terminates. The application goes down without any (known) error messages and/or warning dialongs. Moreover, debugging statements written by the program to a log file indicate that each of the major internal objects are calling their respective distructors in the proper sequece. The ...Show All
Bill_Thompson How to handle header and footer in a report?
Hi, I must first say that I only have a couple months experience in Visual C++. I've been reading a lots of books on the subject. Unfortunately, most of the time, the examples I could have on specific item was very "general" if I can say. With the other languages I'm using, I'm able to make reports with header and footer repeating on each page of report as well as an auto-incrementing page number, subheaders, subtotals/subfoote ...Show All
Arie-Jan WriteConsole not working under debugger
Hi Guys I am writing a simple win32 app using Visual C++ 2005 express beta2 Basically i'm trying to have a console window to write debug messages. so i use AllocConsole(), then GetStdHandle() and WriteConsole(). The code works fine when i run it standolone, but when I use the debugger (F5) the text I write with WriteConsole doesnt show up. I'm baffled Thanks Sam Sure you don't have a breakpoint in there ...Show All
Troy Neville Debugger refuses to do anything useful ("No symbols are loaded for any call stack frame. The source code cannot be displayed.")
This is native DLL project, with an external managed test driver. However, I don't care about the test driver and have set the debugger type to native only. Everything seem to work just fine until I debug into advapi32. Once I hit the breakpoint just after EH setup in CryptAcquireContextA, the debugger effectively dies with the error message above. The UI still works, but I don't have a call stack and can't even show the registers (Regist ...Show All
JoelSSIS App Freezes For About A Minute When I Edit Header Files
Greetings! We have a 300,000 line C application that I've been building for 11 years through multiple versions of Visual C / Visual Studio. We keep most of our constants in one file called "constants.h". When I go to the edit this file, the newest VS ("VS 2005") will often freeze. I believe it is busy recalculating "browse" information on the fly. That is, if I change the value of a '#define', it seems to be recalculating all these values ...Show All
Paul Martin Optimizer fails to remove unneeded loop?
Here's a minimal code sample that illustrates the problem: #include <cstring> #include <iostream> using namespace std; # define TEST_COUNT 5000000 void AssignStr( char * str ) { strcpy( str, "changed" ); } int main() { char temp2[16] = "no change" ; for ( int i = 0; i < TEST_COUNT; i++ ) {   ...Show All
dotNetFreak How to convert string object to char array?
Hello, I am writing MFC program. There is a string object that needs to give its content as char [] array. Is there anyway to extract string object as char Array Thanks, vcboy Yes, strdup could be a solution, but one must free the newly created buffer (as you pointed). From experience, I know that many times the usage of strdup ends in memory leaks. There is a similar way to get th ...Show All
DBoldt Image Color Management in VC++ 8 Platform SDK
I'm converting a VC++ 6 MFC app to VC++ 8 using Visual Studio 2005 Standard. The existing app uses Image Color Management, so it #include's icm.h. In the VC++ 6 environment, it is included from the Platform SDK [$(ProgramFiles)Microsoft SDK\include] directory. A Visual Studio .Net installation delivers a version of the Platform SDK in a subdirectory of the VC directory [$(VCInstallDir)PlatformSDK] and this directory is setup to be used for in ...Show All
Sebastian Paulussen where does the combo box's dropdown property go?
In my project, I need to set the combo Box's style as dropdownlist and ownerdrawvarialble , in the vc6.0, I can do that,but in vs2005,I don't know where to set ps ,I've tried the ModifyWindowStyle api,it doesn't work. Can someone give me help thanks sorry to have post this question here... can anyone tell me wh ...Show All
deepak2000 MemoryStream
This does not work: MyStream is a MemoryStream InsertString = String::Format ("insert into blobtest (blobtest) values ('{0}');", MyStream->GetBuffer()); MyStream->GetBuffer() just returns "System.Byte[]", not the actual data, which is what I want. You can see what I'm trying to accomplish here. Why isn't it working Before I answer this question, I'd like to know how you obtained ...Show All
Petr Horinek Printing to Laser vs Inkjet
This is my first post, so please guide me if I have cjosen the wrong place. I am printing from my C++ application written under Visual C++ 6.0, and I can print fine to Laser printers such as LaserJet II or LaserJet 4400, but if I direct the print to a DeskJet printer, the document doesn't print and the printer status box always seems to dhow 48 bytes printed out of whatever the document size is. The code I'm using to start printing is..... ...Show All
lotofu _vfptr is zero in class with virtuals - isn't this wrong??
I'm using VC8 on XP Pro SP2. My application uses MFC and STL. I have a class with virtual members that inherits from another class with virtual members. I can call the virtual members from within the class's ctor (sometimes ) and I can call the non-virtual members, but when I try to call a virtual member I get an access violation. I see that the the _vfptr member is zero. Isn't that wrong It seems to me that this is my problem, but I don't know ...Show All
Noam printf backspace
whatz the equivalent of printf("%3d\b\b\b"); in vs2005 thanks I presume you mean with C++/CLI because: printf("%3d\b\b\b"); Is still accepted by Visual C++ 2005. The escape character '\b' appears to work the same for managed code: #include <stdio.h> using namespace System; int main() { printf( "%3d\b\b\b" , 123); Console::Write( "{0}\b\b\b" , 456); Console::WriteLine ...Show All
Olmy How to check my ODBC data connection open or not?, pls help
VC ++ 6.0 CDatabase db; db.OpenEx(_T("DSN=DSNklse;UID=sa;PWD="";")); TRY { db.ExecuteSQL(sqlQuery); } CATCH(CDBException, pEx) { TCHAR buff[80]; pEx->GetErrorMessage(buff,80); AfxMessageBox(buff+sqlQuery); pEx->Delete(); } END_CATCH I need to execute an insert query atleast 3 seconds once in my program, i dont want to open ODBC connection everytime i excute the "sqlQuery" like above. if i ...Show All
Chris77 check value to see if its numeric?
I'm writing a simple console program and I am having the user enter in a number. I want to add some basic error checking to see if the user entered a number or if they entered a letter instead. Is there a simple way of doing this If they enter a letter, I just want the screen to write a message saying they cannot do that. isdigit() or compare ASCII Kuphryn This is a VB code which is not valid in ...Show All
