|
Hi
Yes, i've added those by using Tools,Options.
I've checked the reg key and added some include dirs ... but this doesn't affect the tools, options include dir.
and i only open a single instance too
So i have to worry :x
|
|
|
|
|
I don't want to use the .Net framework and I was wondering if there was an equivalent to those 2 classes in MFC on Win32...
Thanks!
---------------
Tired of Spam? InboxShield for Microsoft® Outlook® 2K/2K2/2K3
http://www.inboxshield.com
|
|
|
|
|
I have rich edit View in my application. when run in the debug mode it gives an assertion stating the line 189 in winocc.cpp but runs fine in release mode. Can anyone suggest some solution asap.
Reagrds,
Samir Sood
Samir Sood
|
|
|
|
|
Have you looked at line 189 of winocc.cpp? There's a big clue there.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
|
Yes I have But it only indicates that handle to window is not there but if this was the case then why does the code run in the release mode
Samir Sood
|
|
|
|
|
I have a CFile object. I am dealing with a file with it. After my work is over i am calling CFile::Close();
CFile m_file;
m_file.Close();
after calling Close() , i need to know whether the file is closed or not. How can i do so?? Actually, my program is calling m_file.Close() two times. When i call second time, the program crashes. So before calling Close(), i want to know wheter file already been closed or not ??
|
|
|
|
|
Check if CFile::m_hFile == CFile::hFileNull.
if a CFile is already closed, a second call should ASSERT in debug mode but have have no effect in non-Debug mode, which tells me something else may be wrong with your code.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Close sets m_hFile to CFile::hFileNull.
INTP
|
|
|
|
|
hi,
how to get printer is connected or not and printer is switched on or not. any one help to me.
Thanks in advance.
|
|
|
|
|
Use GetPrinter() and look at the Status field of PRINTER_INFO_2.
Systems AXIS Ltd - Software for Business ...
|
|
|
|
|
we are investigating moving our application from dev studio 6 to .NET.
It is c++, API, non-MFC. It compiles fine but when executing the program we get a series of
"Unhandled exception at 0x00000000 in MyApp.exe: 0xC0000005: Access violation reading location 0x00000000." The first one appears to be in a listview control, but cant track down exactly where. call stack only shows disassembly, and only back 1 call.
If I remove the listview control I get the exact same error, possibly in the creation of a dialog box.
Is there anything special I need to do to:
1) get a project that runs perfectly fine when compiled with vs6 to compile and run with .NET
2) get the debugger to give me better information as to the cause of the problem
Thank You
|
|
|
|
|
Sounds like you're trying to dereference a NULL pointer, or possibly you've tried to GetProcAddress something and not checked it before calling the resulting function.
Steve S
|
|
|
|
|
another code offered the following suggestion, but did not follow up on it. Is anyone here able to expand on it? specifically "try with proper api declaration"
...
Perhaps, your converted application still have lots of api call, which is trying to access certain memory location, which is not allowed..
try with proper api declaration, or using the .net functions which replaces those apis...
...
Thank You
|
|
|
|
|
after further review....this debugger sure hasnt helped much....the error appears to be with using
lpfnGradientFill = (LPFNGradientFill)GetProcAddress(MSIMG32_DLL,"GradientFill");
I get a valid pointer, but using the function seems to cause the error. Will investigate further.
Thank You
|
|
|
|
|
Another cause might be a trashed stack. Thus the "ret" ends up going to 0.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
that seems to be the case. I can step through my function that uses the gradient fill, but at the return is where I get the error. We run our application through BoundsChecker and Insure when compiled with VS6 and it runs cleanly. Any way to determine what is causing the corruption?
Thank You.
|
|
|
|
|
turns out this was all from lazy programming.
when loading the gradient fill I declared as follows:
typedef BOOL (*LPFNGradientFill)(HDC,CONST PTRIVERTEX,DWORD,CONST PVOID,DWORD,DWORD);
which ignored the calling convention, needed to be:
typedef BOOL (WINAPI *LPFNGradientFill)(HDC,CONST PTRIVERTEX,DWORD,CONST PVOID,DWORD,DWORD);
Thank You
|
|
|
|
|
Hello!
I want to display buttons in a CToolBar each with either a string or a bitmap. The problem is now that SetBitmapSize() allocates space for the bitmaps even in the buttons that have no image at all. Therefore, they've got larger widths than desired. Someone told me I should use BTNS_SHOWTEXT and BTNS_AUTOSIZE. But Visual C++ 6.0 throws error C2065, because it does not know those constants.
Any suggestions to solve that problem?
Bye,
Ulrich Schmitt
|
|
|
|
|
You should get the latest Platform SDK and install it.
This will give you access to the latest headers and libs, although you have to exercise some caution if you want your apps to work on older (Win9x,NT) operating systems.
Steve S
|
|
|
|
|
I installed the new version. But if I rebuild the whole project I get a new error:
Fehler beim Start rc.exe<br />
Browse-Informationsdatei wird erstellt...<br />
BSCMAKE: error BK1506 : Datei '.\Debug\StdAfx.sbr' kann nicht geoeffnet werden: No such file or directory
This means that the file .\Debug\StdAfx.sbr couldn't be opened. Perhaps something with rc.exe is wrong? If I want to open it by double clicking its icon I get the information that this file is not a valid application for Windows. Other executables in the same directory can be started by me. But I did not try all because there are a lot. By the way it has 32.768 bytes and I work on Windows NT.
Bye,
Ulrich
|
|
|
|
|
The following will give you a hint as to where to start looking!
// ToolBarEx.h : header file
//
// From: MFC Knowlege base
// BUG: Resizing CToolbar with Dropdown Arrow Buttons Freezes Apps
// ID: Q190501
// From: Microsoft Systems Journal (Aug98CQA.zip)
// Problem: When using TBSTYLE_EX_DRAWDDARROWS and TBSTYLE_DROPDOWN
// the right end of the toolbar gets cut off or if it is a
// vertical toolbar the bottom gets cut off.
// Fix: CalcSize()
//
// From: John R. Shaw (Me)
// Problem: If you only fix CalcSize() the sizing calculations are
// still wrong because WrapToolBar() uses the same invalid
// width value used in CalcSize().
// Fix: WrapToolBar()
INTP
|
|
|
|
|
I think it is better and real problem of smart pointer,
to check what they own -
does it stack memory place pointer,
or allocated,
does it was deleted or not,
or must be deleted and not did - so must be asserted
at place of problem immedialtely. + (means plus)
It makes possible -
correctness of deleteing and
copy to incorrect places check,
check for leak finally -at shared pointes.
The most problem for poiners in program.
Does some pointer provides memory-check for operation correctness control ?
Other behavior- as shared_Ptr from boost
|
|
|
|
|
Your english needs work! But I think you want to know wether you need to delete a pointer or not. That is wether it has been push on the stack or allocated by you (or some body else). [If you do not know you already have a problem]
If you are the main person in charge of the project you could create your own overridenned version of new that would would insure that all allocation made with new.
INTP
|
|
|
|
|
I can develop it myself,
but I would check it against somebody already did this work.
So I asked.
English:
I try to write correct, but
If you do not understand please do not write,
due to I think that in cases when people is not
joy(!)
- thay easily can understand any foreign people.
With any of their errors.
as I understand foregn to me people.
|
|
|
|