I have a standard modal MFC dialog and I'd like to capture mouse clicks outside that dialog.
Is there a simple way to do this or do I have to transform the modal dialog into a modeless dialog?
Related
Applescript has a display dialog function in which one can summon a pop-up, and by using buttons {"x","y","z"} one can add custom buttons to the dialog. Is there a way to get these buttons to appear on the touch bar as well, as pop-ups typically do?
I am using the Yii CActiveForm widget to create a form. On the same page, but separate from the form, I have a button that pops up a JQuery modal dialog box.
Here's what I would like to do (but cannot figure out how to do): When the button is pressed, I would like to validate the form using Ajax before popping up the modal dialog box. If the form has an error, I would like to display all the errors and prevent the modal dialog from opening. If there are no errors, then the modal dialog box should open.
How can I call the Yii ajax validation from within a button click event?
My task is to implement a file upload form in a popup sub-menu panel. I am using XmlHttpRequest, so it's important to keep that popup opened until I receive an event status that file loading completed/failed. Onmouseover and onmouseout events are used to show/hide the popup.
On "hide" the popup panel is detached from the DOM, and cannot be used anymore as a listener for XHR events.
When I click form's "Browse" button, a system dialog window is opened above the browser. In IE, Chrome and Firefox in Windows the system dialog disables events handling by page. Which means if you move a mouse cursor out of the dialog window on one of the page element, the page won't do anything like reacting on mouseOver/mouseOut events. Unfortunately, in case with Chrome/Firefox on Mac (Safari is OK) the page elements do react on mouse over/out. And my popup menu becomes closed (due to mouseOut event handler for the popup) -> XHR response is not managed properly.
Assuming having an upload form in a popup is a must, what are the possible ways of keeping that panel/form visible while system Upload File dialog window is up? Probably a Mac specific solution.
Sample code can be seen here http://jsfiddle.net/xqvXG/
Solved this by freezing popup panel and covering the whole page with transparent div ('glass').
In case if user chooses file(s) and upload starts, I remove the glass and unfreeze the popup using the XHR function readyStateChangeHandler (or may do that in handler of load event).
If user clicks Cancel in system dialog window or closes it with "X" button - no events passed to the page and 'glass' remains on screen. Then any click on the 'glass' causes its removal and unfreezing (or simple hiding) the popup menu.
'Glass' is required to make a single one-click point (panel) for unfreezing the popup in case if Cancel/Close were pressed.
I wouldn't say this is a perfect solution (sometimes required extra action), but very close to what I was looking for.
I am working on a wxWidget-based application. On the Mac, I am trying to open a progress bar dialog on a modal dialog, but it goes behind my modal dialog. While the progress dialog is there, I am not able to perform any operations in application, so functionality-wise it is correct, but I want to bring it to the front, or send my modal dialog behind?
I would really appreciate if someone can point to some code reference as I am new to the Mac API.
Doing wxWindow::Raise() worked for me. Also make sure the progress dialog's parent is your modal dialog. With that said, putting the progress bar in the dialog itself would be a lot more slick.
In my Win32 app, I had a modal dialog that displays settings that I had to add more settings to. In order to fit the new settings, I dropped a TabCtrl in the dialog and implemented two modeless dialogs. The UI is working switching between them but the modeless dialogs don't respond to the keyboard. In a regular app, IsDialogMessage (hWndCurModelessDialog) would be called. How would I do this for my Modal dialog containing a modeless dialog?
You dont. The modal dialog box function calls IsDialogMessage from its own message loop automatically.
The modeless dialogs are the 'pages' ? Make sure they are parented to the main dialog (rather than the tab control) and have the DS_CONTROL style. This style allows IsDialogMessage to recurse into a child dialogs controls when tabbing.