I did all the coding on my Macintosh Classic II in beautiful monochrome. However, I wanted to get it over to you so you could see it. So had to attach the harddrive to a Basilisk II emulator on my MacBook so I could copy/paste the code. But it compiled and ran first on my compact Mac. What a...
So here's the code...see my comments. Would love to get your thoughts....
#define kBaseResID 128
#define kMoveToFront (WindowPtr)-1L
#define kIconBytes 128
typedef unsigned char uint8_t;
typedef uint8_t IconData[kIconBytes];
char *gMyIconDataPtr; // NewPtr() returns a char ptr...
I did it!! Let me show you the code that finally worked. Built from your code, but with some slight differences. I want to explain what I learned in the process. I'm new to this. How do I drop the code in this reply so it doesn't look like crap....like you did it?
Haha!! You are a steely eyed missle man!! I'm at work at the moment so can't implement. But this is exactly the help I was looking for. I'm so glad you pointed me to NewPtr as replacement function for NewHandle. The Think C reference instructs me to use NewHandle and then to lock the handle...
I’ve got that too. Unfortunately it doesn’t speak to creating an icon. It creates these graphics programs like Mondrian and others that don’t quite get to the subject I’m trying to resolve.
Hello Snial,
You are exactly where I am at. I do have the inside Macintosh vol I book. I’m reading under the QuickDraw section and the Toolbox utilities section. So if I either use NewPtr or NewHandle, once the memory is allocated for 128 bytes, the question is how do I store the hex data into...
Thank you. And yes, I know you’re right. I’m doing this the hard way. But thought I would try to build an icon with hex and using the heap instead of building an icon in ResEdit and using something like PlotIcon(). I figured if I can do this than I really understand what a bit image actually is...
First, I'm programming on a Macintosh Classic II in System 7. I'm trying to draw a 32x32 bit icon in C using the StuffHex() function. I'm using the Think C reference guide and working in that IDE. I know you can do all this in ResEdit and then use PlotIcon() but I'd like to learn how to store...