When I create SHBrowseForFolderW dialog the default control is OK, what I need to do is make SysTreeView32 active so a user can right on use arrow keys to adjust the desired folder. I tried to use this code : http://comp.newsgroups.archived.at/os.ms-windows.programmer.win32/200505/05053122835.html which wokrs ok in finding the HWND of the dialog but using WM_NEXTDLGCTL has no effect on the window.
Maybe I should send TAB keystrokes to the window, or I don't know any other opions ? Are there swiches in creating the browse dialog what control will be highlighted when the window create ?
Ok, the thing is difference between PostMessage and SendMessage. I mistakenly used the later here. They are not the same!
Related
I have an scenario in which I need to know if the window being opening is the compose window (that opened when you click on New mail). How can I do it?
Check the value of the Inspector.CurrentItem.Sent property. Make sure Inspector.CurrentItem is actually a MailItem object first.
One way you can do it is by using a FormRegion, which has a FormRegionMode property.
That property holds a OlFormRegionMode enumeration value that is set by Outlook based on whether the window is in reading, compose or preview (in-line reading pane) mode.
I'm trying to create an android-like keyboard in Delphi that appears when a textbox is in focus. I need to know some way to get this status of focus in all the programs so I can give a show in my form and send it forward
SetWinEventHook(EVENT_OBJECT_FOCUS, EVENT_OBJECT_FOCUS, ...) to register for focus changes. Once you know the window you check the class name for "Edit" and you can get the thread id and then get caret information from GetGUIThreadInfo if you need that...
Is there any way to choose between the (format: (web archive) / (source)) in the safari "save as..." menu using something else than automator recorded mouse clicks? I'm looking for something similar to the methods you used for menu bar actions. (Using mouseclicks with automator works, but I want a more robust method.)
I'm afraid you'll have to (1) enable Full Keyboard Access and (2) use the keystroke method to send the appropriate number of tabs, so as to focus on the dropdown. Once it's selected you can use keystroke again to choose the right option.
If the item were scriptable, you would use properties to set how you want to do it. Since it's not, you're stuck with this uber-kludgy workaround.
I have situation like below.
I'm running some command and then I get a popup with Y/N answer. Is there a possibility to force answer Yes and automatically close the window through command line?
If you want to click a button in an external window, you'll need to hook the window with the button exposed. You can accomplish this by grabbing the window handle via FindWindow, finding the child button, and sending a BM_CLICK with an API call via SendMessage.
you mean a command window within VS ? I don't think there's anything generic, you could run all sorts of things, depends on what your command is - and how much control over it you have - maybe some example of what you're trying to do could help. 'picking' the window will work but depends again on what you're doing, how custom it is etc.
I am trying to make our application properly handle international input. Since we handle text input and font rendering ourselves, I wrote custom code to handle the respective WM_IME_* messages.
Now, this all works fine, with one exception: When our applications main window is open, the Language Bar will not let me pick any options. I can set the input language to Japanese or Korean, but the menus for choosing the input methods (like Hangul or Hiragana) are not shown. Then, when I open another window (any other window, be it one of our application windows, or a standard "save file" dialog), the options appear. Once there, they will stay, even if I close the other window. IME input will then work as expected in the main window. But, as explained, only if I open another window first.
Now, how does windows decide whether it should display the input method options or not? It appears that windows does not recognize our main window as Unicode capable for some reason. How can I fix that?
Thanks in advance for any suggestions,
jonas
Edit: One more strange thing i noticed is that for my main window (which will not let me change input methods), I will get a WM_INPUTLANGUAGECHANGEREQUEST message when i change the input language - which I pass on to DefaultWindowProcW. For the windows which let me change the input method, i don't get the request, i just get a WM_INPUTLANGUAGECHANGE message (which I don't get for the other window).
Ok, after a long search I've been able to find out what is breaking this. We are calling SetFocus on a child window in response to WM_FOCUS messages, so that a specific child window always gets focused when a window is brought to the front. Apparently, this confuses window's IME code, and makes it unaware that the window can handle IME input.
Some notes
Text Service is works per window, not system wide, so even its turn on in one window, another window will still need to turn it on, (unless user set it as default)
And Text Service is not working in any windows, to enable that, target computer need to enable following setting on