/* registry.h demo */
#include "allegro.h"
#include "seal.h"
#include "app.h"
#include "registry.h"

app_begin(void)
{
  if (ap_process == AP_INIT) {
    l_text txt;
    msgbox(MW_INFO, MB_OK, "Press Enter or click OK to create key `software/mycompany'");
    create_key("software", "mycompany");
    msgbox(MW_INFO, MB_OK, "Press Enter or click OK to create key `software/mycompany/regdemo'");
    create_key("software/mycompany", "regdemo");
    msgbox(MW_INFO, MB_OK, "Press Enter or click OK to set key `software/mycompany/regdemo''s value to `regdemo value'");
    set_key("software/mycompany/regdemo", "regdemo value");
    msgbox(MW_INFO, MB_OK, "Press Enter or click OK to read value from `software/mycompany/regdemo'");
    txt = get_key("software/mycompany/regdemo");
    msgbox(MW_INFO, MB_OK, "Value is `%s'", txt);
    msgbox(MW_INFO, MB_OK, "Press Enter or click OK to delete key `software/mycompany' and it's childs");
    delete_key("software/mycompany");
  };
} app_end;

