PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Paul Marsh on August 12, 2004, 08:23:19 AM

Title: Adding code to WinMain from FireFly
Post by: Paul Marsh on August 12, 2004, 08:23:19 AM
Hi -

I'm new to Firefly and pretty new to PBWin. I'm hoping that using Firefly is going to be a good way of understanding SDK by taking some of the donkey work out of setting up forms - I've been using PBCC for some time now and want to use the grown up version!.

A quick question - I am writing some tools for myself which involve serial communication. Is it possible to insert code into WinMain after the main form has been closed directly from Firefly rather than editing the generated source code? I am thinking in terms of closing background threads created before the form was displayed (similar to the "comms" example supplied with PBWin).
Title: Adding code to WinMain from FireFly
Post by: TechSupport on August 12, 2004, 08:44:24 AM
I assume that the best place for this type of code would be in the WM_DESTROY message of the main Form. I am pretty sure that there is no means within FireFly to place code after the message loop ends, therefore the WM_DESTROY message is probably your best bet.

If that doesn't work then I'll see if I can create another alternative.
Title: Adding code to WinMain from FireFly
Post by: Paul Marsh on August 12, 2004, 09:37:52 AM
Thanks for the quick reply. I'll give that a try.

- Paul