postmessage

JNA: passing arguments as wParam/lParam (Java)

If I need to pass an integer it's pretty straightforward: User32.INSTANCE.PostMessage(hwnd, WM_MOUSEMOVE, new W32API.WPARAM(), new W32API.LPARAM(x | y << 16)) but how do I get WPARAM out of W32API.HDC for example? ...

Cross-domain REST proxy with Javascript, HTML5

I'm writing a service (say, service.com) that provides a REST API to external apps running inside of IFrames. (These apps are hosted from domains outside the service.com). I'm planning a javascript client library for the apps to make pure-javascript requests to the service.com REST API -- basically using postMessage and some ad-hoc en...

Any good debugger for HTML5 Javascript postMessage API?

Is there any good tool out there that allows developers to correctly debug messages sent between windows with postMessage? Or maybe a plugin for Firebug? Thanks! ...

When initializing a main window win32, when is the best time to show a modal dialog?

I'm trying to accomplish this in Win32, but I'm sure the same rules apply in the world of WinForms. Q: I create my main window, and then, when it is being shown, I want to show a modal dialog. The problem is; how can I know when the main window is completely initialized and visible? That is, exactly when is the best time to show the dia...

How can I do cross-domain postMessage?

The documentation for postMessage implies that cross-domain messaging is possible. However: // When the popup has fully loaded, if not blocked by a popup blocker That isn't a very clear note of how to actually do it. In the meantime, I have created two websites: Parent hosted on qc-a.nfshost.com Child hosted on qc-b.quadhome.com ...

PostMessage() or such on OS X. Sending messages to a window

What is the equivalent of PostMessage/SendMessage in Windows on Mac OS X? I have recently started out with Mac development, with most of my experience coming from Windows and nix. I want to hook a window and simulate mouse clicks or keyboard presses. Also I want to be able to find a function like GetWindowText or any function that can ...

Virtual Key Press in window C#

Hey, I am trying to type a message into notepad without having to have it as my focus window (Foreground Window). This is what I have so far: const UInt32 WM_KEYDOWN = 0x0100; const int VK_F5 = 0x74; [DllImport("user32.dll")] static extern bool PostMessage(IntPtr hWnd, UInt32 Msg, int wParam, int lParam); [STAThrea...

Execute code in the context of the main thread (Lazarus)

I have to execute some code in the context of the main thread. I am using Lazarus + FPC. I receive an event from a thread inside a DLL (shared library if on linux) and my callback function gets called. Note that this function is not a member of any class but a standalone traditional function with a "cdecl" directive attached. I have to ...

MFC data forwarding to main thread via PostMessage

I have a C++/MFC application I need to restructure. The app used to process most of the data on the main thread, therefore blocking the input, and now I want to change it so, that all GUI updates are done through PostMessage. Unfortunately, I can't seem to find a good source on how to achieve this goal. Right now I'm thinking of creati...

What window.postMessage emulation options are there for IE7?

I'm aware of the hacks using hash tags, however, I need bi-directional communication with larger payloads and higher throughput. Are there any Flash/ActiveX/etc options that make this possible? ...

C++ WINAPI: How to use SendMessage/PostMessage WM_KEYDOWN lparam

As an amateur to anything lower than VB/VBS (C++ WINAPI is a nightmare for someone of my experience) I have no idea how to go about constructing the long lParam for a simple KEYDOWN message in C++ and have probably spent more time looking for a decent explanation than is worth, would someone be able to describe exactly how to go about th...