Main Page Class Hierarchy Compound List File List Compound Members File Members

# resources.h

Go to the documentation of this file.

    00001
    00002
    00003 //
    00004 //      RESOURCE.H                                      (c)     YoY'99                                          WEB: www.aestesis.org
    00005 //
    00008 #ifndef                                                 _RESOURCE_H_
    00009 #define                                                 _RESOURCE_H_
    00012 #include                                                <windows.h>
    00013 #include                                                "node.h"
    00016
    00017 //      If you use directly the variables in the class API, it's at your own risks. Prefer the methods...
    00018
    00021
    00022 enum
    00023 {
    00024                                                                 resourceDEFAULT=0,
    00025                                                                 resourceBITMAP
    00026 };
    00027
    00029
    00030 class Aresobj : public Anode
    00031 {
    00032         ALIBOBJ
    00033
    00034         ADLL                                            Aresobj                                                 (class Aresource *r, char *name, char *type);
    00035         ADLL virtual                            ~Aresobj                                                ();
    00036
    00037         ADLL virtual void *                     lock                                                    ();
    00038         ADLL virtual void                       unlock                                                  ();
    00039
    00040         ADLL virtual int                        getSize                                                 ();
    00041
    00042         // private
    00043
    00044         HRSRC                                           h;
    00045         class Aresource *                       r;
    00046         int                                                     nlock;
    00047         void                                            *ptr;
    00048         int                                                     size;
    00049 };
    00050
    00052
    00053 class Aresource : public Anode
    00054 {
    00055 public:
    00056         ADLL static ACI                         CI;
    00057         virtual ACI                                     *getCI                                                  ()                                              { return &CI; }
    00058
    00059         ADLL                                            Aresource                                               (char *name, HINSTANCE h=GetModuleHandle(NULL));
    00060         ADLL virtual                            ~Aresource                                              ();
    00061
    00062         ADLL virtual Aresobj            get                                                             (char *name, char *type);
    00063
    00064         // private
    00065
    00066         HINSTANCE                                       hinstance;
    00067 };
    00068
    00071 #endif                                                  //_RESOURCE_H_