Click here to Skip to main content
15,892,059 members
Articles / Desktop Programming / MFC

DHTML User Interface Library

Rate me:
Please Sign up or sign in to vote.
4.75/5 (12 votes)
1 Mar 2013CPOL 276.5K   3.1K   145  
Implement an advanced DHTML user interface in your own MFC applications
// HtmlDialog.h : header file
//
/////////////////////////////////////////////////////////////////////////////

#ifndef __HTMLDIALOG_H__
#define __HTMLDIALOG_H__

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

/////////////////////////////////////////////////////////////////////////////
// CHtmlDialog class

class CHtmlDialog
{
// Construction
public:
	CHtmlDialog();
	CHtmlDialog(LPCTSTR lpszURL, BOOL bRes = FALSE, CWnd* pParent = NULL);
	CHtmlDialog(UINT nResID, CWnd* pParent = NULL);

// Attributes
public:
	void SetSize(int x, int y);

protected:
	HWND				m_hWndParent;
	CString			m_strOptions;
	COleVariant	m_varArgs, m_varReturn;
	CString			m_strURL;
	HINSTANCE		m_hInstMSHTML;

// Operations
public:
	void 				SetParam(LPCTSTR lpszArgs);
	void 				SetParam(VARIANT* pvarArgs);
	void 				SetDlgOptions(LPCTSTR lpszOptions);
	LPCVARIANT 	GetReturnVariant();
	CString 		GetReturnString();

	virtual int DoModal();

// Implementation
public:
	virtual ~CHtmlDialog();

private:
	inline void ResourceToURL(LPCTSTR lpszURL);
	void CommonConstruct();

#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

};

/////////////////////////////////////////////////////////////////////////////

#endif // __HTMLDIALOG_H__

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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Help desk / Support Verint Systems, Inc.
United States United States
Ted has been programming computers since 1981 and networking them since 1984. He has been a professional technology manager and computer networking consultant for more than 20 years.

Feel free to connect with Ted on LinkedIn

Comments and Discussions