|
In every file in my large project, when I attempt to create a Release Version, I get the following error:
fatal error C1853: 'Release/ios.pch' is not a precompiled header file created with this compiler.
Clicking on this error goes back and points to the StdAfx.h (the first header file in every .CPP)
I searched your database but did not find this particular problem. Can anyone tell me what's going on, or tell me where to look to figure this out. BTW, the Debug version has no errors and no warnings (warnings set to level 4).
Thanks for your time.
John P.
|
|
|
|
|
Does your project have any .c files? Have you tried removing the .pch file and doing a Rebuild All?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
No, I don't have any 'C' files. I did a rebuild all and now it's complaining that it can't find include files that it could find in Debug mode? That makes a lot of Microsoft sense!
Thanks for the assistance, David. I'm going to'import' these files into the project just to make sure.
John P.
|
|
|
|
|
|
Main window of my SDI application generates a modless dialog which can be displayed and hide using menu options in parent window. this modeless dialog on certain options also generates a modal dialog, now when the modal dialog is active and i hide its parent ie modeless dialog from main sdi window only the parent modeless dialog hides whereas modal dialog remanis visible and doesnot hides. since it is child of modeless dialog it should also hide but it wont.
|
|
|
|
|
When the modeless dialog is hidden, hide the modal dialog.
There is a message ( WM_SHOWWINDOW ) that tells you a window is shown or hidden.
|
|
|
|
|
|
Hello All,
We are upgrading our server from NT to Windows 2000 or 2003. We have following components running on that server.
1) Citrix Servers.
2) Shared Memory running as Windows service.
3) Our Application.
Application is configured to run as components of Citrix servers. Our application uses IPC calls like OpenFileMapping to Windows Service in order to access shared Memory address. In NT when the Citrix client connects with anyomous user to server which was able to access the windows services which was running with different user id which contain shared memory data. But in windows 2000/2003 application is not working as similar to Windows NT. It clearly indicate it is just permission issue. Can anyone help me to resolve this issue. We are using Windows SDK functions for creating Shared Memory files.
Thanks,
Renga.
|
|
|
|
|
hi,
I want to determine the associated program with a file extension, I am targeting windows ce
I want to do this in two ways:
1. I want to know program name (for mp3: 'Windows Media Player')
2. Program path. (for mp3: 'c:\program files\...\mediaplayer.exe')
I want to use these information to create an 'open with' dialog box for windows ce.
are there any shell functions or should I read directly from the registry??
Mohammad
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
What about FindExecutable() or AssocQueryString() ?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Sorry David, but neither of these two functions is supported under windows ce!!
any other ideas?
Thanks
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
Hi
I am a newbie to programming and would like to ask a question regarding the debugger. Sometimes when I step into a function the assembler comes up. Why is this? And how do I get around it quickly? I find that by stepping out many many times eventually takes me back to the code where the assembler 1st appeared. Thank you for any information.
|
|
|
|
|
Here is how in general a debugger workds: When you build your application in debug mode the executables and/or dlls (or other library files) contain a lot of extra information on top of the actual code. That information are like hyper links to the source C code. Imagine like saying "the following ten assembly commands are in that line of that cpp file". The debuger, in order to display you the source code, it needs the extra 'debug' information and access to the cpp source file.
When the debuger cannot find the source code it displays what it runs in assembly. If you are an assembly guru you might be able to debug the application with that. The usual reasons that goes to assembly are:
i. The application or parts of it are not build in debug mode. Thus, the debuger has no clue where the source is.
ii. The function you step in belongs to the compiler libraries. No company will give you the source C code of them so stepping into them means you go into assembly.
iii. You haven't informed your debuger where the C source code is. Perhaps that has to do with the project settings etc.
|
|
|
|
|
Thanks for the information on why the assembler pops up. I was also wondering on how to exit out of it? I mentioned before that I could step out many many times and eventually it will return to the src code. I was wondering if there is a quicker methods than this? Am I right in saying that you can step out and then immediately close the assembler to return to the src code?
Thanks for your time.
|
|
|
|
|
Well by pressing Shift-F11 returns to the caller. I found the usually this works.
Another trick is to use the variables debug window. The context list box contains the stack of the functions. You can see where in the code are you in any depth. Select the level that you 're interested and put a break point immediately after the current step. Then press F5 (run into cursor) to bring you there.
However, the best way is to know where not to step into. If your application is propery build in debug mode try not to step into functions that you do not recognise and especially those that they are known library functions (like printf, calloc etc.) Note that for some MFC classes/functions microsoft provides the source codeto assist you seeing the bug. You will know that by the name of the file that the debuger opens.
|
|
|
|
|
Thank you for your advice. Unfortantely my application is 600,000+ lines and is difficult to know what does what without experimenting so I will use your two first points. But I still find that using SHIFT + F11 does'nt always get you out of the disassembly? Am I doing something wrong with that? Am I right in saying that it should return you to the source immediately?
Thanks again for your tips.
|
|
|
|
|
Shift-F11 is technically step return which means that it will return to the caller. Sometimes the caller is not directly your source but something else in assembly (perhaps parameters etc). Also I am strongly suspect that your application is not completely build in debug mode.
My hint is try not to enter into assembly (if you can) and make sure that all 600,000 are build in debug mode. If they are sometimes you should be able to see as assembly comments the source C lines. If so then try to see why the debuger cannot find the actual source file. Do you point it to them properly?
|
|
|
|
|
Hello
I went to build -> configurations and made sure the 'debug' version was selected. I then pressed F7 to build a debug version of the project. I then started the application by selecting Go (F5). The application seems to behave itself more when the assembler pops up in that by pressing SHIFT + F11 (step out) it returns to the source. I guess I must have chosen the wrong build or something which is why it was'nt properly working when I tried to step out of the assembler.
But Thanks for your advice.
|
|
|
|
|
I have a CEdit control and I would like to be able to zoom the text by a floating factor (i.e 0.75 or 1.25 for 80% or 100% zoom). I manage to resize the box to shrink or expand depending on the factor. However, I cannot get a scaled text. I tried the following code
<br />
XFORM xForm;<br />
<br />
xForm.eM11 = xForm.eM22 = (FLOAT)m_rZoomingFactor;<br />
xForm.eM12 = xForm.eM21 = xForm.eDx = xForm.eDy = (FLOAT)0.0;<br />
<br />
HDC hDC = this->GetWindowDC()->GetSafeHdc();<br />
<br />
SetGraphicsMode(hDC, GM_ADVANCED);<br />
<br />
ModifyWorldTransform( hDC, &xForm, MWT_LEFTMULTIPLY );<br />
either by calling it directly or by placing it inside the OnPaint message handler but I get no change.
I also thought that I may need to change the existing font. However, I looked to CFont class and to LOGFONT structure and I haven't seen a simple way to get a font which is a zoomed version of the current font.
How can I zoom a text in a CEdit control? Can I do it but somehow scaling the device context or should I change the font? How do I get a scaled version of the current font?
Note that this change may happen on fly. I 'd like to be able whilst the user is editing the text to zoom in and out. Resizing the box is not a problem but zooming the text is.
|
|
|
|
|
Dimitris Vikeloudas wrote: I haven't seen a simple way to get a font which is a zoomed version of the current font.
If you can obtain the LOGFONT structure of the font that the CEdit control uses, the create a font that has an increased point size by your zoom factor, then do a set font call on the CEdit control and then invalidate the window to get it repainted. You will also have to delete the font you created, otherwise it will leak.
Chris Meech
I am Canadian. [heard in a local bar]
Nobody likes jerks. [espeir]
The zen of the soapbox is hard to attain...[Jörgen Sigvardsson]
I wish I could remember what it was like to only have a short term memory.[David Kentley]
|
|
|
|
|
I can obtain the LOGFONT and I know how to handle the font that I 've created. My problem with the LOGFONT (and the CFont class) is that having the structure I do know in which fields should my zooming factor applied (I assume multiplied) to get a bigger or smaller font aesthetically pleasing. Any help on that please?
I thought that another way doing that could be applying a transformation to the device context of the CEdit window (maybe using the ModifyWorldTransform to scale it?) but it does not seems to affect the text in a CEdit. Is it possible to scale a CEdit window??
|
|
|
|
|
The first field of the LOGFONT structure is height. Increase this using your zoom factor and set the second field, the width, to NULL. The call to CreateFont will calculate an appropriate width, I believe.
Chris Meech
I am Canadian. [heard in a local bar]
Nobody likes jerks. [espeir]
The zen of the soapbox is hard to attain...[Jörgen Sigvardsson]
I wish I could remember what it was like to only have a short term memory.[David Kentley]
|
|
|
|
|
In my endless search for memory leaks, I've started to second-guess some things I once thought to be true. I just want to confirm something about CString here, to be certain:
Let's say I have code like this:
std::string displayStr;
displayStr = "Hello";
CString tmp(displayStr.c_str());
Do I need to free any memory here? I'm worried that perhaps in that particular usage of the CString constructor, heap memory is allocated, so I just want to make sure it isn't.
Kelly Ryan
|
|
|
|
|
When tmp goes out of scope, memory will be freed.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|