Questions tagged [message-pump]

53 questions
1
vote
2 answers

How to combine RECV and getMessage in loop (C, WINAPI)

How do you code this in C? The desired flow is: Create socket Create window loop: Wait until data can be read from socket or message are added to the queue if data then do stuff with data goto loop else if message then do stuff with message …
Et7f3XIV
  • 562
  • 1
  • 7
  • 20
1
vote
1 answer

GetMessage Not Retrieving Messages

When I run my program (code below) and insert a hard drive via a USB cable, the WindowProcedure is called for a WM_DEVICECHANGE message for device-change event type DBT_DEVICEARRIVAL. However, GetMessage does not return. The documentation for…
user3731622
  • 4,844
  • 8
  • 45
  • 84
1
vote
3 answers

try/catch all exception in C#

I would like to catch all unhandled exceptions in my UI app in C#, so that I can log them, send them by mail and restart the app. How can I simply get this done? I tried: try { Application.EnableVisualStyles(); …
Haim Bender
  • 7,937
  • 10
  • 53
  • 55
1
vote
3 answers

Does Speech Recognition using .NET Framework require a message pump?

I'm writing a plugin (dll file), and I'm creating a WinForm as its interface/dialog. If it does require a message pump, how and where should I create one?
manuel
  • 184
  • 1
  • 2
  • 15
1
vote
3 answers

Wait for COM Event to complete

How do I block the UI thread while waiting for COM event to complete. I subscribe to update event of COM which signals the event has completed. MyRData.OnUpdate += OnUpdate; I do not own the COM code and cannot make changes to it. I tried…
Rauld
  • 980
  • 2
  • 10
  • 19
1
vote
1 answer

Message loop (pump) when attaching a child window from an external application

I am about to attach a child window to an external application. The child window will be a modeless dialog. Since I do not own the source code of the external application (actually Microsoft FSX), I have no idea how I would hook into the message…
Horst Walter
  • 13,663
  • 32
  • 126
  • 228
1
vote
1 answer

When MFC dialog with a WinForms control hosted inside is deactivated and activated again, not responding then

I'm referring to msdn article "Hosting a Windows Form User Control in an MFC Dialog Box" [link] (http://msdn.microsoft.com/en-us/library/94t3ebxz.aspx), to reuse windows form user controls in MFC legacy application. With the fancy DDX_ManagedControl…
tedyyu
  • 587
  • 6
  • 12
0
votes
1 answer

Windows message pump in infinite loop

I've been making a Window class for a game, and I'm having trouble with the message pump. I pull events off the Windows-provided message queue and send them to the windows they pertain to. Here's the function that Translates and Dispatches. From…
Miles
  • 1,858
  • 1
  • 21
  • 34
0
votes
1 answer

WPF application calls an API that needs a message pump; Dispather.Run() causes problems

I have a WPF app that uses a non-WPF vendor library. My app does not receive any events that the library fires. I've been told that this is because I need a message pump. In another (very similar) question, the accepted answer suggested using…
Grant Birchmeier
  • 17,809
  • 11
  • 63
  • 98
0
votes
0 answers

In C#, can one access and alter the windows message pump to respond to WM_GETOBJECT?

So there is a beautiful technique for acquiring a COM pointer cross-process (same machine) from an Excel.exe session if you know its Hwnd using the Accessibility API. The specific Windows API function is AccessibleObjectFromWindow; if called with…
S Meaden
  • 8,050
  • 3
  • 34
  • 65
0
votes
2 answers

Separate window message pumps and receiving WM_QUIT

I'm trying to create independent window wrapper classes for my project. It's mostly working but cannot figure out how to get WM_QUIT in my main message pump. In the interest of learning Windows, I don't want to use other libraries for this. This is…
Brady H
  • 25
  • 1
  • 3
0
votes
2 answers

UI not responsive during frequent updates from background worker

I'm developing a windows form application that reads a file line by line[In background worker thread] and populates a datagridview[using BeginInvoke]. While this is being done the UI becomes non responsive(Unable to Cancel/Exit or drag window) but…
0
votes
1 answer

C# Windows (touch -> click/focus) messages between Form and Controls (WM_xxx)

I have a 3rd party open-source control (not important which one really, but its CefSharp's Chromium Web browser [v 43]). Initially, there was a problem where if a form menu was open when you clicked inside the control, the menu was not dismissing…
user1830285
  • 578
  • 8
  • 24
0
votes
1 answer

Why do I get "Object is currently in use elsewhere" exception?

I have a C# WinForms application. This exception is thrown within the static void Main() method when a DevExpress XtraMessageBox is displayed prior to starting up the main UI form. Below is the code (simplified): static void Main(string[] args) { …
Elan
  • 6,084
  • 12
  • 64
  • 84
0
votes
1 answer

pumpevents - customized look and feel java taking too much system resources

I make my own GUI see here but system is taking too much resources on further looking into the issue i have found that java pumpevents method is talking too much time. Any resolutions ???? pump events more detail pump event detail
AZ_
  • 21,688
  • 25
  • 143
  • 191