>Now that the PQA format doc has been released, can some one show me the code
>to draw a PQA's icon. I need to have the code for big, small & default icon!

Here's some code from the launcher that you can use to help parse the
appInfo block for the four objects in question.  In the "do whatever" areas
you'd be calling WinDrawBitmap or WinDrawChars, or copying the data
somewhere, or whatever is appropriate for you...

(And this is a prime example of code that mixes and matches typedefs all
over the place, which is made much more consistent by the 3.5 typedef
scheme!)

-David Fedor
Palm Developer Support


specialInfoP = (DataAppInfoType*)appInfoP;
if (MemPtrSize(specialInfoP) >= dataAppInfoVersionSize &&
         specialInfoP->signature == dataAppInfoSignature &&
         specialInfoP->hdrVersion >= dataAppInfoVersion) {

     // Get ptr to version strings
     bP = (BytePtr)&specialInfoP->verStrWords;
     verStrWords = *((WordPtr)bP);
     bP += sizeof(Word);
     if (verStrWords) {

         // DO WHATEVER YOU WANT here with bP; it points to the data.

         bP += verStrWords * sizeof(UInt16);
         }

     titleWords = *((UInt16 *)bP);
     bP += sizeof(UInt16);
     if (titleWords) {

         // DO WHATEVER YOU WANT here with bP; it points to the data.

         bP += titleWords * sizeof(UInt16);
         }

     // Get ptr to icon
     iconWords = *((WordPtr)bP);
     bP += sizeof(Word);
     if (iconWords) {

         // DO WHATEVER YOU WANT here with bP; it points to the data.

        bP += iconWords*sizeof(UInt16);
        }

     // Get ptr to small icon
     smIconWords = *((WordPtr)bP);
     bP += sizeof(Word);
     if (smIconWords) {

         // DO WHATEVER YOU WANT here with bP; it points to the data.

        bP += smIconWords*sizeof(UInt16);
        }

     } // If valid appInfo


Reply via email to