but I am not sure of all the other steps to required to package up or produce the final control panel.
OK - right. I haven't used THINK Pascal in a very long time so this will be, necessarily, vague, I'm afraid, but I can hopefully give you some pointers. I'm sorry I haven't got links to more discursive documentation: I haven't used any in a long time, and my memory of what's good and what isn't has rotted. I hope this is what you mean - if I'm talking down to you, I don't mean to!
The first question, about how you bundle your code resource and your other resources together is simple but annoying. The box to choose the resource file to bundle into your final project is under
Run Options... in the Run menu for some bizarre reason. You'd expect it to be in the Project menu, under compile options or something. Nope. It's under Run Options. Now that you're good and annoyed, I'll try to answer the broader question a bit.
A cdev is a kind of Code Resource. A code resource is just any resource that contains code. The CODE resources in an application are technically code resources, but they work rather differently, so usually you get a distinction between 'Application' and 'Code resource'.
These resources are contained in files, like any other resource. And this is where some of the confusion comes in - the
file type of the file that your cdev
resource lives in is
also 'cdev'. So a 'cdev' can refer either to a file or a resource, and you have to work out from context which is meant. This is one of the reasons Apple started calling the files 'Control Panels' in system 7. So your cdev
resource, along with other resources for its icons and possibly some other supporting code resources (an INIT is usually necessary for a control panel) is contained within a cdev
file.
So, how do you go about creating a code resource in THINK Pascal? I vaguely remember the chapter in the THINK Pascal manual on code resources is relatively good but I haven't read that for 25 years so ... perhaps that's fiction.
The THINK Pascal Demos that are packaged with the compiler are somewhat anæmic but there are examples of generic code resources in the HyperCard Demos folder. You'll need to use the Code Resource runtime library (which I think is called RSRCRuntime.Lib) rather than the application one. You also need to set up the project metadata appropriately.
To set the kind of resource you're compiling into, go to Project -> Set Project Type, and choose Code Resource. This will enable the resource flags section in the dialog box. Note that you have two boxes for resource type
and file type. For a control panel, both are cdev.
The actual contract that your cdev needs to follow is in, I think, IM: Devices (??). You need to provide a routine that the OS will call whenever the user interacts with anything in your window - in some ways this is much simpler than application programming, because you don't need to manage your own event loop.
I'd suggest getting a simple CDEV working before trying to do anything more dramatic, but you will
also need to create an INIT resource eventually, and put the two in one file. The INIT will contain the code that runs at startup and actually patches _DragWindow or whatever you're intending to do, the control panel will contain the UI.
edit: As a side note, unless you're targetting system 6, you might find it easier to distribute this as an Application for setting settings and an INIT for doing the startup stuff, which share a preferences file. This is what Apple started doing in 7.5, because at that point there's really not much point in building a cdev, since they're no longer hosted in the Control Panel desk accessory.