messages

How to programmatically choose a context menu item in another app?

The target app is written in Delphi (win32 not .NET) and is closed-source. The action I want to invoke is called Copy, but there is no obvious keyboard shortcut. (Ctrl+Insert does the wrong thing and Ctrl+C does nothing) I can find my target HWND and persuade it to open the context menu (it responds to WM_RBUTTONDOWN/UP not WM_CONTEXTM...

I need a message pump that doesn't mess up my open window

My application (the bootstrap application for an installer that I'm working on needs to launch some other applications (my installer and third party installers for my installer's prerequisites) and wait for them to complete. In order to allow the GUI to do screen updates while waiting for an app to complete, I put a message pump in the w...

sql service broker functionality question

Hi, I'm a beginning web developer sitting on an ambitious web application project. So after having done some research, I found out about SQL Service Broker. It seems like something I could use, but I'm not sure. Since learning it requires someone to put in lots of time, I wanted to be sure that it would fit my needs. I need to implemen...

How can I determine whether a message type is sent or posted?

I'm aware that some messages types are sent directly to window procedures, while others are posted to a thread's message queue, but I haven't found any way to determine if a message will be sent or posted. MSDN is half-helpful; it explained what's going on but the examples it gives are presumably not exhaustive. Is there a definitive l...

Simplest way to send messages between Matlab, VB6 and VB.NET programs

We are upgrading a suite of data acquisition and analysis routines from VB6 programs to a mixture of VB.NET, VB6, and Matlab programs. We want to keep the system modular (separate EXEs) so we can easily create specialized stand-alone analysis programs without having to constantly upgrade one massive application. We have used MBInterPro...

How can I fire an event without waiting for the event listeners to run?

I have a question about events in .NET (C#). I have had to write code for several situations in which I have a background task running and I want to notify a main thread, or controller class, that something has occurred, such as task completed, or finished copying a file, but I don't want the background task to wait for the main thread'...

do messages sent to HWND_BROADCAST go to other desktops?

I'm trying to determine some of the details of how HWND_BROADCAST works. Unfortunately, MSDN doesn't have a specific page for this value; it's only mentioned in passing in several other articles, such as the ones for SendMessage and PostMessage. What I specifically want to know is whether messages sent to HWND_BROADCAST are received by ...

Setting messages.properties in a Spring Webflow unit test

I'm using Spring Web Flow 2.0.7, and just started setting up my unit tests. I've got my flows directory, containing the flow xml files and my messages.properties files on my classpath. It's loading fine, but it doesn't seem to be automatically picking up the messages.properties file for the flow, and thus my validation unit tests are...

How to redirect MFC messages to another object?

In an instance of a class derived from CWnd, is it possible to forward (redirect) all MFC messages to another object, without writing separate handlers and message mappings for each possible message? Specifically, I'd like to forward all unhandled WM_ messages to another object. If this isn't possible, then is it possible for objects ...

Visual C++: How to embed and display a compile time message in code?

Is there a way to embed a message in code that is displayed during compile-time when that piece of code is being compiled? The messages are diagnostic in nature and should not modify or abort the compile process. (Disclaimer: I know the answer to this question. I didn't find it asked on Stack Overflow and I think it would be an useful a...

Android: Best practice for responsive user interfaces

Hi, I am quite new to Android and Java. Before I was working with C++ where the events where dispatched with messages. Now I would like to create the same user experience for Android platform and I would appreciate any of your suggestions or comments on what is the best way to bind events to user controls. Here is an example from C++: ...

C# Bubbling/Passing Along An Event

How do I pass along an event between classes? I know that sounds ridiculous (and it is) but I've been stumped on this for the past little while. Search didn't turn up a similar question so I figured I would pose it. Here are the objects involved: WinForm -> Speaker -> Tweeter -> Woofer [Speaker, Tweeter, Woofer] a...

How to write a method/message with multiple parameters?

How do you write a method/message with multiple parameters? EDIT: Like multiple parameters for a single method/message, I mean. ...

MFC: how to detect a focus/activation event in a Property Frame?

Alright, this has been bugging me for some time now. I have a Property Frame with 5 Property Pages in it. I created it using this COM method: OleCreatePropertyFrame The basic result is it creates a modal dialog with a tab control built into it with which I can switch from one property page to another. The issue is when I switch to a t...

PostThreadMessage returns ERROR_INVALID_THREAD_ID

I have a multi-threaded simulation running on Windows Vista. When I use PostThreadMessage to send messages between threads, I am getting ERROR_INVALID_THREAD_ID, even though I am quite certain (from stepping through the debugger) that the thread id is valid, and the thread has a message queue, since I call PeekMessage from every thread a...

Do you end your exception messages with a period?

I've seen both exception messages with and without a period. And I can think of some reasons of why both could be good. No dot would give you the freedom to add the period or leave it out if you wanted to. Could be useful if the message was going in some sort of a titlebar or something. WIth a dot you would always know that you had a "...

Does anybody know what means ShellHook message HSHELL_RUDEAPPACTIVATED?

I am writing application which establishes shell hooks to get shell events (I am using C# if it matters). I am using this example: http://msbob.spaces.live.com/blog/cns!DAFD19BC5D669D8F!132.entry Hook is working fine but I do not receive message on which I am interested: HSHELL_WINDOWACTIVATED (all other window-related events work well)...

Extra bytes in .mid files

Hi everyone. I'm trying to read information from a .mid file, but I keep seeing extra bytes that don't seem to be part of any midi messages. I'm not sure how to predict/deal with these and it's throwing everything else off in my project. Any suggestions? Here's a few examples: 4d 54 72 6b 00 00 04 48 Track Header 00 c0 19 ...

storage of user, error, exception messages (c++)

Hello everyone. Rather simple question. Where should I store error,exception, user messages? By far, I always declared local strings inside the function where it is going to be invoked and did not bother. e.g. SomeClass::function1(...) { std::string str1("message1"); std::string str2("message2"); std::string str3("message3"); ... // so...

How to Prevent ProcessMessages in Delphi

The Application.ProcessMessages command is well known and I use it in long processes to ensure my program will not tie up the computer. But I have one fairly quick set of processing, where I am buffering a view into a file. During the buffering procedure, a few system messages may get sent off (e.g. redraw or scrollbar move or other eve...