73 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
1
answer
92
views
Is there a way to automatically wake a WinAPI GetMessage() after n seconds?
As explained here, the Windows API GetMessage() blocks until a message is available.
I would like to automatically wake after n seconds. Alternatively, I'd like to have the system post a WM after n ...
-3
votes
1
answer
148
views
How can I ensure that a Message Loop in Win API doesn't use the CPU when no messages available?
How can I ensure that a Message Loop in Win API doesn't use the CPU when no messages are available? In other words, I effectively want a Message Loop which says "Sleep until I have a new message&...
-1
votes
1
answer
2k
views
How does Win32 API PeekMessage function work
I was trying to program with Win32 API, but I came across an unusual behaviour that I wasn't expecting which left me kinda confused. In my while loop:
while (IsWindow(hwnd)) {
while (PeekMessage(&...
0
votes
2
answers
269
views
C++ How to allowing for Low Level Mouse callback to get called in a loop/ when wait for input
So I am trying to create a console button base (using low level mouse hook) for a console menu (which uses arrow keys and enter key for controls) that I have created before and both work fine alone ...
0
votes
0
answers
51
views
Translate sequences of virtual keycodes into the resulting character message
My understanding is that TranslateMessage collates a sequence of key events and adds a WM_CHAR message to the queue if it results in a character. So on my computer what happens when I press Alt+1234 (...
2
votes
0
answers
277
views
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 ...
0
votes
1
answer
110
views
Necessity of testing key value before calling IsDialogMessage
I've seen several code examples that test the value of a message to determine that it's between WM_KEYFIRST and WM_KEYLAST before calling IsDialogMessage.
I was wondering if that's technically ...
user avatar
user15284017
1
vote
1
answer
178
views
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 ...
user avatar
user140327
-2
votes
1
answer
502
views
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 ...
0
votes
1
answer
539
views
Why is DestroyWindow blocked?
I create a window and message loop in the child thread.
When I sent a custom message through PostMessage, when I called DestroyWindow in the thread, DestroyWindow blocked and did not trigger ...
0
votes
2
answers
159
views
How to dispatch messages for multiple dialogs in an ATL exe
Microsoft had a knowledge base article describing how to modify the message loop in at ATL .exe so that modeless dialogs can receive appropriate messages.
I was wondering how to elegantly do this if ...
user avatar
user15025873
0
votes
1
answer
1k
views
How to quit/break from windows message loop in console app and deferences from windows desktop app?
I want to break from the windows message loop. Just like C++ how to break message loop in windows hook . I came up with one solution, which works fine for Window Desktop Application, but fails for ...
3
votes
1
answer
2k
views
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 ...
0
votes
1
answer
37
views
Difficulty displaying "login" and "main" forms correctly
I have a WinForms application, with a login form and main form. The login form contains two textboxes for the user to enter credentials, an OK button, and a Cancel button. The following code is the ...
user avatar
user11674093
0
votes
0
answers
330
views
CefSharp.WinForms Drag and Drop messageloop override
I need to implement the answer provided to the following StackOverflow thread:
How to receive drag move and drag drop events using CefSharp winforms
I've tried implementing the code, but I feel the ...