Click here to Skip to main content
15,881,797 members
Articles / Desktop Programming / MFC

Add XP Style Scrollbar to listctrl, listbox and so on (by self-draw)

Rate me:
Please Sign up or sign in to vote.
3.61/5 (13 votes)
8 Mar 2005CPOL 179.5K   1.9K   21  
Implement XP style scrollbar by self-draw
///////////////////////////////////////////////////////////////////////////////////////////

// �ļ�����regkey.h

// �����ߣ�wangyun

// ����ʱ�䣺2000.6.21

// ����������ע�����ͷ�ļ�

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


#if !defined(AFX_REGKEY_H__A3D3BEA1_AC84_11D3_B6C9_0080C8D668AC__INCLUDED_)
#define AFX_REGKEY_H__A3D3BEA1_AC84_11D3_B6C9_0080C8D668AC__INCLUDED_

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

namespace Sure
{
class AFX_EXT_CLASS CRegKeyEx  
{
public:
	CRegKeyEx();
	virtual ~CRegKeyEx();

public:
	LONG RegOpen(HKEY hKeyRoot,LPCTSTR pszPath);
	LONG RegDel(LPCTSTR lpSubKey);
	void RegClose();

	LONG RegRead (LPCTSTR pszKey,DWORD& dwVal);
	LONG RegRead (LPCTSTR pszKey,CString& sVal);
	LONG RegRead (LPCTSTR pszKey,BYTE *pData,DWORD& dwLength);

	LONG RegWrite (LPCTSTR pszKey,DWORD dwVal);
	LONG RegWrite (LPCTSTR pszKey,LPCTSTR pszVal);
	LONG RegWrite (LPCTSTR pszKey,const BYTE *pData,DWORD dwLength);

protected:
	HKEY m_hKey;
	CString m_sPath;

};
}//namespace
#endif // !defined(AFX_REGKEY_H__A3D3BEA1_AC84_11D3_B6C9_0080C8D668AC__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
xwp
Software Developer www.MayGion.com
China China
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions