Questions tagged [message-loop]

70 questions
0
votes
1 answer

Fireing Android Dialogs from another thread without Message Loop

In a SurfaceView, I'm dispatching new thread that draws on canvas within standard "LockCanvas-Draw-unlockCanvasAndPost" loop. (note that thread doesn't contains message loop). How to show Android standard Dialog from that thread? As thread doesn't…
Jox
  • 7,132
  • 14
  • 49
  • 63
0
votes
1 answer

Is a CPU fetch / execute cycle an :"event loop"

I'm reading about event loops that pass messages, as I have to design one for a project I am working on. To understand it better, I am trying to analogize it to other things that I know somewhat better, to aid my understanding. Is the fetch /…
Seb Silver
  • 101
  • 9
0
votes
3 answers

AutoResetEvent and COM Objects

I've noticed that AutoResetEvent completely freezes the message loop (sometimes) when in the middle of a WaitOne() call, effectively even blocking the signal message. IE: (UI) New thread spawned (UI) Code calls WaitOne(); timeout: 10s (T2) Thread…
hb.
  • 1,705
  • 5
  • 22
  • 43
0
votes
1 answer

MFC messageloop in dialog window

i created a MFC dialog application. now i want to use a messageloop, but i can not find it. I read that mfc will create it for me but that it will be hidden. so how can i manipulate the messageloop? i need the messageloop to recieve events from my…
Laokoon
  • 1,241
  • 4
  • 24
  • 47
0
votes
2 answers

WPF form and Windows messaging for Modal Dialogs

I have a simple WPF form with a textbox and button and on lost focus it simply simply shows a message box. My code looks like this private void TextBox_LostFocus(object sender, RoutedEventArgs e) { Debug.WriteLine("Lost Focus 1"); …
Ankit
  • 653
  • 2
  • 8
  • 18
0
votes
1 answer

WTL 8.0 _Module and Message Loop

I'm working on a WTL project, actually WTL 8.1 with VS2008. In many tutorials I've seen the usage of _Module global variable, e.g: _Module.AddMessageLoop. My current application creates a CMessageLoop in the stack at WinMain and later calls the…
Hernán
  • 4,527
  • 2
  • 32
  • 47
0
votes
1 answer

Create child window in WM_CREATE, relevance of same thread?

A typical pattern is to create a child window in the message callback (WndProc) at message WM_CREATE: LRESULT APIENTRY WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { ... switch (message) { case WM_CREATE: .... hwndChild[i] =…
Horst Walter
  • 13,663
  • 32
  • 126
  • 228
0
votes
3 answers

role of message loop in this program ? and few more questions

The following code works fine. It gives out the message when the user presses a key. But there are certain things I am not aware of. What is the role of Message Loop here ? I read that calling SetWindowsHookEx(...) registers a function with the…
Suhail Gupta
  • 22,386
  • 64
  • 200
  • 328
-1
votes
1 answer

Window message loop ( WndProc | While (GetMEssage)) thread in .NET Core

I am trying to subscribe to window messages using .Net Core I am able to receive initial messages to create a window ( through pinvoke) and destroy messages. But after that my created windows gets blocked and does not receive any other messages. …
-2
votes
1 answer

How to invoke into message loop after Application.Run()

How can I invoke into the message loop of the tread/form after calling Application.Run() without a dialog? The reason is that I want to prepare (and later show) a dialog that is clickable even if a modal dialog is shown in the main…
LionAM
  • 1,271
  • 10
  • 28
1 2 3 4
5