Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide to Clip-4-Win version 3.0 - <b>globaladdatom()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
GlobalAddAtom()
Add an atom to the Windows system atom table
------------------------------------------------------------------------------

Syntax
GlobalAddAtom( <cName> )   -->   hAtom

Arguments
<cName> is the name of the atom to be added.

Returns
If successful, this function returns a handle to the atom.
This handle will be a non-zero numeric.  Otherwise, zero (0)
is returned.

Description
This function adds a string to the system-wide atom table
maintained by Windows, and returns a handle to the atom.  An
atom may be any string, excluding null characters, although
you should keep them reasonably short (to avoid consuming too
much memory).

You will probably only use atoms if you are programming DDE.

Example
#define   MAKELPARAM( low, high )  ( low + ( high * 65536 ) )

// Request the current value of item cItem in format nFmt
// (the data comes back with a WM_DDE_DATA message).

procedure DDERequest( hWndServer, hWndClient, nFmt, cItem )
local     nAtom := iif( cItem == nil, 0,    ; // 0 means all or default
                        GlobalAddAtom( cItem ))
if nFmt == nil
     nFmt = CF_TEXT
endif
PostMessage( hWndServer, WM_DDE_REQUEST, hWndClient,            ;
             MAKELPARAM( nFmt, nAtom ) )
return


See Also: GlobalDeleteAtom() GlobalFindAtom() GlobalGetAtomName()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson