Where are custom menu items saved? - menuitem

I am creating several custom menu items in SPSS to access several custom created SPSS scripts and syntax.
In order to aviod re-creating all the menu items on every single machine. Is there a file where these menus are saved when created that can be copied and transfered to other machines?

SPSS Statistics has two different mechanisms for custom menus. If you are using View>Menu editor, the customizations are stored in the Registry (on Windows). The Registry key is version specific, and this structure can change from release to release.
For dialogs (and their menu items) created by the Custom Dialog Builder, the pieces are stored under the ext\lib directory. By default, that is under the Statistics installation directory, but it can be elsewhere according to the settings of the users SPSS_CDIALOGS_PATH environment variable or in the APPDATA area. Custom dialogs are stored as a properties file and an xml file with the same name as the dialog box. There may also be an htm help file for the dialog. If the dialog is translated, there will be localized versions of the properties and htm files stored in the same location.
On startup, Statistics searches these directories and adds the relevant menu items to the display.

Related

Unplated icon for MSIX-packed Win32-application doesn't work

I am trying to generate a MSIX-installer for a Win32-OpenGL-application, which is supposed to be deployed in Microsoft Store. Therefore, I have first built the .exe-file in Visual Studio and packed it with MSIX Packaging Tool to a .msix-installer. After that, I edited the .msix-package and added the required images (Square44x44Logo.png, Square71x71Logo.png,...). Unfortunately, I found out that the icon in the task bar was plated. I tried to add another image (Square44x44Logo.targetsize-44_altform-unplated.png) to the .msix-package by editing it again with the MSIX Packaging Tool, but the task bar icon remained plated. How can I change my task bar icon to unplated?
Unplated assets
By default, Windows uses a target-based asset on top of a colored
backplate by default. If you want, you can provide a target-based
unplated asset. "Unplated" means the asset will be displayed on a
transparent background. Keep in mind that these assets will appear
over a variety of background colors.
Unplated assets and themes
The user's selected theme determines the color of the taskbar. If the
unplated asset isn't specifically qualified for the current theme, the
system checks the asset for contrast. If it has enough contrast with
taskbar, the system uses it. Otherwise, the system looks for a
high-contrast version of the asset. If it can't find one, the system
draws the plated form of the asset instead.
Follow the steps below to solve this problem:
Obtain the correct 44x44 images and then copy them into the folder
that contains your images (i.e., Assets).
For each 44x44 image, create a copy in the same folder and append
.targetsize-44_altform-unplated to the file name. You should have two
copies of each icon, each named in a specific way. For example, after
completing the process, your assets folder might contain
MYAPP_44x44.png and MYAPP_44x44.targetsize-44_altform-unplated.png.
In the manifest file, set the BackgroundColor for every icon you are
making transparent.
Continue to the next subsection to generate a new Package Resource
Index file.
For more details, refer: Add Target-based unplated assets
Here is a similar case for your reference.
unplated taskbar icons in Desktop Bridge apps

Is there any way to change Sitecore Rocks Sub layout template structure (VS 2013)?

When I create new item -> sub layout it will create web user control. I need change the template structure of web user control's code behind file (using should come outside of namespace) when it creating.
The default templates for the Sitecore Items is in the following folder:
C:\Users\<username>\AppData\Local\Microsoft\VisualStudio\12.0\Extensions\<install-id>\ItemTemplates\Sitecore
Extract Sublayouts.zip file from Sublayouts folder, move the using statement to outside the namespace in Sublayout.ascx.cs and re-pack the zip file. Restart Visual Studio and the changes should take effect.

Disabling/Enabling choose button of QFileDialog based on specific criteria

I have a QFileDialog prompting the user to select a directory. I am running QT version 4.3.5. I do not have the option of upgrading either.
I want the user to only be able to choose directories that contain two files with specific names. Something along the lines of disabling the "Choose" button if it does not contain these two specific files.
The searching I have done has only led me to ways of filtering the results, which is not what I want to do since the user needs to be able to browse all directories and all sub directories. If a directory is selected, then the check should be made to disable/enable the "Choose" button based on the above criteria.
Like I said, the only half close solutions I have found are explained in this thread QFileDialog for directories that have certain content
or this thread qfiledialog - Filtering Folders?
Both of those half solutions to my question require the use of QFileSystemModel, which wasn't introduced until QT 4.4.
How can I enable/disable the "Choose" button of a QFileDialog with QFileDialog::Directory set as the FileMode based on whether or not the selected/activated directory contains two specific files?
Thanks
You need to copy the file dialog's sources over to your project, modify the name of the class, and start tweaking it. That's the only way, unfortunately.

Contextual Menu to a Specific Folder

I have read how to add a contextual menu though registry to all files or files according the extension.
But how can I add a contextual menu that will work ONLY on files of a specific folder (for example on files of folder C:\contmenu)?
Can this be done?
Thanks a lot.
If you're implementing a context menu shell extension, you get the path of the item in your IShellExtInit::Initialize() method. Then you can decide depending on the path whether to add your entries to the context menu or not.
It's not possible to register an extension just for a specific path though.

Is there a standard directory browser dialogue in MFC that doesn't involve the user creating directories to specify ones that don't yet exist?

I am working on the bootstrap application of an installer, and I have a dialogue that the user can open to select a different target directory from the given default. Currently, I'm using the CFolderDialog for that, but for the user to select a folder that doesn't yet exist, he has to create the folder first. Once the user has specified the directory, I want to be able to delete it so that, when I launch the installer, it can create the folder itself such that it gets flagged for uninstall. Also, if the user cancels out of my bootstrap application at any time, I don't want any unwanted folders lying around from when the user mucked around in the folder browser. The problem that I'm having is that, if I try to remove the folder that the user created while browsing for a new target folder, I get a sharing violation error. (I compare the directory's creation time with what the system time was at the time the dialogue was launched to make sure that it's OK for me to delete the directory.)
What I need is either a way to get around that sharing violation or another standard dialogue that doesn't involve the user having to create a new directory in order to specify it just because it doesn't yet exist.
Edit: When I originally posted this, I forgot that the folder dialogue that I'm using is actually the XFolder Dialog on the Code Project site. While it does let the user browse for a directory, it's not as intuitive as folder browser dialogues that I've seen in installers in the past. What I'd really want is something where the user can browse to the folder in which their new folder is to go and then simply append the new folder to the path in the dialogue's edit box without having to create the new folder.
Update As the XFolder dialogue is a customization of the standard Open File dialogue which uses a template, it does not work on Vista or newer OSs. Because of this, I must abandon use of this for something else. I'm still looking for a solution here. If someone can show me how to set the initial directory (as opposed to the root directory) when using SHBrowseForFolder(), I'd be willing to use that as my solution.
For your purpose, it would probably make sense to let the user select a base directory, e.g. "C:\Program Files" (creating one in the process if so desired) and install into a subdirectory of that (a name which you append to the selected path and let your installer create). Display the combined path after the user has selected the base. This way, the user doesn't feel like he has taken on responsibility for the directory you're creating, but still has a reasonable level of control over the destination.
I have never seen such a dialog window, neither in MFC nor in any other technology. I agree with Shog9, you should provide the user with a way to separate the selection of a base directory and the creation of directories.
You can use SHBrowseForFolder without specifying neither BIF_BROWSEINCLUDEFILES or BIF_NONEWFOLDERBUTTON.