|
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
I'm using Visual C++ 6.0 - basically new to MFC programming
I don't understand the difference between
MessageBox()
and
AfxMessageBox()
Don't they both do the same thing?
Thanks ahead of time
|
|
|
|
|
AFAIK, MessageBox belongs to Windows API
AfxMessageBox is a global function in MFC.
There could be other differences as well relating with the parameters being passed to the function and the way they are implemented.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
Sorry pal, you are being down-voted (includes my vote) for linking the OP to a website that requires a paid membership.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Not if you scroll all the way down it doesn't...
Iain.
Plz sir... CPallini CPallini abuz drugz, plz plz help urgent.
|
|
|
|
|
I know that you could scroll all the way down and get the answer, or you could use Google's cache, but for once, that website sucks. I at least said why I was down-voting.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
He could see answers I saw those answers they are at the bottom of site,and it was his answer exactly,but I think this vote wasnt becoming for my answer.
|
|
|
|
|
Please see my reply to Iain.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
It's a little more subtle than you think.
There are THREE message boxes.
::MessageBox - the windows API function. The others end up wrappers around this, so it's good to read the docs fully for all the flags (esp DEFBUTTON2, as it can be handy!)
CWnd::MessageBox - This uses the CWnd you're calling it from (maybe this , maybe some other window - up to you) for the window handle. It also provides defaults for the title and flags.
::AfxMessageBox - gives you defaults also, but uses your MainWnd as its parent window.
The last two are fairly similar, but you can end up with odd situations where you don't want a disabled or hidden window being a parent etc.
Shorter answer: Near as dammit the same thing, but not quite.
Iain.
Plz sir... CPallini CPallini abuz drugz, plz plz help urgent.
|
|
|
|
|
|
Dear Friends,
I want to delete a file which is used by other application.
When I try to delete that file,it shows error as
"Cannot delete file: It is being used by another person
or Program.Close any programs that might be using the file
and try again."
On searching Google, some utility programs like "Unlocker" does this.
But I am in need of the code just only to unlock the file
and delete it.
Could anyone help me out please?
Thanks
|
|
|
|
|
What file that you want to delete ir depends to OS or other programs?
|
|
|
|
|
Not OS locked.
The file is "*.tds" file generated by
Borland C++ (bcc32.exe) compiler.
|
|
|
|
|
you can use "Process Explorer[^]" to find which application/process/thread uses the file (then up to you to kill it or not)
|
|
|
|
|
I think he's looking for a way to achieve it programmatically.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
i read and reread his post again, and still not sure about that
maybe a reply will guide...
|
|
|
|
|
poda wrote: But I am in need of the code just only to unlock the file
and delete it.
The quote is from the original message. I think the badly formatted message makes it difficult to read.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Yes I want to do it programatically.
When we compile and link a project,the compiler will
generate many files(like obj,map,ils,tds etc).
One of them is .tds file.
But this file is 'hold' by the IDE of Borland C++.
How to release this 'lock' so that it can be deleted.
|
|
|
|
|
i don't know borland, but maybe if you just close the IDE, it will release the file, won't it ?
|
|
|
|
|
Ofcourse,it will release the file.
But I will use the linker to create DLL as
a separate process for which the .tds file has
to be deleted when the IDE is open.
I need to know to how to release or unlock a file
which is holding by a application.
Thank you
|
|
|
|
|
Hi,
I want to communicate with a USB device from my PC by using Visual C++.The device is a RF-ID.So I do not need to transfer large files, I only need to read the ID from RF-ID. How can I do that simply? I search the web some but the sources that I found are more advanced than I can understand. Can you seggest me a simple way because I am not much experienced?
Thanks for any help
ibrahim
|
|
|
|
|
I think you'll get more help here [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
You have to get a handle to the driver that is supplied with the USB device (using CreateFile). Then you can communicate with the driver using WriteFile and ReadFile. For more advanced stuff, you can then use DeviceIOControl. Anyway, all of that should be documented with the device. You also need to have the device driver.
|
|
|
|
|
Firstly I have not the control codes for the device. I am understanding that I should want the control codes from the producer company?
And If I know the contol code how can I use it?
|
|
|
|