How do I close the Windows Find and Replace dialog boxes programmatically ensuring the FINDMSGSTRING message is sent so I can get the settings to save them? DestroyWindow does not send the message.
FindText() and ReplaceText() both return an HWND for the dialog. If you want to close that HWND yourself programmably, send it a WM_CLOSE message. That is the same message the dialog receives if the user dismisses the dialog. It will destroy itself after closing, but this gives it the opportunity to send the final FINDMSGSTRING message to you.
Related
I have an app that prompts the user for confirmation on exit, which is (indirectly) done by opening a confirmation dialog when the WM_CLOSE message is received. However the message is also sent by the task manager when the user uses end task on the process.
Because I prevent the window from closing with the confirmation dialog, task manager sees it as the process hanging and forcefully terminates it preventing the app from doing a graceful exit when it's possible.
Is there any way to determine if it's the user closing the window from the message (e.g. clicking the close button, or Alt+F4), and not the task manager? As the message's parameters are unused the only way I could think of is checking for mouse events or WM_SYSCOMMAND that were received some time before the WM_CLOSE is received, but I'm unsure if this would handle all cases.
I assume the task manager calls EndTask. Perhaps in the old days it only sent WM_CLOSE but it seems to send WM_SYSCOMMAND when I tested now so there are no clues in the messages you can use, it just looks like a normal Alt+F4.
If your app is asking about unsaved changes in a document, I would say, put up the dialog regardless and just accept the hard termination if that is what the user wants.
If you are just trying to prevent an accidental close, call GetForegroundWindow in WM_CLOSE. If you are not foreground, it was not an accidental close.
We have added a button using add-in express on Outlook's inline reply compose window. We want to call send event (after some processing) on this button click event(button is must as it gives choice to user to process the mail during send or else user can use normal send button for unprocessed mail) on mailitem obtained using ActiveInlineResponse. But as per MSDN we can not call send button on MailIten of the inline response object. is there any workaround we can use to obtain this MailItem on which send event can be called? any pointers will help.
Thanks,
Omkar
Is there any way in the Slack API to have the submission button of a dialog open a new dialog or edit the current one?
Not directly. You can use the response_url attached to the dialog submission sent to your server to then post a follow up ephemeral message to the user, containing a button to continue to the next dialog. Once clicked, you'll receive another trigger_id which you can send to dialog.open and start another dialog.
More information on triggers and where to find them can be found here.
In my MS Outlook 2007, I have multiple (several hundred) messages in the Outbox and they are marked in bold, but NOT marked in italics. Hence, I cannot send them unless I open each message individually and hit the Send button :(
Is it possible to use a VBScript to send these messages?
I have no knowledge in scripting whatsoever.
Thank you for your help!
I have multiple (several hundred) messages in the Outbox
Did you submit these messages manually and they are stuck in the Outboox?
Anyway, you can automate Outlook from VBA. See Getting Started with VBA in Outlook 2010 to get started quickly.
Pay special attention to the ItemSend event of the Application class. It is fired whenever an Microsoft Outlook item is sent, either by the user through an Inspector (before the inspector is closed, but after the user clicks the Send button) or when the Send method for an Outlook item, such as MailItem, is used in a program. You can display a custom dialog for confirming. The Cancel parameter passed to the event handler allows to cancel the action. If the event procedure sets this argument to true, the send action is not completed.
Is there a way in windows phone to track sent message event? i mean to say that whenever a message is sent then a function of my application execute
all i want is to execute a function whenever sent message button of windows phone is clicked?
If you open the message launcher (I don't remember the exact name), it'll open this screen and you have the event (something like application deactivated) and once the user sends the message, the screen should close and come back to your app (again another event is available at that point, activated).
So you'll have to play with the events to do something you like, IIRC there is no call back when the message button is clicked.
Here's a link with the lifecycle of apps
There is no API that notifies you if a message was sent (at least no open API). A similar question was asked here.