Click here to Skip to main content
15,895,656 members
Articles / Desktop Programming / WTL

Using XML, XSL, DHTML and Javascript in your Windows applications

Rate me:
Please Sign up or sign in to vote.
2.23/5 (9 votes)
24 Jul 2001CDDL3 min read 114.3K   3.9K   75  
This article shows how to dynamically create XML documents, transform these using XSL and then displays the resulting HTML into a browser control. Also demonstrates using HTML and images from resources.
// AHN EditorView.h : interface of the CAHNEditorView class
//
// Author: M.A. Nischalke
// Copyright 2001, MANSoft
// 
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_AHNEDITORVIEW_H__B562B80D_0A19_46ED_8D3B_F99F7AFB2B7A__INCLUDED_)
#define AFX_AHNEDITORVIEW_H__B562B80D_0A19_46ED_8D3B_F99F7AFB2B7A__INCLUDED_

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

#include "resource.h"

class CMainFrame;

class CAHNEditorView :	public CDialogImpl<CAHNEditorView>,
						public CScrollImpl<CAHNEditorView>,
						public CWinDataExchange<CAHNEditorView> 
{
public:
	CAHNEditorView();
	~CAHNEditorView();

	enum { IDD = IDD_AHNEDITOR_FORM };

	BOOL PreTranslateMessage(MSG* pMsg);

	BEGIN_MSG_MAP(CAHNEditorView)
		MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
		MESSAGE_HANDLER(WM_VSCROLL, OnVScroll)
		MESSAGE_HANDLER(WM_HSCROLL, OnHScroll)
		COMMAND_HANDLER(IDC_ENTER, BN_CLICKED, OnEnter)
		DEFAULT_REFLECTION_HANDLER()
	END_MSG_MAP()

	BEGIN_DDX_MAP(CAHNEditorView)
		DDX_TEXT(IDC_HEADLINE, m_strHeadline)
		DDX_TEXT(IDC_ABSTRACT, m_strAbstract)
		DDX_TEXT(IDC_SOURCE, m_strSource)
	END_DDX_MAP() 

	LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM wParam, LPARAM /*lParam*/, BOOL& /*bHandled*/);
	LRESULT OnVScroll(UINT /*uMsg*/, WPARAM wParam, LPARAM /*lParam*/, BOOL& /*bHandled*/);
	LRESULT OnHScroll(UINT /*uMsg*/, WPARAM wParam, LPARAM /*lParam*/, BOOL& /*bHandled*/);
	LRESULT OnEnter(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);

	HWND CreateEx(HWND hWnd, CMainFrame* pFrame);
	BOOL Paste();
	BOOL Copy();
	BOOL Cut();
	BOOL Undo();

	inline CString GetHeadline() const { return m_strHeadline; };
	inline CString GetAbstract() const { return m_strAbstract; };
	inline CString GetSource() const { return m_strSource; };
	CString GetKeywords();
	CString GetDate();
	
	void SetFocus(UINT uID) { ::SetFocus(GetDlgItem(uID)); };

private:
	CString m_strHeadline;
	CString m_strAbstract;
	CString m_strSource;
	
	CDateTimePickerCtrl m_Date;
	CListBox m_Keywords;
	CMainFrame*	m_pMainFrame;

private:
	inline CMainFrame* GetMainFrame() const { return m_pMainFrame; };
};


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

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_AHNEDITORVIEW_H__B562B80D_0A19_46ED_8D3B_F99F7AFB2B7A__INCLUDED_)

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 Common Development and Distribution License (CDDL)



Comments and Discussions