Cross thread messaging

I'm sending a message from a worker thread to a UI thread in the same 
application using ::PostMessage.  Although the sending thread only sends the 
message once the target window (CListView derived) is receiving the message 
twice.  Using Spy++ only shows the message being sent once.  Anybody have any 
ideas?  Thanks
-- 
Coadtoad
0
Coadtoad (1)
3/8/2005 11:31:03 PM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
522 Views

Similar Articles

[PageSpeed] 18

Not possible. I've never seen this. What is your evidence that it is being received twice?
Since Spy++ is showing not the sending of the message, but the receipt of the message, if
it only shows one receipt of the message, you are only getting it once (Spy++ has no idea
how to show the sending of a message at all; it can only show receipts of messages, and in
the case of SendMessage, the reply of the message. That's all).
				joe

On Tue, 8 Mar 2005 15:31:03 -0800, "Coadtoad" <Coadtoad@discussions.microsoft.com> wrote:

>I'm sending a message from a worker thread to a UI thread in the same 
>application using ::PostMessage.  Although the sending thread only sends the 
>message once the target window (CListView derived) is receiving the message 
>twice.  Using Spy++ only shows the message being sent once.  Anybody have any 
>ideas?  Thanks

Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15974)
3/10/2005 3:29:39 AM
Reply:

Similar Artilces:

Creating Cross-Project Links
Hi 1). What is the usage of Creating Cross-Project Links ? As I understand, "Cross-project links are useful when two or more projects have only a few tasks that affect one another. For example, a milestone within a development project might trigger a task in an advertising campaign project." 2). How it is implemented in Project 2007 ? When I copied the task from the source project into my project ( target project ) using "Paste Special", the new task I created become another task in my target project. My observation is both task ( ie. task in the source...

sending message to the thread?
Which one is the most appropriate to send message to the specified thread PostThreadMessage PostMessage SendMessage SendMessageTimeOut Is there any one can explain this ? Please help us... Thanks.. Rider wrote: > Which one is the most appropriate to send message to the specified thread > > PostThreadMessage > PostMessage > SendMessage > SendMessageTimeOut > > Is there any one can explain this ? > Please help us... > Thanks.. > If and only if the destination thread creates no windows then PostThreadMessage is appropriate. If it does display any kind of...

Exchange 2000
I have an Microsoft Exchange 2000 Server. When you try to send any email to any AOL email address, the message remains in the SMTP Queue "aol.com (remote delivery)". No other email recipients are having this problem, only the AOL accounts. Any idea on what is causing this? do you have a revers DNS record reated on the inernet for your mail server? if you dont this is probably why "Shawn Chenault" wrote: > I have an Microsoft Exchange 2000 Server. When you try to send any email to > any AOL email address, the message remains in the SMTP Queue "aol.com...

Customer Cross Reference
2nd Request - Posted a few Months Ago, No Reply --------------------------------------------------------------------------- Has anyone out there used the Customer Part Number Cross Ref v8.0? I loaded a customer list the other day. When I entered the Customer Number on the Sales Order, it was instantly converted over to our number. Worked Great... I'm wondering if there is a way to automatically reference the original Customer Number on the Packing List and/Or Invoice or is that something that needs to be manually typed in. I tried adding notes, but I don't know if they carry down...

Compacting messages in OE wipes out most inbox messages
I'm on OE6, XP sp2. It asks to compact every so often. I stopped using it because new messages get lost in OE when I compact. Extremely annoying especially if I hit yes to compact by accident. WTF Microsoft?? -S "SimonLW" <nospam@donet.com> wrote in message news:44be58ec$1_2@newsfeed.slurp.net... > I'm on OE6, XP sp2. It asks to compact every so often. I stopped using it > because new messages get lost in OE when I compact. Extremely annoying > especially if I hit yes to compact by accident. WTF Microsoft?? > -S > are you stopping the compacting...

Error Message #94
We run Outlook Express on several machines. In the case of two machines just updated with XP SP-2, and running the latest and greatest version of Outlook Express, we get an error message, "Either there is no default mail client or the current mail client cannot fulfill the messaging request.". Outlook has never been activated on these machines, and Outlook Express is definitely set as the default mail client. A search of the web reveals only instructions for deleting a key from the registry for Outlook and to run Detect and Repair, but we are not running Outlook, and OE does not ...

Cross table
Hi everybody !! i come again here with a problem i can seem to solve :s i hope someone will be able to give me a hand on this... here it is : i have a sheet with 2 rows: location and activity. several activities can be found in one location, even several of the same activities. schematic exemple location activity 1 A 1 B 2 A 3 A 3 B 3 C 4 B 4 C I would like to create something that give me as a result a sheet where we can see the spatial relations between the activities. so i would have all...

Can't add message handler for WM_INITDIALOG
In VS6 there was a tab in Class Wizard "Class Info" that allowed you to change the message filter. I can't find a similar option in VS2005. I'm trying to add a handler for WM_INITDIALOG but it does not appear in the list in the property page for my dialog. How do I get it? Thanks, Drew On Thu, 17 May 2007 16:13:35 -0500, "Drew" <dam@dam.dam> wrote: >In VS6 there was a tab in Class Wizard "Class Info" that allowed >you to change the message filter. I can't find a similar option in >VS2005. I'm trying to add a handler for WM_...

No "Move Mailbox" cross site migration
Hi everybody: We have a forest with subdomains, the main domain is AD 2000 and has 1 Cluster Exchange 2003 SP1, 1 Server Exchange 2003 SP1 with ADC SP1 and SRS, and 3 Exchange 5.5 in the same Exchange 5.5 site. We have 8 subdomains in AD2000 with Exchange 5.5 SP4 server with hotfix applied for cross-site in each subdomain, and they had an own site in Exchange 5.5. We are trying to consolidate and move all mailbox and public folders to the Exchange 2003 cluster, we did the domainprep in each subdomain and create a RUS in the Exchange 2003 cluster to each subdomain. When we tried to move cros...

Outlook 2002 doe not deliver, shows messages being sent...
I intermittently get the following when trying to send out messages: "The recipient was unavailable to take delivery of the message" with a reference to our domain ending with "3499 Host unreachable". I've looked everywhere for help but cannot find anything. I installed SP1 for Outlook 2002, no luck. Note: it is NOT consistent. Sometimes things actually get sent. ...

cross-reference
I created a cross reference in word to a section of my document that has a heading of 'Heading 3' I used Heading for the reference type and for Insert reference to I used Heading Number (Full context). I was expecting to get something like this 4.8.2 but instead I just got 0. is there some setting somewhere that needs to be tweaked? Make sure that numbering is correctly applied to your headings. If you are using Word 2007, you can choose the "1 Heading 1 1.1 Heading 2 1.1.1 Heading 3" format at Home tab | Multilevel List. If you are using Word 2003, see http://www...

Thread deadlock inside CString::AllocBuffer and sudden crashes
Am facing a issue similar to what we have under [url]http://www.codecomments.com/archive372-2005-11-706874.html[/url] I work for a imaging system software and modules are a mixture of pure ATL dll, "ATL using MFC" components, COM EXE servers, regular MFC dll, MFC EXE and extension MFC dlls. Now that we are towards the fag end of the project, we are getting occasionally hit by sudden crashes where our top level exception handler is not even able to come into play and create the required .dmp file. We also are seeing deadlock cases like the link I have mentioned above. One interest...

Calendar Messages
My boss keeps getting messages everytime my assistant updates my calendar. Our service contractor says this is a glitch. Is this so? I really need my calendar and have been instructed not to use it because of this issue. Please help. Thanks. Perhaps your boss is a delegate to your mailbox? i.e. in Outlook check Tools / Options / Delegates -- Neil Hobson Exchange MVP For Exchange news, links and tips, check: http://www.msexchangeblog.com "Warren" <anonymous@discussions.microsoft.com> wrote in message news:1737401c448a7$b80cee50$a001280a@phx.gbl... > My boss keeps g...

Error Message Unhandled Object Exception
We have two users that receive this message upon logging in to GP v9. Also, periodically this message pops up during entering of AP transactions on average of about once per hour. They click "ok" and can continue, but obviously we need to clean this up. It just started two months after installation. They both have revised dictionaries for check printing and other users do not. Thanks for your help Bill Walvoord this could be a bug that is from the customization. I suggest contacting the developer/partner who did the customization. You mentioned about "the error came...

error message 0x800ccc0d and regsur32 mshtml.dll
Can anyone help please, when I try to send an email from outlook express I get an error message 0x800ccc0d, which states it can't find the server. I've double checked the outgoing and incoming addresses and they seem to be fine, I've looked at various aspects of the help pages and it seems I also have a problem with regsur32 mshtml.dll, "this is identified but the Dll register server could not be found and therfore cant be registerd". Also, shdocvw.dll, the problem with this is that the "lodaed library failed, specified module could not be found". to ...

Why i keep on getting same message from mail server?
I'm using Microsoft Outlook, and have been getting message from server. However, i have been keep on getting same message whenever i re-start the p.c... is there any solulation on this matter? Hi Hide, your Outlook version is? Have a look on this sites: "Duplicate e-mail messages are downloaded from a POP3 e-mail server account in Outlook 2003" http://support.microsoft.com/kb/885870/en-us "Why does my Outlook keep receiving duplicate messages?" http://www.comentum.com/outlook-issues.html Maybe it helps. -- Oliver Vukovics Share your Outlook PST files without Ex...

Recall Message Failed
Hi, I treid to recall a sent message but failed and I keep receiving the recall failed notification. How do I stop this? Thanks MWGP ...

Missing messages for this group
I received only one message for this group between the 6th and the 10th of this month (exclusive). Am I the only one? If it is unique to me, the hopefully this is the only problem I have and if so then I will ignore it. They have been coming in pretty normally. Check your View | Current View settings and try resetting the group' While in a newsgroup: View | Current View. Make sure Show All Messages and Group Messages By Conversation are checked. Tools | Options | Read. Uncheck: Get XXX headers at a time. Then, right click on the newsgroup in the Folder Tree | Proper...

cross reference
Greeting all, Hope you experts can help me with following issue. I have 2 order information spreadsheets, the first one has a column which is our product codes, the second one is a reference which has 2 columns map our product codes to customers product codes. Is there any easy way in Excel which can replace our product codes in first excel file with our customer product codes in second excel file? I know I can use Access to do that, just want find out a simple way in Excel. Do I need to write any VB ? Thank you very much in advance!! ------------------------------------------------ ~~...

NNTP
We have had several NNTP issues lately. 1) A user replies to a post and attaches a file to his reply. That user is then unable to see his own post. But everyone else sees it fine. 2) In testing issue #1 I created a bunch of test messages. Is there any way to get rid of them now? 3) One of our newsgroups has a message that cannot be downloaded. If you try to download all messages it stops at this one message and gives the error message "Your NNTP server has not responded in 60 seconds. Would you like to wait another 60 seconds for the server to respond?" Selecting Wait ...

Exiting a worker thread
Hello, I'm running a worker thread which is started in a dialog, which passes in a pointer via pParam back to the dialog. The controlling function is a static member function of my dialog. In my OnInitDialog, I create a manual event like: if((m_threadEvent = CreateEvent(NULL,TRUE,FALSE,NULL)) != NULL) ResetEvent(m_threadEvent); else AfxMessageBox("Failed Thread Event Creation"); The thread is a loop like: UINT CMyDlg::CaptureThread(LPVOID pParam) { CMyDlg*pDlg = (CMyDlg*) pParam; While(pDlg->m_runThread) { //do work } SetEvent(pDlg-&g...

Message disappears #3
When I read a new message, the unread message stays in the Inbox as it should. However when i reply to the message it disappears. How can I disable this? I would really appreciate your help, Thanks! Emma Lucy <anonymous@discussions.microsoft.com> wrote: > When I read a new message, the unread message stays in > the Inbox as it should. However when i reply to the > message it disappears. How can I disable this? No need to ask more than once. Chances are your View is set to "Unread Messages". Change it to "Messages". -- Brian Tillman ...

Ask a question for thread
Hello,all: I want to know when I create a thread using the function AfxBeginThread() in VC,and I end the thread,Must I use the function CloseHandle() to close the thread's handle?Thank you. Lee Tow wrote: > Hello,all: > I want to know when I create a thread using the > function AfxBeginThread() in VC,and I end the thread,Must I use the function > CloseHandle() to close the thread's handle?Thank you. The CWinThread destructor takes care of closing the thread handle. -- Scott McPhillips [VC++ MVP] more info http://msdn2.microsoft.com/en-us/library/2s21xzf...

user define message error! #2
Hi! I created a SDI app and I want to show a dialog after creating SDI, therefore I defined an user define message #define WMU_STARTUP (WM_APP+10) and call it from CSDIView::OnInitUpdate() with PostMessage(WM_STARTUP). In debug version it work correctly but in release version it generates an Application Error after close the program. what's the problem? Thankx ...

unread mail message
On my log in page I keep getting a message that reads 1 unread mail message but when I go to check mail there is nothing there. I have read all the messages and have deleted messages in my dlete box. Do anyone have any ideas? ...