|
Hunh. That's odd - usually, I only open my mouth to change feet.
L u n a t i c F r i n g e
|
|
|
|
|
See here.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hello Friends
In Mfc what is the differents between post message and send message....
explain post message and send message....Plz
Best Regard's
Mathy's
|
|
|
|
|
The SendMessage call doesn't return until the target window has handled the message you've sent it.
The PostMessage call puts the message in the thread's message queue and returns immediately, before the message has been handled.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
CodeProject MVP for 2010 - who'd'a thunk it!
|
|
|
|
|
where is to be used....... in MFc
Best Regard's
Mathy's
|
|
|
|
|
What do you mean by that exactly?
SendMessage and PostMessage can be used in MFC, but generally you'll use an MFC class's methods to hide those calls.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
CodeProject MVP for 2010 - who'd'a thunk it!
|
|
|
|
|
mathy wrote: In Mfc what is the differents between post message and send message....
While SendMessage() and PostMessage() can be used within MFC code, they are not related. They are from the Windows SDK.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Another interview question? Don't accept an offer from that place!
|
|
|
|
|
How COM Object gets removed from the memory?
Suppose there are 4 clients using our COM Component, One by One they goes out of scope ..At which point the component knows that it has to unload from memory.? Once the COM Object's reference count reached to zero then at this point which mechanism works to remove it from the memory.
Thanks
|
|
|
|
|
Do u mean the interface count?
if so then [^]
Величие не Бога может быть недооценена.
|
|
|
|
|
The COM object's 'Release' method would call delete this; when the reference count is zero to delete itself.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
CodeProject MVP for 2010 - who'd'a thunk it!
|
|
|
|
|
pandit84 wrote: Once the COM Object's reference count reached to zero then at this point which mechanism works to remove it from the memory.
It is a responsibility of the COM object developer. When the reference count goes to zero then there are no references pending on the object (probably there aren't...: the reference count is shared mechanism of both the COM server and the client) and the object may choose to free its COM resources (as it usually do).
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
[My articles]
|
|
|
|
|
Thanks a lot for your great reply
|
|
|
|
|
You are welcome.
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
[My articles]
|
|
|
|
|
now, i simulate one desktop.
After i clean the full rubbish, which message is sent to the desktop for notifying you to change the icon of rubbish.
thank you very much.
|
|
|
|
|
It has always been called as recycle bin.
People may not understand you if you call it by other names.
Anyway, try doing an invalidate on the desktop.
|
|
|
|
|
Hi,
I have a file which is in binary mode.(I am using stdio functions fwrie,fread,fseek)
I have to read this file in binary mode and needs to replace some of the bytes in this file.
It contains around 1000 entries with 2 bytes each.
I know the location of bytes which is to be changed, like 100th entry.
Is there anyway to change that specific bytes, without copying in to other file.
As I have small memory I can not copy into other file and recopy with changed bytes.
So on the fly i want to change specific bytes.
please tell me if any method is there to do this.?
Regards,
Sunil Kumar
|
|
|
|
|
You may open the file for read/write (i.e. "r+" ) go to intended position with fseek and change the byte content with fwrite .
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
[My articles]
|
|
|
|
|
yeah.i've used the same thing.But that is not working.
Regards,
Sunil Kumar
|
|
|
|
|
My code (beware: error checking omitted for concision)
FILE * fp = fopen("foo.bin", "rb+");
fseek(fp, 10, SEEK_SET);
fwrite("#", 1, 1, fp);
fclose(fp);
is working fine.
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
[My articles]
modified on Friday, January 22, 2010 6:43 AM
|
|
|
|
|
Except that for binary you could do a "rb+".
|
|
|
|
|
Oh, thanks...
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
[My articles]
|
|
|
|
|
did you remember fflush() the buffers?
|
|
|
|
|
As superman's said elsewhere in this thread, use binary mode when you open the file, using
FILE * fp = fopen("foo.txt", "rb+");
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
CodeProject MVP for 2010 - who'd'a thunk it!
|
|
|
|
|
I am doing an application where i am writing something to an excel sheet. Initially i am writing into 2 rows and coloums. i have the heading and then the values and then closing the file. Now at a later point of time i need to open the same file and append. starting writing from the third row. How can i do that?
|
|
|
|