aboutsummaryrefslogtreecommitdiff
path: root/Src/nu/CGlobalAtom.h
blob: b9fbd89a08a2ce1cc090632facbe02b2e5107fbf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#pragma once

#include  <windows.h>
class CGlobalAtom
{
public:
	CGlobalAtom(LPCWSTR name)
	{
		prop = GlobalAddAtomW(name);
	}
	~CGlobalAtom()
	{
		if (prop)
			GlobalDeleteAtom(prop);
		prop=0;
	}
	operator ATOM() { return prop; }
	operator LPCWSTR() { return (LPCWSTR) prop; }
private:
	ATOM prop;
};