|
I think if he used of dll file for enter bitmap is better than exe file(for size of exe file).
|
|
|
|
|
Yeah. IMO that's a matter of implementation need/choice. Pretty much the same
amount of data gets added to the overall solution. The DLL will need to be loaded
eventually but I suppose if startup performance was a real issue...
Cheers,
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Yes where in the code to load it, and how would i phrase if for my C++ compiler to pull it up in the app window?
Michael
(Up and coming Game programmer)
EST
|
|
|
|
|
If you want to eneter bitmap on the resource then you can use of CBitmap::Load for load it.
|
|
|
|
|
So you want to load it and display it?
Loading can be done any time, usually before whe window that will
display the bitmap gets its first WM_PAINT message.
Displaying should be done in response to WM_PAINT.
How you load the bitmap depends on where it's stored and what format it's in.
Displaying the bitmap depends on what format you load it in.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I dont know is this your question you can enter code of bitamp on the source code of your project.
|
|
|
|
|
Really i need the starting of the script to add the bitmap and to know where to add it to the exe file format. But the information given already give me and idea. < might be a bad idea but worth a try>
Hamid. wrote: I dont know is this your question you can enter code of bitamp on the source code of your project
Michael
(Up and coming Game programmer)
EST
|
|
|
|
|
You can import bitmap file to resource of exe file but here a problem that it increase size of exe file but you can load bmp of a foreign file but it depends to your program after select way if you have any question you can ask of me.;)(but I dont know why I got vote 1 on previous reply)
|
|
|
|
|
In my opinion, C++ was one of the best languages
ever developed, with perhaps the exception
of Forth, but, my recent experience
with the VC++, has left me wishing that
there was some intergalactic force that
would bring justice to the MS clan.....
LFI4DST
|
|
|
|
|
I agree. Now please give me a link to your solution that is superior so I can start using it.
|
|
|
|
|
|
essentially, in the early 90's C++ was standardized
over most platforms - closely enough that going
from one compiler to the next was a reasonable
option and C++ resources worked fairly uniformly -
There is so much unique to .net now ( and I'm
still not really sure what that it )
and so much unique to the environment that
it's hard to know - what is right and
wrong - as far as approaches to problem
solving ------
It's more of a personal thing I think sort of
a nostalgia mostly -
I mean in the 90's there were still people
around who thought that C++ was a mistake -
and that C was really the best way to go ....
But - it's about writting code - that can
hang in there ....
I mean - there's also the group that says -
heh ------- we don't need no stinking C++
because Java is okay for everthing -
It's really mostly nostalgia .....
|
|
|
|
|
|
Hamid. wrote: And your question?
is still a question?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
You know, I didn't realize that the nature of
this board was mainly questions and answers -
So I guess I made an inappropriate entry -
My last word is this however -
I think that what VC++ today is really
a dialect of C++ ( i believe )....
And I think that's an important point of view -
since there is such a huge amount of C++
floating around ....
And I guess from my point of view it's kind of
sad that the language has become this fragmented.
Sorry ...........
|
|
|
|
|
marc.bellario wrote: there was some intergalactic force
hope they arrive soon.. i am fed up of process!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hey guys,
I encountered this code at one great CP article.
BOOL CAESEncRegKey::SetKey(const BYTE *cbKey, UINT nLength)
{
BOOL bResult = FALSE;
ASSERT( CryptoPP::AES::DEFAULT_KEYLENGTH == nLength );
ASSERT( NULL != cbKey );
if( CryptoPP::AES::DEFAULT_KEYLENGTH == nLength && NULL != cbKey ) {
_EncKey = cbKey;
bResult = TRUE;
}
return bResult;
}
I just wonder whether rewriting it in the following style, looks better ?
BOOL CAESEncRegKey::SetKey(const BYTE *cbKey, UINT nLength)
{
if( CryptoPP::AES::DEFAULT_KEYLENGTH != nLength || NULL == cbKey )
{
ASSERT(FALSE);
return false;
}
_EncKey = cbKey;
return true;
}
What do you think ? Any comments..
-- modified at 15:08 Thursday 4th October, 2007
|
|
|
|
|
more efficient ? probably not; it's basically the same code, keep in mind that in the debug version, the first version will do additional comparisons, but we really don't care about efficiency in debug version.
more readable ? who can say ? is it tomato or tomato ?
|
|
|
|
|
which one do you like more ?
just asking..
|
|
|
|
|
I bet most will like the first better.
One exit point.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi Mark,
Mark Salsbery wrote: One exit point.
Can you give an explanation why is that good?
thanks
|
|
|
|
|
When debugging, you only have to set one breakpoint. Otherwise, you have to set one on each return statement.
With older compilers, if you returned from a function that was in the middle of a for /while loop, the stack was not properly cleaned up. That's not the case anymore.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
>> "When debugging, you only have to set one breakpoint. Otherwise, you have to set one on each return statement."
That's valid. But in this case, ASSERT's help.
|
|
|
|
|
bigdenny200 wrote: Can you give an explanation why is that good?
Don't tell him unless he knows the secret handshake
|
|
|
|
|
Hehe just in time....I was just about to reply!
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|