|
stevelam wrote: fgets (filename , 100 , pFile);
chage that to
if( fgets (filename , 100 , pFile) == NULL )
{
//ERROR
}
this prevent your prog from crashing.
there is nothing wrong with that part of your code the file could have been created in binary mode.
the buffer in this case filename could be currupted after the read op.
G_S
|
|
|
|
|
what don't you do that in a C++ way ?
STL is full of good things you know
|
|
|
|
|
hi,
Can anoboby tell me What are the differences in the debug mode & Release mode in details. what book i should refer to get good grip on this
|
|
|
|
|
debug mode should be used only for developement and debugging.
release mode is what you must use to deliver your apps.
to understand what happens, generate your application in both modes and compare the exe size... yes, the debug version is much bigger !!! that's because the compiler adds inside it some debug informations, lets the comments, don't perform optimizations, etc...
|
|
|
|
|
1. there's no debugging info in a release build - no good way to link the EXE back to the source
2. release builds are usually optimized, debug builds are not
3. some functions will work differently in release vs. debug (ex. new/malloc are quite different because the debug versions are designed to help catch memory leaks - the release versions are not)
4. things like ASSERT(x) behave differently because they rely on certain preprocessor flags (ex. _DEBUG) to control what they do
5. some data types may be initialized to 0 in debug build. they won't be, in release builds
etc..
-- modified at 10:03 Wednesday 23rd August, 2006
|
|
|
|
|
|
you can setup each of them to behave the way they want. even setup debug to work like release and release to work like debug.
we use only one mode for both and call it release_Debug. It has some debug info that is sufficient to get an idea of the problem. It helps as we have had problems in the past where our exe behaves differently in debug and release modes.
|
|
|
|
|
We are moving over to VS2005. We did a release build on a COM server and when registering it fails.
Found the following in the event log:
Source: SideBySide
EventID: 23
Dll redirector contributor unable to add file map entry for file msvcr80.dll; Two or more components referenced directly or indirectly by the application manifest have files by the same name.
Source: SideBySide
EventID: 58
Syntax error in manifest or policy file "C:\WINNT\WinSxS\Manifests\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd.Manifest" on line 5.
Source: SideBySide
EventID: 59
Generate Activation Context failed for C:\Project\Release\MyServer.exe. Reference error message: The operation completed successfully.
.
Registers fine with a debug build! Any thoughts??
Thanks!
ed
~"Watch your thoughts; they become your words. Watch your words they become your actions.
Watch your actions; they become your habits. Watch your habits; they become your character.
Watch your character; it becomes your destiny."
-Frank Outlaw.
|
|
|
|
|
Hi all
As iam a Beginner in MFC,i want to know how to override the control(ex:edit control)
|
|
|
|
|
You can customize the edit control by Subclassing it to meet your needs.
Derive a class from CEdit and override the functions provided in the class.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
|
Hi,I'm a beginner of vc++.Could someone help me?
I use a class writen by other to add bitmap to menus. this class is easy to use. but I've met a problem:
how to change the checkmarks style of the menu?
the class is here :http://www.codeproject.com/menu/bmpmenu.asp[^]
how to update this class?
|
|
|
|
|
Hello.
If you look at the bottom of the page where the article is, you will find a discussion forum, similar to this one.
When you have a question regarding an article, then that's the place to ask your question(s).
That way, you direct your question to the author of the artice and you will have a better chance to get your questions answered.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
|
stop this spam immediately...
you started a thread some minutes ago. why don't you just follow it instead of starting new ones ?
|
|
|
|
|
Same question!?
|
|
|
|
|
i have declered a constants in a Header file in following way
const COLORREF RED = RGB(255,0,0);<br />
const COLORREF GREEN = RGB(0,254,0);<br />
const COLORREF BLUE = RGB(0,0,254);
after that i created a message handler like below for each colour
void CNEWWINDOWView::OnGreen()
View.<br />
{<br />
m_colour=GREEN;<br />
Invalidate();<br />
}<br />
now i have wriien in the ondraw as
CString str2.Format("%d",m_colour);<br />
pDC->TextOut(400,10,"COLOUR:"+str2);
i am geting in the window the value of clour of red as 255,for green 65024,
for blue it is 16646144; why it is displaying like this?
-- modified at 8:22 Wednesday 23rd August, 2006
|
|
|
|
|
Because it is a combination of R,G, and B components.
R + (256*G) + (65536*B)
Steve S
Developer for hire
|
|
|
|
|
i want to display the name of the colours than that of the values on window
can u give me the sugetions to how to do it?
|
|
|
|
|
ramanand_bulusu wrote: i want to display the name of the colours than that of the values on window
You must be kidding
This is crazy: take two seconds to think about what you said. COLOURREF is just a number that holds a the intensity of each color (R, G and B). There is no colour name associated in any way (and this would be completely absurd, imagine the number of names you need to have).
|
|
|
|
|
what about the method GetRValue();
so ur telling that it is impossible to get the name of the colour on the window with respective to selecting colour?
-- modified at 8:37 Wednesday 23rd August, 2006
|
|
|
|
|
ramanand_bulusu wrote: so ur telling that it is impossible to get the name of the colour on the window
There is no name, COLOURREF is a number. Imagine, there is more than 1 million color combination (make the calculation yourself: 256^256^256). And you want to have a specific name for EACH of those colors ??
What you need to display is the intensity of the three channels, there is no other way to do it if you want color info.
|
|
|
|
|
Cedric Moonen wrote: Imagine, there is more than 1 million color combination (make the calculation yourself: 256^256^256)
256^256^256 is rather bigger than a million - I think you mean 256 * 256 * 256 which is 16.7 million colours
|
|
|
|
|
Mmh, yes you are right, I mixed the two (I must be tired)
|
|
|
|