|
Roger Stoltz wrote: Ummm, "PJ"? What article is that? Or you mean "Professor Joe"?
PJ Naughter[^]... He used to be a very active member of Codeproject.com many years ago. After he created his own website[^] he stopped updating his articles and rarely visits anymore. There are some excellent libraires available on his website. Microsoft awarded him with MVP status in 2007[^] due to his contributions.
Best Wishes,
-David Delaune
|
|
|
|
|
Well, I found PJ's site about a decade ago when I had a job I resigned from in 2000.
But I couldn't remember whether he had written something about the differences between the debug and release versions. That combined with the fact that I linked to Joe's site made me unsure about what the other Roger meant.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
- Are you using a multi-threaded C run-time (I'm sure you are, but am asking for completeness )
- Are the STL objects being allocated in the same module (EXE/DLL) as they're destructed in? If not, you need to ensure you build all your different modules with a DLL version of the C run-time.
#2 has caused the same symptoms for me in the past as you're experiencing.
|
|
|
|
|
Stuart Dootson wrote: Are you using a multi-threaded C run-time (I'm sure you are, but am asking for completeness )
Yes, they all use the Multithreaded DLL for CRT etc. Double and triple checked.
Stuart Dootson wrote: Are the STL objects being allocated in the same module (EXE/DLL) as they're destructed in? If not, you need to ensure you build all your different modules with a DLL version of the C run-time.
I beleive they are all allocated/destructed in the same module, but they do all use the same Multithreaded DLL
At the moment were suspecting a hidden shared variable somewhere and combing the entire application for any file scope variables that should have been declared const which arn't.
1 suspect vector of objects has been found but that was before lunch and hasn't been fully investigated yet.
If you vote me down, my score will only get lower
|
|
|
|
|
My gut instinct is buffer overruns. Get an eval copy of BoundsChecker and run your stuff through it.
(And if doing a lot of new/delete, consider going to fixed, preallocated buffers.)
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
We have an old copy of boundschecker 7 which I installed and tried to test the application with. Unfortunately since it was released there have enough changes to stop it from working.
It doesn't report any issues and fails to catch any kind of problem on my system. Trying to get hold of an eval version of BC 9 atm.
Joe Woodbury wrote: My gut instinct is buffer overruns.
Its an odd one as if it was something like this I would expect it to happen when just a single calculation is run. It only happens when we have 2 running concurrently.
If you vote me down, my score will only get lower
|
|
|
|
|
I want to display popup menu when clicking inside richedit control.
How to get the notification message when right click on it.
|
|
|
|
|
See here[^]
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
Try using Spy++ to find out. But I bet it's WM_CONTEXTMENU...
You might also have to subclass the edit control to get the message - there are many articles on codeproject that sublcass a poor-edit control, and some for rich-edit controls which may help.
Iain.
Modification: Anshuman gives you a very good link to an article. Pay attention to him! - Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
modified on Friday, January 16, 2009 8:22 AM
|
|
|
|
|
Check out this article[^]. It explains how to show a context when you right click on a button. Follow the same for your richedit too.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
hi all,
plz tell me how i can get the picture represeting the user account( which shows in logon screen and startmenu ) in windows xp.
Thanks & Regards
|
|
|
|
|
It seems that under C:\Documents and Settings\All Users\Application Data\Microsoft\User Account Pictures\ Windows XP stores an image with the user's login name that will be shown on the logon screen. So if your user's login name is "nitin3", then it will be C:\Documents and Settings\All Users\Application Data\Microsoft\User Account Pictures\nitin3.bmp . Don't know about other versions of windows. If you find out about any API to access this information, tell me.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
|
|
|
|
|
I have installed the Platform SDK Windows Server 2003 Family, February 2003.
And now i want to use library files and include files of the installed sdk for my VC6.0 project.
So to do this, i changed the reference of include and library files in my VC6.0 project.
I went to Tools->Options then in Directories Tab and there, i changed the path
of the Include Files and Library Files.
And then i built my project.
But it is giving linker errors.
So how do i integrate this platform sdk with my project in VC6.0
Please help me.
abc_123
|
|
|
|
|
sunnyram wrote: So how do i integrate this platform sdk with my project in VC6.0
run the following application under the startmenu.
"Startmenu->All Programs->Microsoft Platform SDK February 2003->Visual Studio Registration->Register PSDK Directories with Visual Studio"
|
|
|
|
|
first Thanks for u r reply.
I did this but still getting the same linker error.
fatal error LNK1112: module machine type IA64 conflicts with target machine X86.
abc_123
|
|
|
|
|
It might help if you showed us what linker errors you were getting?
|
|
|
|
|
first Thanks for u r reply.
i am getting following linker error and also some command line warnings.
fatal error LNK1112: module machine type IA64 conflicts with target machine X86.
and command line warnings like:
cl: Command line warning D4007: '/Gm' requires '/Zi' option ignored.
cl: Command line warning D4002: ignoring unknown option '/ZI'.
cl: Command line warning D4002: ignoring unknown option '/GZ'.
abc_123
|
|
|
|
|
sunnyram wrote: fatal error LNK1112: module machine type IA64 conflicts with target machine X86
You are (somehow) linking to the Itanium (IA64) libraries - have a look in your directory settings and get rid of any 64-bit directories!
sunnyram wrote: cl: Command line warning D4007: '/Gm' requires '/Zi' option ignored.
That says that you've somewhere got the /Gm option (Enable minimal rebuilds) set - you need to set /Zi (Enable debugging information) as well.
sunnyram wrote: cl: Command line warning D4002: ignoring unknown option '/ZI'.
/ZI = "enable Edit and Continue".
sunnyram wrote: cl: Command line warning D4002: ignoring unknown option '/GZ'.
/GZ = "Catch release-build errors in debug build".
All those options are in VC6 (as well as all VC++ compilers up to and including 2008)... what C++ compiler are you using?
|
|
|
|
|
Thanks again Stuart,
I am using VC++ 6.0 compiler.
from following web site ,
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm
i downloaded the Windows Server 2003 PSDK and installed it.
Now i want to use the new libraries and include files of these installed sdk with
my VC++6.0 project.
so in VC==6.0 project, in Tools->Options and in Directories Tab, i changed Library files reference as
'C:\Program Files\Microsoft SDK\Lib'
and also made changes in Include Files section like
'C:\Program Files\Microsoft SDK\include'
'C:\Program Files\Microsoft SDK\include\mfc'
'C:\Program Files\Microsoft SDK\include\Win64\mfc'
'C:\Program Files\Microsoft SDK\include\Win64\crt'
'C:\Program Files\Microsoft SDK\include\Win64\atl'
and then with these changes i rebuilt my project and i am getting the linker error
as follows:
fatal error LNK1112: module machine type 'IA64' conflicts with target machine type 'X86'
so how do i fix this problem?
waiting for reply.
abc_123
|
|
|
|
|
You don't want those Win64 header directories in your include directory list.
|
|
|
|
|
first Thanks for reply.
I removed the Win64 entries
'C:\Program Files\Microsoft SDK\include\Win64\mfc'
'C:\Program Files\Microsoft SDK\include\Win64\crt'
'C:\Program Files\Microsoft SDK\include\Win64\atl'
and now my Include File section contains the following things:
'C:\Program Files\Microsoft SDK\include'
'C:\Program Files\Microsoft SDK\include\mfc'
I rebuilt my VC++6.0 project
and now i am getting the following error:
fatal error RC1015: can not open include file 'afxres.h'
abc_123
|
|
|
|
|
You've removed the standard Visual C++ include and library directories, haven't you...you still need those, but they need to be arranged so that the compiler will look at the 'Microsoft SDK' directories before the standard Visual C++ include directories.
I'm afraid I can't be more specific - I don't have access to VC++ 6 - I don't use anything older than VS 2003.
|
|
|
|
|
i followed, what you are saying.
now i gave the reference for old files also.
now i am getting another errors:
error C2371: 'size_t' : redefinition; different basic types
fatal error C1189: #error : afxv_cpu.h is only for MIPS R4000, DEC AXP, and IBM PowerPC builds.
How do i arrange the Executable, Include, Library and Source files section in
Directories tab of Tools->Option?
and what should be the order of the files?
Which files should i keep in the path for reference and which are not?
waiting for reply.
abc_123
|
|
|
|
|
sunnyram wrote: How do i arrange the Executable, Include, Library and Source files section in
Directories tab of Tools->Option?
<blockquote class="FQ"><div class="FQA">sunnyram wrote:</div>what should be the order of the files?</blockquote>
Source and executable aren't so important. Include and library should include the include and library directories that come with Visual C++ and those that come with the Platform SDK. If you aren't developing for 64-bit, do not include the Win64 directories. The Platform SDK directories should come before (above in the list, I think) the directories from Visual C++.
|
|
|
|
|
Hi,
I want to know whether it is possible to align multiple lines of text vertically and horizontally to a rectangle using the funtion DrawText.
If yes, please let me know for what combination of flags, the DrawText would produce the required output.
FYI flags in that funtion:
DT_CENTER - Centers text horizontally in the rectangle
DT_VCENTER - Centers text vertically. This value is used only with the DT_SINGLELINE value, where as my text is multiple line text.
Also there is this,
DT_CALCRECT - Determines the width and height of the rectangle. If there are multiple lines of text, DrawText uses the width of the rectangle pointed to by the lpRect parameter and extends the base of the rectangle to bound the last line of text. If the largest word is wider than the rectangle, the width is expanded. If the text is less than the width of the rectangle, the width is reduced. If there is only one line of text, DrawText modifies the right side of the rectangle so that it bounds the last character in the line. In either case, DrawText returns the height of the formatted text but does not draw the text.
May be I need to calculate and position text myself? If yes how?
Priya Sundar
modified on Friday, January 16, 2009 1:53 AM
|
|
|
|