Questions tagged [sendmessage]

Sends the specified message to a window or windows. The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

Sends the specified message to a window or windows. The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

Official documentation.

943 questions
5
votes
1 answer

Get Name of Message registered by RegisterWindowMessage

I am debugging an old application, where the WndProc is overridden. There I got a message with ID=0xC1B0 which means, that this is a system wide unique message according to this msdn article. As described by microsoft for the…
scher
  • 1,813
  • 2
  • 18
  • 39
5
votes
1 answer

Cross-process PostMessage, UIPI restrictions and UIAccess=”true”

For security reasons the UI module for my application runs with a high mandatory integrity level. Everything in it works great, except one thing. For compatibility with older versions I need to be able to let users issue command line calls to the UI…
c00000fd
  • 20,994
  • 29
  • 177
  • 400
5
votes
2 answers

How can I move the cursor to the end of the text (Delphi)?

This is my code to fill a TextBox using the SendMessage function: C := 'Hey there'; SendMessage(h1, WM_SETTEXT, 1, Integer(PChar(C))); Now, how can I move the cursor to the end of the text?
Kermia
  • 4,171
  • 13
  • 64
  • 105
5
votes
1 answer

chrome extension: chrome.tabs.sendmessage is sending the message to all tabs even though tabId is specified

Is there an error in the way I'm implementing this? I'm opening a new tab and then sending a message to that tab, but then all other tabs that have a listener on them also receive the message. In…
5
votes
3 answers

How to send message from Website To Telegram APP

I have a share button in my website and I want to send a specific message to Telegram APP contacts (when I open website in Mobile) The Problem is I didnt find the complete code and it just open the APP in the mobile my code is :
zEn feeLo
  • 1,877
  • 4
  • 25
  • 45
5
votes
1 answer

Android. Send text to facebook messenger by Facebook SDK 4.X

As document from facebook, we can send image from android app to facebook messenger like below. String metadata = "{ \"image\" : \"trees\" }"; ShareToMessengerParams shareToMessengerParams = ShareToMessengerParams.newBuilder(contentUri,…
5
votes
1 answer

How to open the context menu of any window?

How do you open the context menu of a window (the normal Windows context that appears when you Right-Click the title-bar of a window). Things I've tried (on a button click) ReleaseCapture(); SendMessage(this.Handle, WM_NCRBUTTONDOWN, 0,…
Andrew Gee
  • 338
  • 1
  • 12
5
votes
1 answer

Capture Highlighted Text from any window using C#

How to read the highlighted/Selected Text from any window using c#. i tried 2 approaches. Send "^c" whenever user selects some thing. But in this case my clipboard is flooded with lots of unnecessary data. Sometime it copied passwords also. so i…
Dinesh
  • 2,026
  • 7
  • 38
  • 60
5
votes
1 answer

using FindWindow with multiple root windows

So I'm building an app that uses win32's SendMessage as IPC. I'm using FindWindow to get the hWnd based on className and windowName. This has all being going fine and dandy until I want to talk to a root (as in child of the desktop) Window that has…
Corin Blaikie
  • 17,718
  • 10
  • 37
  • 39
5
votes
1 answer

SendMessage of MFC equivalent in Qt

Porting VS2010 project in QT . I guess, I wasn’t very clear with my earlier post so here I am explaining it again. The issue is .. I have lots of sub Qdialog windows which when user click generates some messages. I want those messages to be…
samprat
  • 2,150
  • 8
  • 39
  • 73
5
votes
1 answer

Installing TTF fonts on windows with python

I want to install new fonts on windows with Python 2.7. First I copied myFont.ttf to windows Fonts folder then I Added My Font (True Type) key to registry (HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts). Now I want to declare system that a…
user1922137
5
votes
4 answers

How to send an "ENTER" key press to another application?

I have code that launches an external application and automatically fills in a password prompt. I want to automate the pressing of the "ENTER" key, so that the user does not have to click "OK". How can I send the ENTER key to an external…
JosephStyons
  • 57,317
  • 63
  • 160
  • 234
5
votes
1 answer

SendMessage, When To Use KEYDOWN, SYSKEYDOWN, etc?

I am writing an application that sends keystrokes to another application using SendMessage. [DllImport("user32.dll")] public static extern int SendMessage(IntPtr hWnd, int Msg, uint wParam, uint lParam); I have been experimenting with the various…
Jan Tacci
  • 3,131
  • 16
  • 63
  • 83
5
votes
2 answers

How to send a keystroke to an other process (ex a notepad)?

I got a notepad which has a PID: 2860 #include #include #include using namespace std; HWND SendIt (DWORD dwProcessID){ HWND hwnd = NULL; do { hwnd = FindWindowEx(NULL, hwnd, NULL, NULL); …
SmRndGuy
  • 1,719
  • 5
  • 30
  • 49
4
votes
2 answers

Using SendMessage to enter text into an edit control belonging to another process

I want to set up text in edit box programatically in other program, which is a game app and using directX, but running in window mode. I'm doing this: HWND hWnd = FindWindow(NULL,"Game"); HWND edit = FindWindowEx(hWnd, NULL, "Edit",…
Jigberto
  • 1,513
  • 7
  • 27
  • 50