|
Do you know what a message queue is?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
It is a thread specific message queue for GUI/non-GUI application. It stores the messages post by system or some other application.The thread retrieves the messages from its message queue using GetMessage or PeekMessage .If i m wrong somewhere pls rectify it.
never say die
|
|
|
|
|
The MSDN is somewhat misleading in that it states: "directly calls the WndProc"
This is only true if the window belongs to the same thread executing SendMessage()
In other words... if Thread1 executes SendMessage() to a window it owns, the WndProc is directly executed.
If Thread1 executes SendMessage() to a window owned by Thread2, the message is placed into a seperate que. This special que contains messages of extreme high priority. This que is not the same as the standard message que.
Hope it helps,
-Randor (David Delaune)
|
|
|
|
|
Thanks a lot
never say die
|
|
|
|
|
Hi All,
I want to insert smiley faces in the Rich Edit Control (like Yahoo Chat)...can anyone help me in this issue..
just tell me how to load the smiley and display it in the Rich Edit control.
Thanks in advance,
Shiva
|
|
|
|
|
Said smiley face is a graphic, so you'll need to load it like any other graphic, or from the clipboard.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi all,
How can I increase/decrease the size of the property page?
Thanks in advance
- NS -
|
|
|
|
|
There are several article here to solve this problem.
Greetings from Germany
|
|
|
|
|
NS17 wrote: How can I increase/decrease the size of the property page?
The size of the sheet is governed by the size of the smallest and largest pages.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I use a customized tab in the property sheet. I need to extend the page to the border of the tab control. That is what I actually needed.
FYI: I solved the issue by handling the WM_WINDOWPOSCHANGING in the page.
But this solution has disadvantage that i need to do it in all the pages.
- NS -
|
|
|
|
|
And why dont you make a generic function using the identifier of the sheet as parameter? and then call the function changing the parameter when a sheet is becoming visible.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
I am sorry. I didnt get you.
- NS -
|
|
|
|
|
If your problem is that you have to change the size in every sheet. Insteads of coding one function per every sheet, you can make it with just a function and calling it when a sheet changes before the datas are shown.
To do that, you can take a pointer/handler to every sheet and give it as parameter to the function. Then code the change of size to the concrete sheet.
for example:
void ChangeSheetSize (CWnd* pWnd)
{
}
CPropertyPage::OnSetActive ()
{
CWnd* pWnd = GetActiveWindow ();
ChangeSheetSize (pWnd);
}
Im not sure if there is a better way, but I think it can work
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
I did not tried it, but it should be done in each page. I was seeking for a solution, that is independant from page. Means it should be done in the sheet or elsewhere, so that no repeated coding is needed.
- NS -
|
|
|
|
|
With the idea I gave you, the only lines of code you should repeat are:
CPropertyPage::OnSetActive ()
{
CWnd* pThisPropPageWnd = GetActiveWindow ();
ChangeSheetSize (pThisPropPageWnd);
}
The function of changing size needs to be written just once. In the parent window/view that is containing the different property pages.
so it should be somthing like:
pParentWnd->ChangeSheetSize (pThisPropPageWnd);
But... I'm not 100% sure about.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
NS17 wrote: I use a customized tab in the property sheet. I need to extend the page to the border of the tab control.
Sorry, but I'm not following.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Actually there is a little gap ( approximately 3 pixels ) between tab control border in the property sheet and border of property page. So I need to enlarge the property page to fit to the tab control borders.
Hope you got what I meant.
- NS -
|
|
|
|
|
NS17 wrote: So I need to enlarge the property page to fit to the tab control borders.
So enlarge it in the resource editor. What's hard about that?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
But tab control size is managed by the property sheet, right? So always there will be a gap between the tab controls' border and that of page...
- NS -
|
|
|
|
|
NS17 wrote: But tab control size is managed by the property sheet, right?
See here.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
When using ioctl() to set SIO_RCVALL in order to be able to use recvfrom() to "sniff" all incoming and outgoing packets, will TCP packets already be "ordered (arrive in same order as sent)" and and reliable in the sense that a copy of an already received packet can arrive at a later time?
Or does SIO_RCVALL hook the packets before the tcp implementation have done its work, and you have to do this ordering and detecting dupes yourself?
Thanks
|
|
|
|
|
Hi guys,
I've got some problem with C++/MFC application. Now I would like to put the blank line in excel between different date.
I already done to create output Excel file. In my file is -
//create the time object
CString strTime = now.format (_T("%d/%m/%y %H:%M%S"));
CString str;
str.format ( _T("%s, %s, %s, %s, %3.0lf%%, %s \n"), lesson, s, sentence, attempt, score, strTime);
m_file.WriteString (str);
the strTime is to display the current time. I want to do when the datetime column is differnent data, just put the blank line.
example line -
RSVP-test-1 username The sentence The sentence 100% 18/09/07
RSVP-test-1 username The sentence The sentence 100% 19/09/07
Can anyone help me ?
|
|
|
|
|
tunminhein wrote: I want to do when the datetime column is differnent data, just put the blank line.
Can't you just add another '\n' to str ?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi David,
very useful answer. but I don't want to get gap line every line.
just want it, when the date time is different.
Thank you very much
tunminhein
|
|
|
|
|
Obviously you'll need to compare the previous time with the current time and only add the extra '\n' when they differ.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|