|
Hi,
Thanks, i found out wht that error occurs.
The Problem is due to the buffer size which i declared to store the path.
Thanks for your solution.
|
|
|
|
|
Hello there - I need to know that how can i get WM = Window message when user drag and drop a file on msn chat window(ideally any messenger window).
I have hooked WM_DROPFILES message system wide by using SetWindowsHookEx() function. It works fine for all other application like notepad, MS word. But not working with messengers.
Hopelessly waiting for any response.
Thanks in advance.
Sohaib
|
|
|
|
|
Hi
I am developing a module of software in which I have to find out the source and destination paths of files and folders when they are being copied from one location to another.
|
|
|
|
|
MsmVc wrote: I am developing a module of software in which I have to find out the source and destination paths of files and folders when they are being copied from one location to another.
ICopyHook COM interface is one option, but not sure if it catches file copying using dos commands.
Nibu babu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
Thx's for reply but i am useing MFC Application and idon't know Com.So plz help me in MFC
|
|
|
|
|
|
i don't want to use COM becouse i am useing MFC.And i hope it will create more problem step by step.So i think MFC is a better way to go for this project...
Plz help me
|
|
|
|
|
To answer your query, with MFC alone, you cannot do something like that. And ICopyHook as such does not work with files, but only with folders. So you'd better off be doing a little more research on it.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Can you tell me what you want to say?Which type and which direction i do research..
|
|
|
|
|
|
I think you are creating new ID and asking same question again.
Regards,
Sandip.
|
|
|
|
|
What
creating new ID and asking same question again .?Sorry i am new..
|
|
|
|
|
MsmVc wrote: Sorry i am new
so, check this[^] before asking any more things
|
|
|
|
|
|
MsmVc wrote: ...when they are being copied...
Using what?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Files and directory name and source to destination path..
|
|
|
|
|
How does this answer my question?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hello
I use Drawtext() API to Write The text into the BMP Picture.....
Now I want To know Is There Any API To clear That Text Into The BMP....
Please Suggest....
///CODE TO Draw Text
GetClientRect(GetDlgItem(ts.hWnd, IDC_STATIC_BMP1), &r);
hdc = GetDC(GetDlgItem(ts.hWnd, IDC_STATIC_BMP1));
SetBkMode(hdc ,TRANSPARENT);
SetTextColor(hdc , RGB(0,0,0));
DrawText(hdc , szTempBuffer, -1, &r , DT_SINGLELINE | DT_CENTER | DT_VCENTER);
|
|
|
|
|
Aabid wrote: Now I want To know Is There Any API To clear That Text Into The BMP....
There is nothing like an API for this, you've got to devise logic for this purpose, probably invalidate that region where the text is printed. Or probably set the text color (Dc.SetTextColor()) to background color and then print the text again. Don't forget to test this well cause there may be cases where the edges of text are still visible.
Some other options that came to my mind is to use FillSolidRect/FillRect with background colors, but then there will be problems when you have gradient backgrounds.
Nibu babu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
modified on Tuesday, August 26, 2008 6:54 AM
|
|
|
|
|
What are you trying to do? (probably double buffering is the answer to your problem)
|
|
|
|
|
Hi all,
I have two classes one which is derived from CFormView and other which is derived from CWinThread. I want to pass calculated values from CWinThread derived class to the Class derived from CFormView Class. Now, what i wanted to know is that should i use SendMessage() API or PostMessage() API,to pass the values....
Thanks in advance
|
|
|
|
|
VCProgrammer wrote: Now, what i wanted to know is that should i use SendMessage() API or PostMessage() API,to pass the values....
Depends on your need and way you are passing it?
If you want to immediately return after notifying user of some event then you can use PostMessage also then make sure that you don't pass UDT's that are on stack, but native local variables are safe since they will be copied.
SendMessage blocks so that's synchronous, won't return unless the message is processed.
Nibu babu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
When SendMessage() is called, it doesn't return until the target window has processed the message. However when PostMessage() is called, it returns and doesn't wait for the target window to process the message. Therefore it depends whether you want the calling function to have a value returned or not - if so, SendMessage() is more appropriate, if not, then PostMessage() is more appropriate.
Regards,
--Perspx
"The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia
Introduction to Object-Oriented JavaScript
|
|
|
|
|
Since the sender is derived from CWinThread I assume that you want to send/post a message from a different thread than the supposed receiver is running in. Correct?
Like others already have advised, SendMessage() blocks until the message has been handled, as PostMessage() returns without waiting for the receiving thread.
The answer depends on your situation.
In case you are using different threads you'll have a potential deadlock situation if you're using SendMessage() , which you avoid completely by using PostMessage() .
On the other hand, since PostMessage() doesn't wait for the message to be handled, you won't get any result from the message handler.
What you could do is use SendMessageTimeout()[^] that will in case of a deadlock situation only lock the system for as long as you've set the timeout to be.
For more info on how to use threads and potential deadlock situations, read this[^].
I would suggest a queue between the threads where you queue your calculated values.
You could post a message to the receiver when you've added a new block of values to the queue.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Hi,
I want to develop a window desktop application which is capable of screen capturing.
Can I get any application related to it.
Thanks
dhiraj Kumar saini
|
|
|
|