Click here to Skip to main content
15,896,407 members
Articles / Containers / Virtual Machine

An extendable report editor

Rate me:
Please Sign up or sign in to vote.
5.00/5 (11 votes)
3 Sep 2008CPOL3 min read 41.2K   2K   35  
An extendable report editor. You can simply add your own controls without recompiling the program or writing annoying plug-ins.
// Misc.h: interface for the CWinMisc class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_MISC_H__11127D51_8EB8_4E4F_BE5C_AFECB701BD11__INCLUDED_)
#define AFX_MISC_H__11127D51_8EB8_4E4F_BE5C_AFECB701BD11__INCLUDED_

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

#include <SHLOBJ.H>
#include <io.h>
#include <commdlg.h>
#include <SHELLAPI.H>
#include <mmsystem.h>

#pragma comment(lib, "winmm.lib")

#include "common.h"

class CWinMisc  
{
public:
	static int ShowMsg(HWND hwnd,char *title,UINT uType,char *szFormat, ...);
    static int FolderSelect(HWND hp,char *dir);
    static int IsDir(char *fn);
    static int GetAFileName(HWND hp,LPSTR fn);
    static int ChooseColor(HWND hp,COLORREF *color);
	static int ChooseFont(HWND hp,LOGFONT *lf);
    static HRESULT CreateLink(LPCSTR lpszPathObj,LPSTR lpszPathLink,LPSTR WorkDir);
    static int DeleteFolder( LPSTR pszFolder);
	static int AddWindowStyle(HWND hwnd,UINT style);
	static int AddWindowExtStyle(HWND hwnd,UINT ext_style);
	static int RemoveWindowStyle(HWND hwnd,UINT style);
	static int RemoveWindowExtStyle(HWND hwnd,UINT ext_style);
	static int IsKeyDown(int nVirtKey);
	static int SetTopMost(HWND hwnd,bool flag);
	static int PlaySound(void *buf);
	static int MsgLoop();
	static char* GetRecourceAddr(DWORD id,char *type,long *size);
};

#endif // !defined(AFX_MISC_H__11127D51_8EB8_4E4F_BE5C_AFECB701BD11__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 Code Project Open License (CPOL)


Written By
Software Developer
China China
26 years old, 2 years work experience.

Comments and Discussions