|
Thanks man I'll try that. It sounds to be exactly along the lines of what I want.
<sigh> if only MSDN told me that
: Wherever you go, there you are, and you wish you were somewhere else :
|
|
|
|
|
Hi,
I am using Bitmap::FromFile(szFileName, ColorFlag)
How can you tell whether the load from file was sucessful?
Thanks
Rich
|
|
|
|
|
I'd presume the pointer returned is NULL.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
That's what i assumed but it ain't! Reckon the GDI+ documnetation is well poor, for such a crucial new technology, put my comments to the Microsoft on the "Tell us what you think link". It'll be interesting to see if i get out back.
|
|
|
|
|
Use GetLastStatus, it will tell you if the last action returns Ok or Fail.
I agree - the docs have a long way to go.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
I Detach() an async socket in CAsyncSocket::OnClose(). When the connection is broken by the remote host, it works rather well. But when I close the connection manually by CAsyncSocket::Close(), the callback function OnClose() will not be called, and Detach() will not be called either. I tried to call Detach() soon after my call to Close(), an ASSERTation was the result. Detach() befroe Close() doesn't work either. What should I do to release the handle of this CAsyncSocket and reuse it with lose of resources again? Thanks for your help.
Tiny Flying Elephant
I love flying...
|
|
|
|
|
I was asked by a friend of mine what would happen if someone put this code into the onpaint() function of a program.
((word)-1);
I tried it and got nothing. Is nothing supposed to happen?
|
|
|
|
|
You create a variable, and don't use it or store it, so it immediately goes out of scope. No, nothing should happen.
I dunno what word is though, do you mean WORD ? WORD is an unsigned short, but the cast would make the -1 equal the highest possible value for a WORD, which is 65535. That's because signed values use the high bit to switch between +ve and -ve.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
Thanks Christian, I appreciate it.
|
|
|
|
|
I created a browser using CHtmlView and I want to know how can I override the IE Download Dlg to my own one ?
BLaZiNiX
|
|
|
|
|
How do programs get new versions of themselves from the internet and automatically upgrade themselves? Isn't the .EXE protected from being overwritten? How can your program change itself if it is running? Oh the questions...
-Jason
nirgle.bitdevil.com
SonorkID: 100.12194
|
|
|
|
|
It's Easy, you need a Program that Check the Versions That you are running
with the Version in the Server...
I do this...
When you start your application, you start the versionchecker,
If the Version in the server is greater than your App version, this program down the new version, and run the app in your machine, if the verision that you have is the same, directly run the app in your machine... It's Easy
Best Regards!!!
I and CP Hip!!! Sorry
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
Such an obvious and simple solution that I never even thought of it
Thanks!
- Jason
SonorkID: 100.12194
's your uncle
|
|
|
|
|
Hmm... how about the uninstall program deleting ITSELF??? OH! Hit me with another under-my-noser.
- Jason
SonorkID: 100.12194
's your uncle
|
|
|
|
|
LOL... but the solution exists. There's an auto deleting .exe sample here at CodeProject or CodeGuru (don't remind exactly).
It's a recent article I saw in december or November.
Yarp
|
|
|
|
|
What are .make/.mak files for??? I always saw them in some c/c++ project but i have no idea what they are actually for, can anyone explain?
Kuniva
--------------------------------------------
God gave man a penis and a brain but not enough blood to make both of 'em work at the same time.
|
|
|
|
|
if you've ever done ANY C++ programming outside of VC then you'll know all about makefiles.
They are the text-based equivalent of your project options. They tell the compiler (gcc/++ in most cases) what files to compile and how to compile each one, etc etc
: Wherever you go, there you are, and you wish you were somewhere else :
|
|
|
|
|
Does anyone have a solid example on how use SendInput(). All the examples that are out there, are in VB.
Also, see my memcpy() statements. Am I copying a structure into a structure of a structure properly?
<br />
BOOL fNumLockState;<br />
BYTE keys[255];<br />
INPUT inp[2];<br />
KEYBDINPUT kbi;<br />
<br />
<br />
GetKeyboardState( keys );<br />
<br />
fNumLockState = keys[VK_NUMLOCK];<br />
if( !fNumLockState )
{ <br />
kbi.wVk = VK_NUMLOCK;<br />
kbi.wScan = 0;
kbi.dwFlags = 0;
kbi.time = 0;
kbi.dwExtraInfo = 0;
<br />
memcpy( &(inp[0].ki), &kbi, sizeof(kbi) );<br />
inp[0].type = INPUT_KEYBOARD;<br />
<br />
kbi.dwFlags = KEYEVENTF_KEYUP;
<br />
memcpy( &(inp[1].ki), &kbi, sizeof(kbi) );<br />
inp[1].type = INPUT_KEYBOARD;<br />
<br />
if( SendInput( 2, inp, sizeof(inp) ) != 2 )<br />
{<br />
TRACE(_T("SendInput error [%d]"), GetLastError() );<br />
} <br />
} <br />
Marcus
Make no little plans; they have no magic to stir your blood to action. Make big plans, aim high in work and hope
-- Daniel Burnham
|
|
|
|
|
figured it out...
the line:
if( SendInput( 2, inp, sizeof(inp) ) != 2 )
should be...
if( SendInput( 2, inp, sizeof(INPUT) ) != 2 )
Marcus
Make no little plans; they have no magic to stir your blood to action. Make big plans, aim high in work and hope
-- Daniel Burnham
|
|
|
|
|
Hi, i need the function to get a machine's ip address. I remember there was a simple function for this without MFC allthough it doesn't really matter if its with MFC or not. I just forgot it and cant find it anymore. So i'd be thankful if someone could tell me. Many thanks.
Kuniva
--------------------------------------------
God gave man a penis and a brain but not enough blood to make both of 'em work at the same time.
|
|
|
|
|
Someone post this link in another post.
Jon Sagara
What about ?
|
|
|
|
|
gethostbyname()
"Needless redundancy is the hobgoblin of software engineering." - Peter Darnell
|
|
|
|
|
erh... this is gonna sound silly but how do i convert a const char* to a CString??? I guess working with CStrings all the time has kind of killed my knowledge of chars and pointers...
Thanks again for your answer.
Kuniva
--------------------------------------------
God gave man a penis and a brain but not enough blood to make both of 'em work at the same time.
|
|
|
|
|
CString strText;
strText.Format(_T("%s"), szString);
Marcus
Make no little plans; they have no magic to stir your blood to action. Make big plans, aim high in work and hope
-- Daniel Burnham
|
|
|
|
|
or more simply....
CString strText(szString);
John
|
|
|
|