Click here to Skip to main content
15,867,568 members
Articles / Desktop Programming / ATL

Win32 Dialog Helpers

Rate me:
Please Sign up or sign in to vote.
4.94/5 (38 votes)
18 Apr 200311 min read 273.2K   3.1K   79  
Easy support for dialog resizing and ActiveX controls
This article provides a few samples to enable features in WIN32 dialogs such as support for dialog resizing and ActiveX controls. VC++6 / VC++7.x projects are provided.
// main.cpp : Defines the entry point for the application.
//

#include "stdafx.h"
#include "resource.h"
#include "ResizableGrip.h"
#include "AboutDialog.h"
#include "SampleDialog.h"
#include "SampleAxDialog.h"
#include "WindowsMediaAxDialog.h"
#include "WebBrowserAxDialog.h"

CComModule _Module;


int APIENTRY WinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPSTR     lpCmdLine,
                     int       nCmdShow)
{

	INITCOMMONCONTROLSEX InitCtrls;
    InitCtrls.dwICC = ICC_LISTVIEW_CLASSES;
    InitCtrls.dwSize = sizeof(INITCOMMONCONTROLSEX);
    BOOL bRet = InitCommonControlsEx(&InitCtrls);


    _Module.Init(NULL, hInstance, &LIBID_ATLLib);

	// CAboutDialog dlg; // about box
	// CSampleDialog dlg; // resizable dialog
	// CSampleAxDialog dlg; // sample dialog
	// CWindowsMediaAxDialog dlg; // windows media player
	CWebBrowserAxDialog dlg; // web browser
	dlg.DoModal();



 	// TODO: Place code here.

    _Module.Term();

	return 0;
}



By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


Written By
France France
Addicted to reverse engineering. At work, I am developing business intelligence software in a team of smart people (independent software vendor).

Need a fast Excel generation component? Try xlsgen.

Comments and Discussions