signal about an event from a thread

hi,
how can i send a signal about an event from a thread to mfc
application.
plz help

0
1/19/2006 2:32:17 PM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
255 Views

Similar Articles

[PageSpeed] 59

Use PostMessage() to post a message to the appropriate window.  Then, set up 
a handler in the "appropriate window" to do whatever based on the message 
receieved. You can pass parameters in the message to let the handler know 
what you're trying to tell it.

Tom

"dips" <deepikasood30@gmail.com> wrote in message 
news:1137681136.967473.193080@o13g2000cwo.googlegroups.com...
> hi,
> how can i send a signal about an event from a thread to mfc
> application.
> plz help
> 


0
tserface (3860)
1/19/2006 3:26:04 PM
In order to be more precise:

+ Create your thread suspended or pass the HWND to your thread with lparam 
value.

Create a handler for WM_USER + XXXX which is your private message 

+ Do what you have to do in your thread, when you detect the event use the 
postmessage(hWnd <-- the one passed, WM_USER + XXXX, WPARAM, LPARAM)




-- 
None


"Tom Serface" wrote:

> Use PostMessage() to post a message to the appropriate window.  Then, set up 
> a handler in the "appropriate window" to do whatever based on the message 
> receieved. You can pass parameters in the message to let the handler know 
> what you're trying to tell it.
> 
> Tom
> 
> "dips" <deepikasood30@gmail.com> wrote in message 
> news:1137681136.967473.193080@o13g2000cwo.googlegroups.com...
> > hi,
> > how can i send a signal about an event from a thread to mfc
> > application.
> > plz help
> > 
> 
> 
> 
0
xoreaxeax (3)
1/19/2006 11:10:02 PM
Reply:

Similar Artilces:

Help: How to simulate KeyBoard Event like VB function SendKeys() does??
I use API keybd_event() try to send keyboard event, but it can't simulate the action that press two key at the same time, like Shift + A. Is there any approatch? wangyouhua wrote: > I use API keybd_event() try to send keyboard event, but it can't simulate > the action that press two key at the same time, like Shift + A. > > Is there any approatch? > > Use GetKeyboardState to determine if the shift state is off. If it is... Send VK_SHIFT Send A Send VK_SHIFT with KEYEVENTF_KEYUP -- Scott McPhillips [VC++ MVP] ...

Event 1023
Hi we are getting a lot of 1023 events like the following Event Type: Error Event Source: IMAP4SVC Event Category: Content Engine Event ID: 1023 Date: 1/3/2005 Time: 9:08:51 AM User: N/A Computer: SERVER Description: Error 0xfffff9bf occurred while rendering message 0001-00000309635e for download for user user@email.com According to Microsoft, "This is an occasional timing error caused by not locking the mailbox during use. This can be safely ignored unless these errors occur frequently." Does anyone have any other insight though on this issue and possibly how to fix it? ...

How can I can the WM_VSCROLL event?
I am new to MFC. I used the wizard to create an application having DOC and VIEW. I modified it to use CRichEditCtrl because I need to change the color of the text. It worked. However, when new text were added which caused the screen to scroll, the text got scrolled off the screen has lost the color that I put in. The part of text that got pushed off the screen became black again when I manually scroll it down. I need to refresh the screen when I get the WM_VSCROLL message. But I didn't seem to get it. I tried to capture the message in MainFrm and View but didn't seem to get it. I ...

Trap Paste event
Hi, how can I trap the Paste Event on a form, as well as being able to detect which was the current field. TIA Paul. There's no "paste" event, and a Paste can occur in many ways, e.g. keyboard (Ctrl+V), right-click, toolbar, menu, ribbon (A2007), or code. It is therefore not a simple thing to trap. Keystrokes and right-clicks can be trapped with the events of the form/controls, and you could design custom menus/toolbars/ribbons. But it might be easier to re-think why this is needed and see if there is another approach. -- Allen Browne - Microsoft MVP. Perth, Western...

Event Viewer Event ID : 8231 (Getting this error continously ever
Our Exchange server 2003 restarted a couple of days back due to a power failure. Since then the event viewer shows error with event id: 8231 every five minutes. Description Permanent failure reported by policy group provider for CN=Recepient Policies .... MAD.EXE, error=8000ffff. Taking power offline. Our exchange server and Primary domain controller are on different servers but are in the same domain and same forest. I have tried everything but the error does not goes. Any help is highly appreciated. Thanks Vinit Take a look at theses article : http://support.microsoft.com/defaul...

Where is my thread?
I posted a question about "Search for a value in multi-dimensionla array" an hour ago; where did that go? On 5/17/2010 17:38, Rick wrote: > I posted a question about "Search for a value in multi-dimensionla array" an > hour ago; where did that go? If you mean the one beginning with "Seach", posted almost half an hour before this one, it is there. :) On 5/17/2010 11:51 AM, Jackie wrote: > On 5/17/2010 17:38, Rick wrote: >> I posted a question about "Search for a value in multi-dimensionla >> array" an >> hour ag...

Constant 12800 Events
My exchange server has been getting constant 12800 events in the application log. It is NOT associated with any of the other events that are usually logged along side it. I ONLY get 12800 events. Server: Windows 2003 w SP1 Exchange 2003 wSP2 2 GB RAM 4 GB pagefile Boot.ini has /3GB and /USERVA=3030 HeapDeCommitFreeBlockThreshold = 262144 HeapDeCommitTotalFreeThreshold = 262144 196 Mail Boxes 40 GB Mail Store Plenty of Free Phsyical memory Any ideas? Jeremy wrote: > My exchange server has been getting constant 12800 events in the application > log. It...

Event 5152
Windows Server 2008 Web Edition I am getting lots of Event 5152 log entries with the following error message: ============================== The Windows Filtering Platform has blocked a packet. Application Information: Process ID: 0 Application Name: - Network Information: Direction: Inbound Source Address: <various IP addresses> Source Port: 1176 Destination Address: <my IP address> Destination Port: 80 (ALWAYS THIS HTTP PORT) Protocol: 6 Filter Information: Filter Run-Time ID: 68463 Layer Name: Transport Layer Run-Time ID: 13 ========...

Mouse click event for RichEditCtrl
Hi, Is it possible to make the NM_CLICK message work for a RicheditCtrl without subclassing? Thank, Hugo ...

UI thread message queue
Hi, Does a UI thread have its own message queue, or uses the message queue of its parent window. In that case how do the threads retrieve the messages from the parent window's message queue, say if two instances of the UI thread are running? TIA, Sucharit Sucharit Dutta wrote: > Does a UI thread have its own message queue, or uses the > message queue of its parent window. In that case how do > the threads retrieve the messages from the parent window's > message queue, say if two instances of the UI thread are > running? You better think of threads as &q...

MSExchangeTransport Event ID 929
Email's to external domains get stuck in outbound Queue. I have new SBS2003 Standard Server (eval edition) with Exchange SP1 installed. It worked fine prior to installing SP1. Added SBS Hotfixes: 832880, 843539, 872769 + several other hotfixes installed by Windows update. Errormessage in Eventviewer: Failed in reading Connector's DS Info Process Id: 3572 Process location: "E:\Program Files\Exchsrvr\bin\emsmta.exe" ConnectorDN: CN=SmallBusiness SMTP connector,CN=Connections,CN=first routing group,CN=Routing Groups,CN=first administrative group,CN=Administrative Gro...

OnAction events intermittently failing on Shapes in Dialogsheets
OK - I know, I know - I should be using a UserForm - and I do - but sometimes, just sometimes, there are instances where I still find using Dialogsheets best. I like the fact that they retain the data typed into them, and that all data controls are effectively like 'cells' in a worksheet. Anyway, I have a dialogsheet which contains a 'date find' function. To do this, on part of the dialogsheet I created a 7x5 grid of TEXTboxes (not EDITboxes or labels) - the top row of which is populated with Mon, Tue, Wed etc. and the other rows with the numbers 1-28,29,30 or 31 (depending ...

Run a Event Procedure and Macro in the Before Update Event
Can you run both a Event Procedure and a saved Macro in Before Update Event? I am trying to run my Event Procedure along with a new macro and so far I can only run one or the other. Thank you Frank I have created a DateModified and TimeModified field in the SQL database and created the Datemodified and TimeModified boxes in the Access Form. I cannot get this Microsoft example to work with my current Event Procedure. I can get the Macro to work but then I cannot run the current Event Procedure. Private Sub Form_BeforeUpdate(Cancel As Integer) On Error GoTo BeforeUpdate_Err &...

lookup in worksheet_change event
Hi All Worksheet1 contains below columns ( price list ) Company season price Worksheet 2 contains sales Company season amount price cost Company and season are picked from another list. What I want is ( if possible ) when I put amount price is picked from sheet1 and multiply with amount for cost. I know this too much but how can I put such formulas in worksheet_change event. Can you direct me to such postings. Thank you in advance open event code for SHEET 2 and try this code Private Sub Worksheet_Change(ByVal Target As Range) Dim rng, ref As Range Application.EnableEve...

Unable to see GAL within Outlook event id 9337
INFO: 1 * Windows Server 2003 (SP1) DC/GC/DNS 1 * Windows Server 2003 (SP1) Exchange Member Server 2003 SP1 Dcdiag and netdaig run clean. I bumped up the logging on DSACCESS and all is good. I am able to open a new mail and put in a part of a person name and have it resolve from the GAL. And OWA works, when I try to resolve a name from the GAL. I just cant see the GAL via Outlook 2003 (not in cached mode) ------------------------------------------------------------------------------------ Event Type: Warning Event Source: MSExchangeSA Event Category: OAL Generator Event ID: 9337 Date:...

Event ID 111 after migrating to Exchange 2003
I just migrated my Exchange 2000 Server to Exchange 2003 server. The way I did this basically is setup a temporary Exchange 2003 server, moved all the user mailboxes from the Exchange 2000 server and public folders from Exchange 2000 server to the temporary Exchange 2003 server. Then after that, I formatted the old Exchange 2000 server, installed Windows 2003, joined it to the domain as member server, installed Exchange 2003 in it, and migrated all the user mailboxes and public folders back from the temporary Exchange 2003 server. The problem since this is back and forth (actually should be ...

signal that notes exist
Hello -My users are looking for a way to know that notes actually exist on the notes tab without having to click on the notes tab. Is there anyway I could update a field on the First Tab that would somhow signify to them that notes do infact exist on the notes tab. The best solution would be something like an astericks showing on the notes tab when there is data there. But I'm open to options, perhaps a custom field update when notes exist. any thoughts? Hi Heather, The following link should help you. http://notescount.codeplex.com/ Regards, Venkat. "HeatherT" wrote:...

Child window can capture Focus event?
Child window can capture Focus event? Class CMyWnd : public CWnd { CEdit m_edit; CSpinButtonCtrl m_spin; } I dynamic create some CMyWnd in a dialog. I want to change the m_edit's bk color to yellow when the m_edit or m_spin is focused, and change the m_edit's bk color to white when the m_edit and m_spin is unfocused. Can I captue the focus event in CMyWnd? If can't, how to attain the goal? Thanks a lot. Richard. You could create the object as a subclass of CEdit, and handle the reflected =EN_SETFOCUS message... joe On Mon, 30 Aug 2004 11:30:55 -0800, "...

Exchange 2003 Event 8270 and Event 8022
Domain is comprised of one root domain, with several child domains, and the exchange server housed in the root domain. This network is not fully routed, and the problem appears in one domain which only has access to the forest root, but not the other child domain. Event Log Entries: Event Type: Error Event Source: MSExchangeAL Event Category: LDAP Operations Event ID: 8022 Date: 4/9/2007 Time: 1:03:29 PM User: N/A Computer: EXCHSRV1 Description: LDAP Modify on directory child-dc1.child-domain.root-domain.com for entry '<GUID=42CFE00E0D61254399D83077D8D4485E>' was uns...

Signaled event and waitformultipleevents
I am using a worker thread to deal with some I/O and using the waitformultipleevents function. The first event is of course the shutdown event. I want one of the other events to run repeatedly once signaled until I stop it explicitly. QUESTION: If I use a manual reset event trigger which doesn't go away until I cancel it, does the thread stilll loop thru waitformultipleevents and check all possible events every cycle so it will still catch the shutdown event? Ron H. Ron H wrote: > I am using a worker thread to deal with some I/O and using the > waitformultipleevents function. Th...

Event ID 2061
My team and I have been looking high and low for any advice on the bellow error all week. We believe this may be the cause (or symptom) of excessive log file generation for one SG. This event is being generated on a Exch 2K3 cluster running SP1. Can anyone help out, give me some suggestions on things to check? Maybe also there is an article out there that describes what this error means and how to fix it. _________________________________ Type: Error Source: MSExchangeDSAccess Event ID: 2061 Event Time: 4/19/2005 3:32:56 PM User: n/a Computer: SERVERNAME...

Thread Creation (AfxBeginThread) failure
Hi all, We are having a Thread creation (using AfxBeginThread) failure problem (at times) in our Server Application that is written in VC++ (Visual Studio 6.0). At the time of failure the no of threads created by the application was around 200 and the total number of threads in the System was 700. How can we fix this problem if we get a thread creation failure? Can we try creating it again on failure? Regards, Pradeep Nair email: p77nair@hotmail.com Pradeep M Nair wrote: > We are having a Thread creation (using AfxBeginThread) failure problem (at > times) in our Server Applicati...

XP MCE automatic signal scan fails with signals is present
If I scan for the local OTA signals automatically. in XP MCE 2005: I get the message in TV Configuration Result: " A TV signal was not detected. Please make sure a live TV signal is connected to the computer and try again." I happen to know that a live TV signal is connected to the computer, since I'm receiving most of the OTA signals from my area as a result of a manual scan. I have followed the 15 steps outlined at http://blogs.msdn.com/astebner/archive/2006/05/22/604380.aspx to repair MCE to no avail. Do you have a Tuner Card or a UBS Tuner put in your PC........

POP3SVC Event 1023
Error 0x80040102 occurred while rendering message 0001- 0000002ed6a9 for download for user For more information, click http://www.microsoft.com/contentredirect.asp. Any help would be appreciated. It appears randomely. ...

events?
Hi, Typically when I use VBA I tend to put a button on a sheet. I do this to control the macro execution. Most of the macros I'm writing will take information that is pasted into a spreadsheet from another spreadsheet and then manipulate the data into usable data. The original spreadsheet is created from exported data from another program. My question is is there an event I can use to control the execution or is the cmd button the best way. I don't know what event you could possibly use, but there are other ways to run macros: http://www.officearticles.com/misc/methods_to_run_a...