🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #32308

Re: Resource file HELP

#32308
From: Joel B Levin
Date: Mon, 19 Sep 1988 14:26
18 lines
1288 bytes
In article <MXAyfcy00Xc=MAOEQe@andrew.cmu.edu> sn0v+@andrew.cmu.edu (Shoichi Nakai) writes:
(I am a novice C programmer and am writing my first C program for the
(Macintosh.  What this is going to do is to read a text from a resource
(file and to display it in a window.  I got a window created successfully,
(but I couldn't get a right text in a window instead I got a garbage.
( . . .
(   hte = GetIndResource((ResType)"TEXT", (int)256);
( . . .
(According to the debugger, after calling GetIndResource, hte still
(pointed to 0x000000. . . .

Try . . . (ResType)'TEXT' . . .  in the above line, using single
quotes.  "TEXT" gives a pointer to a string; 'TEXT' gives the four
ascii characters in a long, which is what you need.

	/JBL
UUCP:     {backbone}!bbn!levin		POTS: (617) 873-3463
INTERNET: levin@bbn.com
Technical Details
Message-ID: <29813@bbn.COM>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ames!ncar!boulder!sunybcs!rutgers!mit-eddie!bbn!bbn.com!levin
References: <MXAyfcy00Xc=MAOEQe@andrew.cmu.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ames!ncar!boulder!sunybcs!rutgers!mit-eddie!bbn!bbn.com!levin
From: levin@bbn.com (Joel B Levin)
Newsgroups: comp.sys.mac
Subject: Re: Resource file HELP
Message-ID: <29813@bbn.COM>
Date: 19 Sep 88 14:26:46 GMT
References: <MXAyfcy00Xc=MAOEQe@andrew.cmu.edu>
Sender: news@bbn.COM
Reply-To: levin@BBN.COM (Joel B Levin)
Organization: BBN Communications Corporation
Lines: 17