How to add an ActiveX control to a Visual C++ 2010 project

In a previous blog post we showed how to add an ActiveX control to a Microsoft Visual Basic 2010 project. In this blog post we will show how to add an ActiveX control to a Microsoft Visual C++ 2010 project. We will also show how to create a variable that can be used to access properties and methods in the ActiveX control.
Twitter
In this step-by-step tip we will use the Twitter control that is included in our SamLogic Social Media Components component library. This control can be used to send tweets to Twitter, and we will show how to add this control to a Visual C++ project. Although this tip will cover Microsoft Visual C++ 2010, the steps in other versions of Visual C++ are very similar.

How to add an ActiveX component to a Visual C++ 2010 project

1. Start Visual Studio 2010 and choose New project in the File menu.

2. Select the MFC Application option in the Visual C++ node in the New project dialog box.

New Project - Visual C++ - MFC Application

3. In the MFC Application Wizard window that is shown, choose Dialog based in the Application Type step. We will create a dialog based Windows application.

4. In the Advanced Features step in the MFC Application Wizard, make sure that the ActiveX controls option is selected.

5. In the last step of the MFC Application Wizard, click on the Finish button.

We have now created a basic Visual C++ / MFC project that uses a dialog based window. Next will show how to add the Twitter ActiveX control to the project:

6. Right-click over the Toolbox window.

7. Select the Choose items menu item in the local menu that is shown.

The 'Choose Items' menu item

8. The Choose Toolbox Items dialog box is now shown. In this dialog box, open the COM Components tab.

9. If you have installed the Twitter component and want to use it, select the SLTwitCtrl control in the list. Otherwise, select the ActiveX component that you want to use.

The 'Choose Toolbox Items' dialog box in Visual C++

10. Click OK to close the dialog box.

11. The selected component should be visible in the Toolbox window; probably in the bottom of the window.

12. Now drag and drop the component on the dialog box.

The Twitter ActiveX control is placed in the dialog box

We have now included an ActiveX component into a Visual C++ 2010 project and put it in a dialog box. We will now show how to create a variable that can be used to access properties and methods in the ActiveX control.

13. Right-click on the ActiveX control in the dialog box window.

The 'Add Variable' menu item

14. Click on the Add Variable menu item in the local menu that is shown.

15. Enter a variable name in the dialog box that is shown, for example: SLTwitterCtrl.

The 'Add Member Varible Variable' dialog box

15. Click Finish to close the dialog box and create the variable

16. We have now created a variable that can be used to access properties and methods in the ActiveX control. The example below shows how to access the AppName property in SamLogic’s Twitter Control (it sets the ActiveX property to “Twitter Test Application”):

Code example - How to access the AppName property in SamLogic's Twitter component in Visual C++

Related Blog Posts
> How to add an ActiveX component to a Visual Basic 2010 project
> How to add an ActiveX component to an Excel 2010 sheet

SamLogic MultiMailer 2013 has now been released

SamLogic MultiMailer 2013

We have now released a new version of our newsletter tool SamLogic MultiMailer. Some new features in the latest version are:

SamLogic MultiMailer 2013 – New Features
– Full support for Microsoft Windows 8 and Microsoft Windows 8.1.
– Better support for international characters. Unicode is now fully supported.
– Support for Twitter. You can now send tweets directly from MultiMailer.
– Support for Dropbox and SkyDrive.
– Support Outlook 2013 and Excel 2013.
– Better support for smartphones and tablet computers.
– New statistics & analysis functions. You can now see when newsletters are opened.
– A new powerful filtering function in the Statistics tab.
– Better handling of e-mail bounces.

More Information
A more detailed description of the new features are available on this webpage:
> SamLogic MultiMailer 2013 – News

How to use SamLogic Image Resizer – Video

In this video, that is published on YouTube, you will get a short demonstration of how to use our image resizer / converter application SamLogic Image Resizer.

SamLogic Image Resizer is used to resize and convert images (for example photos) so they can be used in web sites, blogs, e-mail newsletters, and with applications. The tool makes images smaller in size, optimizes the images resolution (DPI) for best quality on screens, and can also convert CMYK color images to RGB color images.

Download SamLogic Image Resizer
SamLogic Image Resizer is installed together with our other software, but you can also download it separately from the following web page:

> Download SamLogic Image Resizer

It is free to use SamLogic Image Resizer. You can also distribute it to other users, if you think they will have use of the program.

Visual Installer: Prime number based license keys

One important key feature in Visual Installer is the ability to create and handle license keys (installation keys). Visual Installer can handle both static license keys and prime number based license keys.

Prime number based license keys
Prime number based license keys are license keys that are created by using a formula that includes prime numbers. By combining this with a checksum, Visual Installer can very easy check that an entered license key is correct or wrong. You don’t need to include your license keys with the installation; pure mathematics is used to verify the license key.

It is also very difficult for a person to manipulate the license key and create false license keys. Not all combinations are allowed and besides that, also the checksum must be correct. So a “cracker” must consider two things in the same time, which makes it difficult to “crack” the key.

How to create prime number based license keys?
If you want to use prime number based license keys in your installation, follow the steps below to create the keys:

1. Start Visual Installer
2. Open the Dialog boxes tab in the editor
3. Click on the ”…” button to the right of the License key option
4. Click the Prime number based license keys button
5. In the dialog box that is shown you can create prime number based license keys

You can create prime number based license keys with Visual Installer

When does Visual Installer ask for the prime number based license key?
Before the actual installation of files starts, a setup wizard with dialog boxes is shown for the end-user. Among these dialog boxes there is one dialog box that asks for a license key. In the picture below you can see how the dialog box looks like:

The 'License Key' dialog box

The installation will not continue until correct license key has been entered. If the end-user enters wrong license key too many times the installation is stopped.

Note
Handling of prime number based license keys is only included in the Professional version of Visual Installer, not in the Standard version. If you have the Standard version and want to change to the Professional version, read this blog post.

See Also
> Visual Installer can show visually when a license key is correct
> How to block a license key when using Visual Installer
> The setup wizard in Visual Installer

Start button back in Windows 8.1

Windows 8.1As you may already know, and as we described in an article on our website, Microsoft removed the Start button in Windows 8. This raised much criticism among Windows users and Microsoft have partly listened to them and re-introduced the Start button in the upcoming Windows 8.1 that will be released later this year. However, there is no traditional Start menu as in earlier versions of Windows. Instead, the Start screen is shown if you click on the Start button (see image to the right). The new Start button is placed at the bottom left of the screen, just like in older Windows versions.

Windows 8.1 - Right-click Start menuWindows 8.1 – Right-click menu
It is also possible to right-click on the Start button and display a shortcut menu for Control Panel and Windows Explorer among other options. You can also turn off or restart Windows from this menu (see image to the right).

Displays traditional desktop at start
Another new feature in Windows 8.1 is that the computer can be started with the traditional desktop right away instead of clicking around with your mouse or using the keyboard to bring up the traditional desktop as you had to do in the previous version of Windows 8. This is welcome news for many, especially for companies that are still using traditional Windows programs (Windows desktop applications).

Other news
Some other news in Windows 8.1 are:
– Improved support for SkyDrive
– Internet Explorer 11 included
– Improved support for security
– Extended support for VPN
– Improved and more flexible Home screen
– Support for 3D printers

The following YouTube video from Microsoft presents news on Windows 8.1:

More information
More information about the new features in Windows 8.1 can be found on these pages:
> Microsoft: What’s New in Windows 8.1
> Guardian: Windows 8.1 review: Microsoft’s fresh Start?

Download Windows 8.1 Preview
Right now it is possible to download a preview version of Windows 8.1:
> Download English version of Windows 8.1
> Download Swedish version of Windows 8.1

Related information about Windows 8
> Article: New Keyboard Shortcuts (Hot Keys) in Windows 8
> Article: Why Were the Start Button & Start Menu Removed in Windows 8?

Visual Installer: How do I install files to the Program Files folder?

Applications (programs) are usually installed to the Program Files folder in Windows. The exact folder path may differ between different versions of Windows. The folder path is for example different between a 32 bit and 64 bit Windows, and for example a Spanish Windows uses a different folder path than an English Windows.

This will make it difficult to hard code the folder path to the Program Files folder. If you use Visual Installer for your setup projects you can use an environment variable to handle the Program Files folder. The name of the variable is %PROGRAMFILES and the variable will be replaced with the current folder path to the Program Files folder during the installation. By using this variable you don’t need to worry about the bitness of the Windows or which country / language version of Windows that is run.

More information
We have published more information about the %PROGRAMFILES variable in the following two Visual Installer related blog posts:

> How to install files in the correct folder using Visual Installer
> How Visual Installer handles 64 bit folders in Windows

Free HTML editor from Microsoft: Expression Web

Microsoft Expression Web is a powerful and feature-rich HTML editor from Microsoft. The first version came in 2006 as a successor to the very popular and widely spread HTML tool Microsoft FrontPage. Expression Web is aimed for more experienced web developers. It is a competitor to Adobe DreamWeaver and just like DreamWeaver it is a HTML tool that is primarily designed to develop more sophisticated websites. HTML tools can also be used to create newsletters if you have a good knowledge of HTML and you know what works for e-mail.

Download Microsoft Expression Web for free
In December 2012 stopped Microsoft with further development of Expression Web and as a result they decided to release he program for free. It is therefore possible to download it for free from Microsoft website. However, Microsoft will continue to maintain the product and release possible security updates up until 2015. The program can be downloaded through this website:
> Microsoft Expression Web 4 – Free Version

More information about Microsoft Expression Web
> Microsoft Expression Web – Wikipedia

Templates that can be used together with Microsoft Expression Web
> Expression Templates | REVIEWED Expression Web Template Resources
> Over 20,000 Professional Business Templates for Microsoft Expression Web & WebMatrix
> Expression Web Tutorials / Expression Web Free Templates

Visual Installer supports PFX (Personal Information Exchange) files

We have updated Visual Installer so you can choose a PFX file (Personal Information Exchange file) directly from the Visual Installer editor, when you want to code sign a setup package. You don’t need to split the PFX file in a SPC file and a PVK file as before.

The Code Signing tab in the Setup options dialog box in the Visual Installer editor has been updated. In the picture above you can see how the new updated Code Signing tab looks like.

In the Code Signing tab there is now two sub tabs: PFX and SPC / PVK. In these tabs you can choose if you want to use a PFX file or a SPC and a PVK file during the code signing process. If you have specified a PFX file you don’t need to to specify a SPC and a PVK file. And vice versa.

More information about code signing in Visual Installer
More general information about code signing in Visual Installer is available on this web page:

> Visual Installer – Can create a code signed setup package

ActiveX Component for Twitter

Twitter is a popular social networking and microblogging service on the Web that let users send and read short text-based messages (up to 140 characters), also known as a “tweets”. We have now created an ActiveX component (Active control) that can be used to send messages (tweets) directly from desktop applications.

URL shortener
We have also inluded a URL shortering function in the Twitter ActiveX. The function uses the Bitly service to shorten URLs, but it is also possible to the let Twitter shorten the URLs. Both systems are supported by the Twitter component.

More information
You can read more about the Twitter ActiveX component on this web page on our web site:
> SamLogic’s Twitter Component: SLTwitCtrl ActiveX Control

Other news: Also our desktop applications will support Twitter soon
We will also add support for Twitter in our other software. We will first add support to our e-mail marketing tool MultiMailer. You will soon be able to send tweets directly from the program. You can for example tweet about your latest newsletter that you just sent out, or currently is delivering! We will also add this functionality to Visual Installer, so you can tweet about new versions of your software directly from Visual Installer. Same function will be added to CD-Menu Creator.

More information about this new feature in our desktop applications will be coming soon.

Free pictures for newsletters and your blog

In a previous blog thread we published a list of websites that provide free icons (small pictures) that can be used for your newsletter, homepage, blog or program. In this blog thread we bring up a new article that you can find on our homepage which contains links to websites where you can download free images (for example photos) of high quality. Even those pictures will fit well your newsletters, blogs, homepages and programs etc.

There are many websites on the Internet that offer professional images such as photos or computer generated pictures. In an article we have put together a list of links to such websites with high level of standard. Many of these images can be used for free for both private and commercial purposes while others can be bought cheaply. The available image formats usually are JPEG, PNG, GIF, TIFF and BMP. The article brings also up some search engines – specialized for images – that you can use for finding free images or images you are willing to pay for. You can find the article here:

> Free pictures for newsletters and your blog