home *** CD-ROM | disk | FTP | other *** search
/ PSION CD 2 / PsionCDVol2.iso / Programs / 376 / AppInfoTest.opl (.txt) < prev    next >
Encoding:
EPOC OPL Source  |  1998-07-20  |  1.4 KB  |  69 lines

  1.  
  2.  
  3. include "AppInfo.oxh"
  4.  
  5. PROC main:
  6.     local aifFile$(255)
  7.     local iconFile$(255)
  8.     local size&
  9.     local hidden&,newfile&,embed&
  10.  
  11.     rem extract icons from an aif file
  12.  
  13.     busy "Extracting icons"        
  14.     aifFile$="z:\system\apps\Comms\Comms.aif"
  15.     size&=48
  16.     iconFile$="c:\System\Temp\icon"
  17.     AppExtractAifIcon:(aifFile$, 16, 0, iconFile$+"16")
  18.     AppExtractAifIcon:(aifFile$, 24, 0, iconFile$+"24")
  19.     AppExtractAifIcon:(aifFile$, 32, 0, iconFile$+"32")
  20.     AppExtractAifIcon:(aifFile$, 48, 0, iconFile$+"48")
  21.     busy off
  22.  
  23.     rem display icons
  24.  
  25.     showmbm:(iconFile$+"16",0)
  26.     showmbm:(iconFile$+"24",20)
  27.     showmbm:(iconFile$+"32",48)
  28.     showmbm:(iconFile$+"48",100)
  29.  
  30.     rem scan for apps
  31.  
  32.     busy "Scanning..."
  33.     AppUpdate:
  34.     busy off
  35.     AppStartScan:
  36.     while AppNext:
  37.         cls
  38.         gcls
  39.         print AppFileName$:
  40.         print AppCaption$:
  41.         AppCapability:(hidden&,newfile&,embed&)
  42.         if hidden&
  43.             print "App is hidden"
  44.         endif
  45.         if embed&=1
  46.             print "App supports embed"
  47.         elseif embed&=2
  48.             print "App supports embed only"
  49.         endif
  50.         AppExtractIcon:(2, 0, iconFile$)
  51.         showmbm:(iconFile$,300)
  52.         get
  53.     endwh
  54.     print "Done"
  55.     get
  56. ENDP
  57. PROC showmbm:(name$,x%)
  58.     local id%,w%,h%
  59.     id%=gloadbit(name$)
  60.     w%=gwidth
  61.     h%=gheight
  62.     guse 1
  63.     gat x%,0
  64.     gcopy id%,0,0,w%,h%,0
  65.     gclose id%
  66. ENDP
  67.  
  68.  
  69.