|
///////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2009 Carlo McWhirter. All Rights Reserved.
// Copyright (c) 2009 Hyteq Systems. All Rights Reserved.
//
// http://www.hyteq.com
//
// Hyteq Systems Educational License
//
// This file is part of WM3DSpectrum, also known as 3D Spectrum Analyzer for
// Windows Media Player. This file, the project that this file is part of, and
// the resulting compiled program files are intended to be used for educational
// purposes only. Use of this file or this project for any non-educational or
// non-observatory purpose is strictly prohibited without the express written
// consent of all of the copyright holders listed above.
//
// This file may only be modified and later redistributed by one or more of the
// copyright holders listed above. Suggestions for bug fixes, enhancements,
// and other modifications must be sent directly to one of the copyright holders.
//
// This file may be modified without being redistributed by any recipient of
// this file provided the modifications are NOT intentionaly or unintentionaly
// directed toward malicious or illegal purposes, but, instead, toward educational
// purposes only.
//
// THIS SOFTWARE IS PROVIDED 'AS-IS', WITHOUT ANY EXPRESS OR IMPLIED
// WARRANTY. IN NO EVENT WILL THE AUTHORS BE HELD LIABLE FOR ANY DAMAGES
// ARISING FROM THE USE OF THIS SOFTWARE.
//
// This notice may not be removed from this file or altered in any manner.
//
///////////////////////////////////////////////////////////////////////////////
#include "atlwin.h"
class CPropertyDialog : public CDialogImpl<CPropertyDialog>
{
public:
enum { IDD = IDD_PROPERTYDIALOG };
BEGIN_MSG_MAP(CPropertyDialog)
MESSAGE_HANDLER( WM_INITDIALOG, OnInitDialog )
COMMAND_ID_HANDLER( IDOK, OnOK )
COMMAND_ID_HANDLER( IDCANCEL, OnCancel )
END_MSG_MAP()
CPropertyDialog(CWM3DSpectrum *pPlugin)
{
m_pPlugin = pPlugin;
}
LRESULT OnInitDialog( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& fHandled )
{
CenterWindow();
// initialize text
SetDlgItemText(IDC_MESSAGEEDIT, m_pPlugin->m_szPluginText);
return 1;
}
LRESULT OnOK(WORD wNotifyCode, WORD wID, HWND hwndCtl, BOOL& fHandled)
{
// save text
GetDlgItemText(IDC_MESSAGEEDIT, m_pPlugin->m_szPluginText, sizeof(m_pPlugin->m_szPluginText) / sizeof(m_pPlugin->m_szPluginText[0]));
EndDialog( IDOK );
return 0;
}
LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hwndCtl, BOOL& fHandled)
{
EndDialog( IDCANCEL );
return 0;
}
private:
CWM3DSpectrum *m_pPlugin; // pointer to plugin object
};
|
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.
I'm a Microsoft Certified Professional (MCP) in C++. I'm fluent in C/C++, C# and many other languages.