Questions tagged [getmessage]
48 questions
0
votes
0 answers
Windows message WM_QUIT and WPF
I have to catch WM_QUIT message in WPF but there is a problem.
IntPtr windowHandle = (new WindowInteropHelper(this)).Handle;
HwndSource src = HwndSource.FromHwnd(windowHandle);
src.AddHook(new HwndSourceHook(WndProc));
WndProc works fine and catch…

Igor
- 11
- 5
0
votes
0 answers
waveOutOpen(), waveOutWrite() gives my thread undocumented message 1024
The sound output functions are giving me unexpected messages. Is this a sign I'm doing something wrong? If so what? Otherwise is there a good source that explains what these messages might be?
waveOutOpen() gives me message 955 MM_WOM_OPEN as…

Swiss Frank
- 1,985
- 15
- 33
0
votes
1 answer
Does the application GetMessage even during MessageBox?
While handling WM_TIMER, I called MessageBox. As a result, a message box popped up with the frequency of the timer. So I believe that the application was trying to continue to process queued/non-queued messages even during MessageBox.
Am I right?
I…

xiaokaoy
- 1,608
- 3
- 15
- 27
0
votes
0 answers
How do you encode getmessage calls in the following code below?
Im trying to HTML/JavaScript ecode the getmessage calls in the code listed below. Can someone explain how to properly do this? The code below is a snippet from a program which is used to handle a failed authentication attempt. Thanks in advance for…

FullNelson
- 99
- 2
- 13
0
votes
2 answers
does not go inside the Windows GetMessage loop on console application
I want to detect keypress in C++ and i need to use Windows System Call. So, i did some research and this is what i got using Hooks and Message:
#include
#include
#include
#include
#include
using…

aufarg
- 21
- 2
- 5
0
votes
1 answer
Is the message loop in windows programs always "looping"?
I apologize if the question is too easy for experienced programmers. I just got started with the basics of windows with the Petzold but have experience programming in Mathematica and some C and Labview.
What i dont understand about the message loop…

Stirling
- 1
- 2
0
votes
2 answers
WinAPI Creating another window after destroying previous one
I know how to create child windows. But what if I want to create one window (for example to customise settings) and after destroying it - a second one (based on a HGE engine). If I could break message loop by WM_DESTROY I could create second window…

user2854935
- 11
- 1
0
votes
2 answers
infinite loop inside the getmessage (DispatchMessage(& msg ); is not working)
I am creating a button application using resource editor. After creating button I try to do like this-
m_hwndPreview = CreateDialogParam( g_hInst,MAKEINTRESOURCE(IDD_MAINDIALOG), m_hwndParent,(DLGPROC)DialogProc, (LPARAM)this);
if…

Sss
- 1,519
- 8
- 37
- 67
0
votes
0 answers
create custom main from dll
I'm creating a layer around .NET and Win API. I need to prepare some things before the users can enter the main function, like calling the GetMessage function.
Is it possible to start a program from a dll, which than calls a custom main function on…

JMRC
- 1,473
- 1
- 17
- 36
0
votes
1 answer
LIFO Win32 message loop?
Is it possible to somehow cleverly use PostMessage, GetMessage, etc. to queue LIFO messages (assuming both the sender and the receiving message loop cooperate), or would I need to roll my own solution?
In case you're wondering about the use case,…

user541686
- 205,094
- 128
- 528
- 886
-1
votes
1 answer
Can't figure out how to register a global hot key in my C++ application
Hotkey events are only getting to my application if I have a visible main window. I'm trying to register global hotkeys. When my application doesn't have a visible main window running, GetMessage never returns. I'm not sure how to fix it.
int…

user3056541
- 75
- 1
- 5
-1
votes
1 answer
How to properly use Exception method getMessage
I have the following java code:
System.out.print("\fPlease Enter an integer: ");
while(!validInt){
try{
number = kb.nextInt();
validInt = true;
}catch(InputMismatchException e){
System.out.print("Pretty please enter an int:…

DCR
- 14,737
- 12
- 52
- 115
-1
votes
1 answer
GetMessage() hanging up
I have read the msdn link, and tried to approach the GetMessage() function in the following keylogger-code .
In my smallest version of a program attached below, why isn't GetMessage() releasing and print "new message" if I press keyboard or resize…

Linz
- 9
- 5
-1
votes
1 answer
MQException 2046 error when getting messages from MQ queue
I am trying to get the messages from one local queue.
I have initialized the queue manager , local queue from which I am supposed to fetch the messages .
Open Input options used for local queue
int openInputOptions = MQC.MQOO_OUTPUT ; …

sharath Yogananda
- 101
- 1
- 2
- 6
-1
votes
1 answer
DllMain DLL_PROCESS_DETACH and GetMessage Function reentrancy
I have written a global hook that hooks using SetWindowsHookEx the WH_GETMESSAGE, WH_CALLWNDPROC and WH_CALLWNDPROCRET.
The hook dll creates a new thread in the hooked process, which, among other things, checks the audio state of the process and…

Roland Pihlakas
- 4,246
- 2
- 43
- 64