visual-c++

how to solve unhandled exception error when using visual C++ 2008?

Hi, Could someone please help me to solve unhandled exception error when using visual C++ 2008? the error is displayed as follow: Unhandled exception at 0x00411690 in time.exe: 0xC0000005: Access violation reading location 0x00000008 Some details: - tm 0x00000000 {tm_sec=??? tm_min=??? tm_hour=??? ...} tm * tm_sec CXX0...

How to load .png , .jpeg images using MFC ?

Hi i want to load png images and jpeg images. can anyone help me? ...

Why so much stack space used for each recursion?

I have a simple recursive function RCompare() that calls a more complex function Compare() which returns before the recursive call. Each recursion level uses 248 bytes of stack space which seems like way more than it should. Here is the recursive function: void CMList::RCompare(MP n1) // RECURSIVE and Looping compare function { auto M...

Software evaluation - licence

Hi, Can any one help me on software licence module. We created a new application and want to release a demo version(30 days trial) of our tool later we need full version. How can i generate license file or license code and how to limit 30 days evaluation. Please give me some help on this. Our application is developed on windows in QT ...

How to enable or disable node in CTreeCtrl in MFC ?

I have searched through internet & found that there are no any direct method that disable nodes of CTreeCtrl control. check one post at http://www.ucancode.net/faq/MFC_CTreeCtrl-CListCtrl.htm & also on codeguru.com but not clear about how to disable node of CTreeCtrl. ...

Wrong Library Imported via #pragma comment(lib, ...) in Visual C++

I'm using Visual Studio 2008. I have a DLL and a test program EXE. There is a header file for the DLL that contains this: #ifdef _DEBUG #pragma comment(lib, "FooD.lib") #else #pragma comment(lib, "Foo.lib") #endif The intent is to dynamically link to FooD.dll through the FooD.lib import library, for a debug build, and to Foo...

how to use localtime function with VIsual Studio C++ 2008

Hi I am getting this error : "Unhandled exception at 0x00411690 in tim.exe: 0xC0000005: Access violation reading location 0x00000008" when I execute a program this is compiled and linked successfully and the problem is that localtime() function is not correctly recognized by Visual C++ 2008. (With VC++6, this program works fine). ... ...

how to use gettimeofday() or something equivalent with Visual Studio C++ 2008?

Hi, Could someone please help me to use gettimeofday() function with Visual Studio C++ 2008 on Windows XP? here is a code that I found somewhere on the net: #include < time.h > #include <windows.h> #if defined(_MSC_VER) || defined(_MSC_EXTENSIONS) #define DELTA_EPOCH_IN_MICROSECS 11644473600000000Ui64 #else #define DELTA_EPOCH_I...

ATL OR C# for windows shell/namespace extenssion?

Hi, i have a question, after allot of hours in googling and reading articles, i understood that namespace extenssion in windows is quite tricky (In C++ at least), now i've also seen its possible to do so in C# , but microsft does'nt officaly confirms using .net for namespace extensions... though i have seen very nice commercial Namespa...

What can you do in ::OnInitDialog() Visual Studio 2008 C++

What can or cannot you do in ::OnInitDialog() Visual Studio 2008 C++ I would like to write out some text on the dialog at the dialog startup. If I put the same code in a PUSH-BUTTON OnBnClicked it works. If I put it in the OnInit, it does not give me the text on the screen. I'm assuming at the OnInit, my dialog box is not completely...

Help to restructure my Doc/View more correctly

Edited by OP. My program is in need of a lot of cleanup and restructuring. In another post I asked about leaving the MFC DocView framework and going to the WinProc & Message Loop way (what is that called for short?). Well at present I am thinking that I should clean up what I have in Doc View and perhaps later convert to non-MFC it th...

Build error in Visual Studio application

I have a solution that I am trying to build in Visual Studio which gives the following error. Project : error PRJ0019: A tool returned an error code from "Copy the executable to HAMR platform" The last few lines of the build log are as follows: Copy the executable to HAMR platform The system cannot find the path specified. Project : er...

TCHAR end of line character

int DownloadFtpDirectory(TCHAR* DirPath) { WIN32_FIND_DATA FileData; UINT a; TCHAR* APP_NAME = TEXT("ftpcli"); TCHAR* f; int j = 5; do { j++; f = _tcsninc(DirPath, j); }while (_tcsncmp(f, TEXT("/"), 1)); TCHAR* PATH_FTP = wcsncpy(new TCHAR[j], DirPath, j); After the last line gets a string in which there is no line ending char...

Custom action during Uninstall

I want to take system time and date during install of my program. How to set my current time into system registry. I s it possible to do coding in VC++ Give me a sample code to set current time to registry using VC++.. Thanks in advance. ...

Only 16 colors for CColorDialog?

Someone knows some way of putting only 16 colors in the CColorDialog of Visual Studio c++ when it is opened? ...

Making an owner-draw button transparent against its arbitrary background in WINCE

Hi I am trying to place an owner-draw button transparently onto a background. I have no trouble doing this when the background is a solid colour but if the background is an image I cannot seem to get the correct HDC (handle to device context) to Bitblt() the area that button covers. The HDC that is passed as part of the DRAWITEMSTRUCT...

strtod() and sprintf() inconsistency under GCC and MSVC

I'm working on a cross-platform app for Windows and Mac OS X, and I have a problem with two standard C library functions: strtod() - string-to-double conversion sprintf() - when used for outputting double-precision floating point numbers) Their GCC and MSVC versions return different results, in some digits of mantissa. But it plays a...

Using OnNcHItTest for a CWnd not CDialog

I have a CWnd Derived object used in a dialog. I need to be able to drag it anywhere in the dialog. I have a code overriding OnNCHitTest for moving a dialog dragging it from a place other than the title bar. Is there any equivalent code to do the same to move this CWnd. The following code isnt working. UINT CBaseSliderBtn::OnNcHitTe...

Link List Implementation Help - Visual C++

Hi there I'm trying to implement a link list which stores the city name (though you will see this commented out as I need to resolve the issue of not being able to use string and needing to use a primitive data type instead during the declaration), longitude, latitude and of course a pointer to the next node in the chain. I am new to th...

event handling for button click in visual c++

i am new to this platform and i want to retrive the data from textfield on the click of a button ,how to do this please help me ...