Questions tagged [peekmessage]
32 questions
1
vote
2 answers
Code optimization causes null reference exception when using PeekMessage
I'm using the game loop discussed in this gamedev.stackexchange thread:
https://gamedev.stackexchange.com/questions/67651/what-is-the-standard-c-windows-forms-game-loop
Everything is working great if I'm using Debug build type, but when I go to do…

ALLCAPS
- 163
- 6
1
vote
1 answer
PeekMessage() Resetting the Mouse Cursor
Im currently messing around with changing the mouse cursor within a game like C++ application for Windows XP.
To change the cursor I am using SetCursor() and passing in the desired cursor, which is working. However during the while loop in which…

0xC0DEFACE
- 8,825
- 7
- 34
- 35
1
vote
2 answers
WinApi - PeekMessage Always Returns False
I can't get PeekMessage to work. Actually I would expect it to flood me with messages but it's return value is 0.
I use a WinForm, start a background thread that is peeking messages and use the window with the mouse. The window is usable like always…

Bitterblue
- 13,162
- 17
- 86
- 124
1
vote
2 answers
How to mix Sockets, Messages and Events
There is a thread that uses ADO Connection object, operates with a socket(s) and reacts on outer events using WaitForSigleObject or WaitforMultipleObjects. The thread has an endles loop with 3 actions:
While PeekMessage(MSG, 0, 0, PM_REMOVE) do…

host.13
- 108
- 1
- 1
- 11
1
vote
3 answers
postthreadmessage and peekmessage problem in delphi 2006
I created a multichilded application. The application windows (W[n]: TMyWindows) are all the same and all have an private object class instance associated with them (E: TMyObject).
The child windows generate through this objects some messages. I…

zoomz
- 125
- 2
- 10
0
votes
1 answer
Is it safe to call PeekMessage/GetMessage from a DirectShow filter FillBuffer() call?
I have a DirectShow filter written in Delphi 6 using the DSPACK component library. It is a push source video filter that receives its source frames from an external cooperating process that I also wrote.
When the worker thread that calls my…

Robert Oschler
- 14,153
- 18
- 94
- 227
0
votes
1 answer
Rust Win32 window, peek message disabling main loop exit
I am new to Rust and i am learning it, however when i search for information around this issue, there is simply no information.
The problem exists in the main loop of the program for which the code looks like this (i will post the fill code for the…

chloedev
- 3
- 2
0
votes
2 answers
PeekMessage always returns FALSE
I have written a small test application that inserts files (with hardcoded paths) into the currently active folder/application via delayed rendering. It works as expected. But I have a question - why does PeekMessage always return FALSE? But if you…

lfk
- 57
- 7
0
votes
2 answers
ServiceBusReceiver PeekMessageAsync only returns maximum of 250 dlq-messages?
I am reading from a deadletter queue on servicebus using the ServiceBusReceiver(which I want to continue using).
However, the receiver.PeekMessagesAsync(550) only fetches a maximum of 250 messages from deadletter queue???
How can I change this? I…

JoBo
- 235
- 4
- 17
0
votes
0 answers
Failed to intercept WM_LBUTTONUP message with WH_GETMESSAGE or WH_MOUSE_LL
In development of GUI automation service, our team faces with the problem that we can not handle WM_LBUTTONUP message correct.
The goal is to intercept WM_LBUTTONUP, disable active window, do our job and show MessageBox with YES and NO buttons:
If…
user17939629
0
votes
1 answer
Peek scheduled messages in Azure ServiceBus topic
How do I peek Scheduled messages in an Azure Service bus topic?
According to this post:
https://github.com/MicrosoftDocs/azure-docs/issues/59641
Scheduled messages reside in the topic until the scheduled time, and users should peek into the topic if…

smolesen
- 1,153
- 3
- 11
- 29
0
votes
0 answers
ApplicationHang - PeekMessage
I am investigating a application hang (winforms). It happens only on the customer machines. They got us a dmp from the frozen process. But i am unsure of how to interpret the data.
I loaded the file into WinDbg.
!dlk => no deadlocks
!analyze…

Thanatos
- 41
- 5
0
votes
0 answers
DoEvent() in Windows and Linux errors
I want to write a function like DoEvents() in C++.
I found DoEvents equivalent for C++? and In C/C++, which function is like DoEvents( ).
Here is the code:
void DoEvents()
{
MSG msg; // Error 1
while ( PeekMessage(&msg, NULL,…

User159357
- 13
- 2
0
votes
0 answers
How to access the message queue in Mono on a Linux machine?
I'm writing a game in C# and Mono. I execute the game loop and render whenever the window is idle (that is to say, when the message queue is empty). I understand how to do this on Windows (use P/Invoke to import PeekMessage from "User32.dll"), but I…

Pesdi Games
- 21
- 3
0
votes
0 answers
GetMessage does not receive WM_QUIT when closed from taskbar
I came across weird problem. I have C++ (WinAPI) application and if I close it via [X] window button, everything works correctly - window is closed, application is ended.
But when I close the application from the taskbar button context menu, the…

bigmuscle
- 419
- 1
- 6
- 16