Bunkai.Satori
Bunkai.Satori

Reputation: 4758

Visual Studio 2012 Resources Editor for non MFC applications

Visual Studio Resources Editor undoubtedly contains valuable set of tools that help when creating UI for MFC applications, especially various dialogue boxes and graphic elements.

I have reasons to stay with non-managed C++, which mean staying without the usage of Windows Forms. I therefore got an idea, if it is possible to use resources created with VS2012 Resources Editor in non-managed C++ while creating non-MFC applications.

I use:

Thank you.

Upvotes: 0

Views: 863

Answers (1)

Mike Kwan
Mike Kwan

Reputation: 24447

MFC is essentially a wrapper around WinAPI and as such resource files can be used completely without MFC. At design/compile time:

  1. Drag and drop your resources to create the .rc file
  2. Include the generated header file - #include "resource.h"

At runtime:

  1. In your code, make sure to call InitCommonControlsEx
  2. Load the resources with WinAPI calls such as DialogBox, CreateDialog, etc.

Upvotes: 2

Related Questions