a-nlewis
Wed Feb 16 16:42:51 CST 2005
------=_NextPart_0001_2765D294
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
I can't answer as to why the SendMessage call may be hanging, but it's
typically due to some other application not processing the message in a
timely fashion. The best way to avoid this kind of problem is to use
PostMessage or SendMessageTimeout instead. You can find an excellent
discussion of some problems with using SendMessage and how
PostMessage/SendMessageTimeout works around them here:
Message Management - Sending messages across threads
http://www.developerfusion.com/show/1713/7/
---
Nathan Lewis
Microsoft Mobile and Embedded Devices Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
From: "=?Utf-8?B?bmV3ZXN0IG5ld2JpZQ==?="
<newestnewbie@discussions.microsoft.com>
Subject: broadcast problem
Date: Wed, 16 Feb 2005 12:47:10 -0800
I'm working in evc 3.0 and I'm making a registry setting change then
broadcasting a notification using:
::SendMessage(HWND_BROADCAST, WM_WININICHANGE, 0xF2, 0);
However, on the pocket pc I'm using my program freezes on that call.
I've
done the same thing in evc 4.2 and its worked fine. Does anyone have any
suggestions?
------=_NextPart_0001_2765D294
Content-Type: text/x-rtf
Content-Transfer-Encoding: 7bit
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fprq2\fcharset0 MS Sans Serif;}}
\viewkind4\uc1\pard\f0\fs20 I can't answer as to why the SendMessage call may be hanging, but it's typically due to some other application not processing the message in a timely fashion. The best way to avoid this kind of problem is to use PostMessage or SendMessageTimeout instead. You can find an excellent discussion of some problems with using SendMessage and how PostMessage/SendMessageTimeout works around them here:
\par
\par Message Management - Sending messages across threads
\par
http://www.developerfusion.com/show/1713/7/
\par
\par
\par ---
\par
\par Nathan Lewis
\par Microsoft Mobile and Embedded Devices Developer Support
\par
\par This posting is provided "AS IS" with no warranties, and confers no rights.
\par
\par
\par
\par \pard\li720 --------------------
\par From: "=?Utf-8?B?bmV3ZXN0IG5ld2JpZQ==?=" <newestnewbie@discussions.microsoft.com>
\par Subject: broadcast problem
\par Date: Wed, 16 Feb 2005 12:47:10 -0800
\par
\par
\par I'm working in evc 3.0 and I'm making a registry setting change then
\par broadcasting a notification using:
\par \tab ::SendMessage(HWND_BROADCAST, WM_WININICHANGE, 0xF2, 0);
\par
\par However, on the pocket pc I'm using my program freezes on that call. I've
\par done the same thing in evc 4.2 and its worked fine. Does anyone have any
\par suggestions?
\par \pard
\par
\par }
------=_NextPart_0001_2765D294--