|
There can be many uses.
One such use is for simple interprocess communication like sending a WM_CLOSE message to an external application.
Another frequently used scenario is when you declare your own custom messages like WM_USER + 1 or WM_APP + 1 .
|
|
|
|
|
|
PostMessage places a message in the window's message queue and then returns without waiting for the corresponding window to process the message.
The SendMessage function calls the window procedure directly and does not return until that window procedure has processed the message.
--
"Programming is an art that fights back!"
|
|
|
|
|
as others wrote ist right.
I use PostMessage more for better user experience because it is non-blocking.
SendMessage only for critical message. It works like a callback.
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
Hi,
I want to devlop cutom radio button with images. I have two images. One is selected image and othe is unselected. I want to put those image on the radio button on their particular state(Selected and deselected). Can anybody help me how to achive this ?
Thanks
|
|
|
|
|
|
You might need a third image for focused state (maybe even four, one for focused /selected and one for focused/unselected)
|
|
|
|
|
Hi,
Could u please send me sample code.
|
|
|
|
|
But of course! Check this[^] out!
|
|
|
|
|
I didn't find any help from this link. As radio button doesnot support OwnerDarw, its difficult ot custumize it. I already drived one class from CButton nad wrote some code on OnCreate function. Now I want to put some image on the radio button. Can u please help me in this regards..
Thanks...
|
|
|
|
|
Hi,
VC++ 2008
The following function will return false because the registry path contains space between 'Windows' and 'NT':
BOOL OpenKey()
{
HKEY hKey = NULL;
hReg = RegOpenKey (HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows NT\\Whatever", hKey);
if (hReg != ERROR_SUCCESS)
return FALSE;
}
Google failed me, any work around? thanks
|
|
|
|
|
From MSDN:
This function is provided only for compatibility with 16-bit versions of Windows. Applications should use the RegOpenKeyEx[^] function.
Are you programming 16 bit Windows?
|
|
|
|
|
WOW, I really need to visit an eye doctor, that did the trick, thank you very much
|
|
|
|
|
Being slightly cynical the function will return FALSE as the only line with return on it is return FALSE;
Cheers,
Ash
|
|
|
|
|
pubis wrote: HKEY hKey = NULL;
hReg = RegOpenKey (HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows NT\\Whatever", hKey);
if (hReg != ERROR_SUCCESS)
return FALSE
why don't you utilize CRegKey class for handlling registry operation!
"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
|
|
|
|
|
If RegOpenkey() fails, the return value is a nonzero error code. So what value does hReg have?
"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
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
I have a the following string "568" and 568(which is int), how memory is allocated for them internally... can any one please help me regrding this...
Thanks in Advance...
|
|
|
|
|
The language provides the sizeof operator [^], please use it.
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]
|
|
|
|
|
Pardhu2 wrote: I have a the following string "568" and 568(which is int), how memory is allocated for them internally... can any one please help me regrding this...
if it string,it would 1 byte per char!
if it int, it would be 4 byte per variable!
Shoot me down, if i am wrong!
"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
|
|
|
|
|
ThatsAlok Shoot me down, if i am wrong!
say where and when.
ThatsAlok if it string,it would 1 byte per char!
1 or 2 bytes per character, also counting the terminating null.
|
|
|
|
|
C++ string literals (like to one of the OP) have 1 byte per character (wide character string literals must be L prefixed).
They include, as you stated, a terminating 0 .
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]
|
|
|
|
|
In its simplest (ASCII) form the string "568" will allocate one byte per character and a null byte to signify the end of the string, giving a total of four bytes. If the string uses Unicode encoding then two bytes per character are allocated. If MBCS UTF-8[^] then it may be more than two per character.
An integer will be stored as 16, 32, or 64 bits depending on the type of variable: short, int, long, long long etc.
It's time for a new signature.
|
|
|
|
|
Hi,
How to create dynamic single and multiple arrays in C++.
|
|
|
|
|
I would suggest you to use a vector.
vector<int> v1;//single array of integers
vector< <vector<int> > v2;//2-dim array
<div class="modified">modified on Sunday, June 13, 2010 3:38 PM</div>
|
|
|
|
|
If you mean dynamically allocated memory then please read the new operator documentation [^].
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]
|
|
|
|