Professional Web Applications Themes

How do I create a PICT resource? - Mac Programming

I am just starting out programming and I'm trying to create a simple Carbon-based OS X program which opens a window and displays text and a small 16x16 image. Using the helloworld tutorial, I have been able to get text to appear anywhere I want in the window, but I can't figure out how to get a picture to appear. In reading various Quickdraw info sites, I have come across DrawPicture() and GetPicture, but because of my limited experience I cannot seem to get them to work. GetPicture apparently returns a handle when I give it a resource ID, but ...

  1. #1

    Default How do I create a PICT resource?

    I am just starting out programming and I'm trying to create a simple
    Carbon-based OS X program which opens a window and displays text and a
    small 16x16 image. Using the helloworld tutorial, I have been able to
    get text to appear anywhere I want in the window, but I can't figure
    out how to get a picture to appear.

    In reading various Quickdraw info sites, I have come across
    DrawPicture() and GetPicture, but because of my limited experience I
    cannot seem to get them to work. GetPicture apparently returns a
    handle when I give it a resource ID, but how do I know what the
    resource ID for my picture is? Also, how do I create a PICT resource
    in the first place? In the old days, I'm assuming I would have used
    ResEdit, but what now?

    Maybe I'm totally on the wrong track, but I would love to know how to
    display a simple picture in a window.

    I am using Project Builder.

    Thanks,

    -Andrew Fowler
    Andrew Fowler Guest

  2. #2

    Default Re: How do I create a PICT resource?

    In article <a4bdf5ef.0307232034.2a72d9d5posting.google.com >, Andrew
    Fowler <fowlerismhotmail.com> wrote:
    > In reading various Quickdraw info sites, I have come across
    > DrawPicture() and GetPicture, but because of my limited experience I
    > cannot seem to get them to work. GetPicture apparently returns a
    > handle when I give it a resource ID, but how do I know what the
    > resource ID for my picture is? Also, how do I create a PICT resource
    > in the first place? In the old days, I'm assuming I would have used
    > ResEdit, but what now?
    >
    > Maybe I'm totally on the wrong track, but I would love to know how to
    > display a simple picture in a window.
    >
    > I am using Project Builder.
    You can still use ResEdit, it works fine in Classic, just paste the
    image into a resource file. Photoshop can also save images as PICT
    resources -- during the save process it will ask what number you want
    for the resource ID.

    An easy way to display a PICT is to use Interface Builder to put a PICT
    control into a window.


    -=-=-=-=-
    Carl R. Osterwald Guest

  3. #3

    Default Re: How do I create a PICT resource?

    In article <240720030719352830%imac.com>, Carl R. Osterwald
    <imac.com> wrote:
    > In article <a4bdf5ef.0307232034.2a72d9d5posting.google.com >, Andrew
    > Fowler <fowlerismhotmail.com> wrote:
    >
    > > In reading various Quickdraw info sites, I have come across
    > > DrawPicture() and GetPicture, but because of my limited experience I
    > > cannot seem to get them to work. GetPicture apparently returns a
    > > handle when I give it a resource ID, but how do I know what the
    > > resource ID for my picture is? Also, how do I create a PICT resource
    > > in the first place? In the old days, I'm assuming I would have used
    > > ResEdit, but what now?
    > >
    > > Maybe I'm totally on the wrong track, but I would love to know how to
    > > display a simple picture in a window.
    > >
    > > I am using Project Builder.
    >
    > You can still use ResEdit, it works fine in Classic, just paste the
    > image into a resource file. Photoshop can also save images as PICT
    > resources -- during the save process it will ask what number you want
    > for the resource ID.
    >
    > An easy way to display a PICT is to use Interface Builder to put a PICT
    > control into a window.
    Don't know if GraphicConverter is native for X yet, but this is also a
    great tool.
    David C. Stone Guest

  4. #4

    Default Re: How do I create a PICT resource?

    In article <MPG.198aff64d3b5f2ef989682News.Individual.NET> , James
    Weatherley <newsweatherley.net> wrote:
    > In article <240720032046127129%no.emailexample.com>,
    > [email]no.emailexample.com[/email] says...
    [snip]
    > >
    > > Don't know if GraphicConverter is native for X yet, but this is also a
    > > great tool.
    > >
    >
    > GraphicConverter certainly is native for X - I got a free registered
    > version with my MDD G4.
    Sweet - a double bonus!!
    David Stone Guest

  5. #5

    Default Re: How do I create a PICT resource?

    "Carl R. Osterwald" <imac.com> wrote in message news:<240720030719352830%imac.com>...
    > In article <a4bdf5ef.0307232034.2a72d9d5posting.google.com >, Andrew
    > Fowler <fowlerismhotmail.com> wrote:
    >
    > > In reading various Quickdraw info sites, I have come across
    > > DrawPicture() and GetPicture, but because of my limited experience I
    > > cannot seem to get them to work. GetPicture apparently returns a
    > > handle when I give it a resource ID, but how do I know what the
    > > resource ID for my picture is? Also, how do I create a PICT resource
    > > in the first place? In the old days, I'm assuming I would have used
    > > ResEdit, but what now?
    > >
    > > Maybe I'm totally on the wrong track, but I would love to know how to
    > > display a simple picture in a window.
    > >
    > > I am using Project Builder.
    >
    > You can still use ResEdit, it works fine in Classic, just paste the
    > image into a resource file. Photoshop can also save images as PICT
    > resources -- during the save process it will ask what number you want
    > for the resource ID.
    >
    > An easy way to display a PICT is to use Interface Builder to put a PICT
    > control into a window.
    >
    >
    > -=-=-=-=-
    Okay, this is what I thought.. I guess real problem stems from my
    complete inexperience with Project Builder. After I create a PICT
    resource, say it's called hello.r, how do I open it in Project Builder
    and add it to my project? When I choose "Add Files..." in the Project
    menu, it opens the file and adds it to the list on the left side, but
    how do I access it with my code? Some kind of include statement?

    I realize that I am very inexperienced and that these are probably
    ultra-novice type questions, so if there's a more suitable newsgroup,
    could someone direct me to it? Also, can anyone suggest a good book or
    tutorial?

    Also, why doesn't the "Import Resource File" menu command in Interface
    Builder work for my PICT resource? Is that command intended for
    something totally different?

    Thanks,
    -Andrew Fowler
    Andrew Fowler Guest

  6. #6

    Default Re: How do I create a PICT resource?

    In article <a4bdf5ef.0307251250.3f7d162dposting.google.com >, Andrew
    Fowler <fowlerismhotmail.com> wrote:
    > Okay, this is what I thought.. I guess real problem stems from my
    > complete inexperience with Project Builder.
    I use IB with CodeWarrior, so I am not able to answer this question.
    > I realize that I am very inexperienced and that these are probably
    > ultra-novice type questions, so if there's a more suitable newsgroup,
    > could someone direct me to it?
    csmp.help is appropriate.
    > Also, can anyone suggest a good book or
    > tutorial?
    There is the "Learning Carbon" O'Reilly book, it talks quite a bit
    about IB and PB.


    -=-=-=-=-
    Carl R. Osterwald Guest

Similar Threads

  1. Create standard for ASP.NET to second tier resource like SQL DB
    By Jeremy Smith in forum ASP.NET Security
    Replies: 1
    Last Post: July 24th, 09:16 PM
  2. Artwork Not Smooth in Pict Files
    By hultquist@adobeforums.com in forum Adobe Illustrator Macintosh
    Replies: 7
    Last Post: May 14th, 04:38 PM
  3. [Director MX]: Splash pict for OS X projector
    By Christian Kirchhoff in forum Macromedia Director Basics
    Replies: 1
    Last Post: January 8th, 05:24 PM
  4. importing pict or tif
    By Velvet in forum Macromedia Director Lingo
    Replies: 1
    Last Post: December 7th, 06:21 PM
  5. how can i extract a bitmap from a PICT?
    By John Elemans in forum Mac Programming
    Replies: 3
    Last Post: August 18th, 09:38 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139