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
4
votes
2 answers

How to send a string to other application including Microsoft Word

I was trying to accomplish this but did not get good results. I used GetForegroundWindow(), AttachThreadInput(uint,uint,bool) and GetFocus() functions to send the strings to another window. It works with Notepad, Wordpad and other applications, but…
Francerz
  • 43
  • 1
  • 1
  • 4
4
votes
3 answers

How can I close an app without a modal dialog box being shown?

I have an app that can optionally open PDF's after it creates them. If two reports are generated in succession with the same name, the second attempt fails if the first copy of acrobat still has the PDF open, so before I write the PDF I check (with…
rossmcm
  • 5,493
  • 10
  • 55
  • 118
4
votes
2 answers

Send key "MediaPlayPause" to an application without setting focus to it

I am creating a program that will send media key inputs (such as MediaPlayPause, MediaNextTrack, etc) to an application that I have the IntPtr of. Sort of like a virtual remote control. So after researching I found this, which almost tells me…
godly-devotion
  • 177
  • 3
  • 15
4
votes
1 answer

How can I send photo to telegram user with telethon

Currently I'm using this method that sends text to user but how can I send photo to user with module Telethon client.send_message(receiver, message.format(user['name'])
Shiv Singh
  • 41
  • 1
  • 2
4
votes
4 answers

When I send and convert std string with win32 SendMessage I'm getting weird characters

I need to append text to win32 edit control i have working function to do this , but the text that printed in the edit control is gibrish why ? the sample code taken from microsoft example from here void settext(HWND hDlg,std::string s) { …
user63898
  • 29,839
  • 85
  • 272
  • 514
4
votes
1 answer

Sometimes WatchConnectivity session on paired watch simulator is not reachable

I have an iOS app that communicates with the paired watch using WatchConnectivity. In most cases, it works without problems, on the simulators and on the devices. The problem: During development on the simulators, I get now and then the following…
Reinhard Männer
  • 14,022
  • 5
  • 54
  • 116
4
votes
1 answer

VB.net SendMessage waiting problem

I am using the following code to click a button for displaying another form to click on: Dim hwnd As Integer = FindWindow(vbNullString, "Virtual CDRom Control Panel") Dim x As Integer = FindWindowEx(hwnd, 0, vbNullString, "Driver Control…
StealthRT
  • 10,108
  • 40
  • 183
  • 342
4
votes
1 answer

Send message taken from Spy++

I am trying to send a message to a game (to automate text commands), the problem is that I can't figure out how to use the information from spy++ to write a C# sendmessage function. I was able to use spy++ to get 00220540 S WM_SETCURSOR…
Jess
  • 8,628
  • 6
  • 49
  • 67
4
votes
2 answers

How does reciprocal SendMessage-ing between two applications work?

Suppose I have 2 applications, A and B. Each one of them creates one window in the main thread, and has no other threads. When the "close" button of the window of application A is pressed, the following happens: Application A receives a WM_CLOSE…
Daniele
  • 53
  • 7
4
votes
3 answers

How can I cope with 32bit/64bit mismatches when doing IPC via SendMessage?

I have a piece of C++ code which reads out the text of a tree item (as contained in a plain Common Controls Tree View) using the TVM_GETITEM window message. The tree view which receives the mesage is in a different process, so I'm using a little bit…
Frerich Raabe
  • 90,689
  • 19
  • 115
  • 207
4
votes
2 answers

Send message using XMPP openfire in swift 3.0

I want to send message using xmpp to openFire everything works perfect even i can receive message. but not able to send i don't know why? i tried this code: @IBAction func SendMessageClicked(_ sender: AnyObject) { let message =…
Mad Burea
  • 531
  • 8
  • 22
4
votes
2 answers

how to make sure that a popup window is fully loaded when using postMessage API?

as you know, using the API postMessage of html5, we can post message to an iframe of the current page, or to a new popup window, but if we code like this: var popwindow =…
hanzichi
  • 609
  • 2
  • 12
  • 22
4
votes
1 answer

Using chrome.runtime.sendMessage without the extensionID

I'm working on a project that needs to use an extension that a customer must download and install, however my web page needs to communicate with the extension, so i use the documented…
Conrad de Wet
  • 477
  • 6
  • 15
4
votes
1 answer

C# and SendMessage (keys) is not working

I tried to send a key to an application. For an easy test I just used notepad. That's what the code looks like: [DllImport("USER32.DLL", EntryPoint = "SendMessageW", SetLastError = true, CharSet = CharSet.Unicode, ExactSpelling = true, …
Core_F
  • 3,372
  • 3
  • 30
  • 53
4
votes
1 answer

how send data record using SendMessage(..) in separate process

i use to send a data on two separate process but it fails. it works only under same process... this is…
XBasic3000
  • 3,418
  • 5
  • 46
  • 91