Questions tagged [message-loop]
70 questions
3
votes
1 answer
Qt QTcpSocket: How to prevent dead lock in readyRead signal?
I need some assistance in Qt on Windows 7. It seems that Qt readyRead() signal is emited by an asynchronus procedure call which causes the code to be executed concurrent but in the same thread.
In my example I have a queue which should be accessed…

bkausbk
- 2,740
- 1
- 36
- 52
3
votes
1 answer
Waiting for GUI events and IOCP notifications at once
Can I wait for GUI events — that is, pump a message loop — and on an I/O completion port at the same time? I would like to integrate libuv with the Windows GUI.

Demi
- 3,535
- 5
- 29
- 45
2
votes
0 answers
Initializing the COM library in apartment threaded mode in a thread with no message loop
According to the documentation, if the COM library is initialized in "apartment threaded" mode, the thread must have a message loop.
However, I found that using COM in a thread with no message loop works just fine.
Here is a working example that…

Seth
- 83
- 7
2
votes
2 answers
Is it possible to create a message loop without creating a window in C++
I was working with some Bluetooth library and for some Bluetooth callback, it is necessary to use Windows message loop. But as per my requirement, I need to create a normal C++ program without any GUI. Is it possible to create a message loop without…

krishnakumarcn
- 3,959
- 6
- 39
- 69
2
votes
1 answer
Why does Save As dialog block the sender?
The aim of my program is to trigger Save As dialog of Notepad via Save As item in Notepad's menu.
SendMessage(hWndOfNotepad, WM_COMMAND, SaveAsMenuItemId, IntPtr.Zero);
Console.log("Done!");
When run the code above, Notepad's Save As dialog show up…

CK01
- 431
- 4
- 9
2
votes
3 answers
Message loop in MFC
I have learned a bit about Win32 API, but now I want to learn MFC. In my ebook, they said that the CWinApp class manages main thread of application, but I can't find something like GetMessage, DispatchMessage functions in this class. So how it can…

Phùng Khánh Hiên
- 137
- 1
- 2
- 7
2
votes
1 answer
WebBrowser control in a class library
So as the title suggests, I'm trying to use WebBrowser control in a class library. I've gone through several SO questions like this excellent post, but the unique thing in my situation is that the WebBrowser object must remain alive for the life of…

dotNET
- 33,414
- 24
- 162
- 251
2
votes
1 answer
Message loop is blocking application
I need to close a download popup in web browser control (disallow user to downloading file).
How i can achieve this?
I found this:
How to block downloads in .NET WebBrowser control?
And i used second answer. It's working but i have problem with it.…

Yozer
- 648
- 1
- 11
- 26
2
votes
0 answers
Using WIN32OLE_EVENT::message_loop not in Main thread Issue
I'm trying to create Ruby script that allow me to get OLE events during execution of main script.
I've moved WIN32OLE_EVENT::message_loop to another Thread and expect this will call my event handlers simultaneously during execution of other script…

Serge Janssen
- 71
- 2
- 5
1
vote
2 answers
event SOCKET_DATA does not receive all messages in AS3
My AS3 client program does not receive all the data that was sent to it when sending a lot of messages. I do know its not my server causing this problem because all the messages are received and send correctly. My as3 client just does not receive…

inControl
- 2,215
- 4
- 24
- 39
1
vote
1 answer
MFC CListView how to prevent search & auto-selection when user types letters?
TL;DR
In a C++ MFC CListView, how to prevent automagic selection based on letters the user types when the CListView has keyboard focus?
Situation:
MFC application using a CListView to show a collection of rows containing alphanumeric strings. If I…

Eric M
- 1,027
- 2
- 8
- 21
1
vote
1 answer
Why does the win32 message loop stop working when threaded?
I am trying to create a WIN32 (C++) program in which I will have to simultaneously process messages and run a while loop. In order to do that, I want to use threads.
When I moved the message loop to a separate procedure (called from the function…

Mara Postolache
- 15
- 9
1
vote
1 answer
Why does Task.WaitAll hang when a form is launched directly in Main()?
I've added a splash-screen form to a C# WinForms application to display while the application is being initialized/checking for updates. I'm using Squirrel.Windows to check for updates in Program.cs.
After adding the splash-screen, a call to…

afarley
- 781
- 6
- 26
1
vote
2 answers
Win32 Message Loops: Quitting after window closes with GetMessage(&msg, NULL, 0, 0)?
If I have the following code below, how do I detect when the window has been closed, so I can quit? r never seems to get the value -1 0, and I need to process messages for the entire thread, not just the current window.
HWND hWnd =…

user541686
- 205,094
- 128
- 528
- 886
1
vote
1 answer
for windows programming in use direct windows api i should use MessageLoop?
in windows programming i should use MessageLoop?
i see any program have messageLoop
but in this code the autor dont use messageloop
code snippet :
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int…

maysam
- 509
- 10
- 23