Opening buttons to Mainwin? - basic

Using the BASIC language I may open buttons to their own specific window through:
open "Main Menu" for window as #main
This will open the buttons to their own separate window from the main window. Ideally I'd like the buttons to open in a designated area of the main window, so I can create a menu and user interface for the game I'm coding.
If there is a way to open buttons to the main window, please let me know as it would be much appreciated.
UPDATE: I'm using the JustBasic compiler.

Related

Coded UI Test Builder not recognizing buttons on the pop-up window

When I click the crosshairs icon on the Coded UI Test Builder and drag it over to the pop-up window buttons (Run and Cancel), it is unable to locate and find the Properties of them on the pop-up window.
Does any one know how I can know the properties of the Run button on the pop-up window?
That window appears to be a Java window, which is not supported by Coded UI.
You may be able to extend your tests to interact with the Window:
https://blogs.msdn.microsoft.com/gautamg/2010/01/05/1-introduction-to-coded-ui-test-extensibility/
Alternatively, if you can detect if the window is present, you may be able to emulate the keypresses required to dismiss/approve the window (e.g Enter, or Tab + Enter). Or, if the window's location is predictable, emulate a click at the desired location.

Is it possible to open the Spotfire script window without navigating through a button?

To open scripts in a given dxp I have to right click a button, select Edit Control, then I can create or edit scripts. I'm wondering if I can do this without going through a button?
from the main menu bar, Edit...Document Properties...Scripts (tab)

Caption bar not being repainted in MFC

Alright, I'm using VS2012 with MFC in Windows 8 and I'm having a problem.
Let's say I have a very simple dialog in my application. When I click on a different window (for example on the Taskbar), the caption bar color indicates that the dialog is still focused!
This problem happens in several cases. For example, when I use CFileDialog to select some files, after closing the dialog, caption bar color indicates that the dialog is still inactive while it's automatically focused after closing the open dialog!
Now let's say I have two dialogs in my application. Dialog A is my primary dialog and I use a button to show modal dialog B. In standard applications, if I click on dialog A, dialog B caption bar flashes. This doesn't happen in my application and I think it's because of a bug in MFC.
Any ideas how to fix this problem?

Managing focus between multiple CDHtmlDialog windows

I create a modal CDHtmlDialog as my root window, and then create a modeless CDHtmlDialog window. Based on the events, clicking between the two windows shifts focus, but the root window is always in the back. How do I fix this?
The modeless dialog is alway on-top of the the root dialog is because the modeless dialog is created as a child of the root dialog. You can change this by making the modeless dialog a child of the desktop window instead as follows:
m_MyModelessDlg.Create(IDD_DIALOG1, GetDesktopWindow());
m_MyModelessDlg.ShowWindow(SW_SHOWNORMAL);
Using the desktop didn't seem to help.. I suspect because of the behavior of CDialogs. I fixed it by creating a hidden, root window, and making all of my dialogs (CDHtmlDialog's) children of that.

Keep taskbar icon, replace MFC dialog

I have a MFC dialog based application. User can change the language of the dialog, and I made this by closing existing dialog, and opening another with changed language. The problem is that the effect in the taskbar is that one icon is removed, and another identical is created in its place. If my application's icon is not the last icon in the task bar it will be perceived as it was moved to the end of taskbar icon set.
I want to retain icon's position in the taskbar, and rather to prevent icon flicker at all from happening. How do I do that?
The application must support OS'es from Windows XP to Windows 7.
EDIT: alternative question for which I would accept an answer is how to create an invisible window that is nevertheless shown in the taskbar, and how to forward relevant window messages from that window to my main window?
Make the dialog a child of another outer parent window. The parent can be a dialog or any other kind of window; all it will be providing is the title bar. If the user tries to resize it it will have to forward resizing commands to the dialog, but otherwise you shouldn't need to do much in the parent window.
Why not replace the dialog with a CFormView instead? That way there's a frame window that wraps around the dialog (which is embedded in a form view) and it's the frame window that owns the taskbar icon.
Create an SDI application that displays a CFormView. Display the dialog in the default language (or whatever langauge the user previously chose) on initialization. When the user chooses the 'change language' option, simply change the form view that's being displayed with a new one.
Bonus feature: with this design, the framework will take care of things like language-specific accelerators and menus for you with no effort on your part.
For more on how to do this, check out http://www.codeguru.com/cpp/w-d/doc_view/viewmanagement/article.php/c3341/Multiple-Views-Using-SDI.htm

Resources