🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.win32
Article #2230

Review my Code............ post suggestions or comments!

#2230
From: Don
Date: Mon, 01 Dec 1997 00:00
75 lines
3757 bytes
I'd like to show you all my code and let you pick it apart - tell me it
sucks - whatever.  I'm open for criticism.  Make comments or suggestions and
post em.

I'm trying to make a WIN32 app using the API directly.
It is going to be used on a network with several instances running on
separate computers at the same time.  All using win95 and keeping the data
current in all the instances, through a shared data file on one of the
computers  A separate thread will be made using the
FindFirstChangeNotification() function to keep the local structure and
display up to date!

The overall structure of the program can be seen in the attached MOC.GIF
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I don't know how to use the BDE engine that came with Borland C++ 5.02 or
any other DB engine for that matter.  But I feel I can successfully keep the
data up to date without using too much processing power or network
bandwidth.

I'm trying to implement each window,(4 total), of my application in it's own
class. The main window is going to include a toolbar that I want to have
float separate from the main window, at start-up.  It will also include the
class containing the data-structure "DB", as seen.

This is my first real attempt to program in WIN32 so my overall design may
be flawed.  However I like using classes to keep larger programs simple, and
it seems perfect for the window structure, although not easily implemented.
I had to make my callback routine "static" for windows to accept it, and I'm
not sure if the same process will work for the other windows.  I also need
to keep a static class pointer to "this" to access the other member
functions.

I'm going to use "new" and "delete", as recommended by john, for my memory
allocation.  I also need a little help making the toolbar, and have it float
outside of the main window when the application first starts.  I also have
never used the STL for the <list>'s  I want to implement, any suggestions
would be useful.

Thanks and Good luck!
Don E. Stewart II
puppy@dog.astra.co.uk



************************************************************************
Also a note from something I did before:
>Don (me) wrote in message...
>>THANKS in advance for any help.
>>Please send your responses to: puppy@dog.astra.co.uk
>
>John A. Grant responded...
>    No. Public questions get public answers. If Usenet consisted
>    only of questions and answers were only e-mailed, then
>    there wouldn't be much point in reading it, would there?

Well, your right, and thank you for pointing that out to me!


begin 666 main.cpp
<encoded_portion_removed>
end

begin 666 dbapp.cpp
<encoded_portion_removed>
end

begin 666 status.cpp
<encoded_portion_removed>
end

begin 666 moc.gif
<encoded_portion_removed>
end
Technical Details
Message-ID: <348293c5.0@stan.astra.co.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 113dfb,1238ac1b6e0d74f9
X-Google-Attributes: gid113dfb,public
X-Google-Thread: fccee,e9883edb489ee96e,start
X-Google-Attributes: gidfccee,public
X-Google-Thread: fd2c4,e9883edb489ee96e,start
X-Google-Attributes: gidfd2c4,public
X-Google-Thread: 10461f,e9883edb489ee96e,start
X-Google-Attributes: gid10461f,public
X-Google-Thread: 10015c,e9883edb489ee96e,start
X-Google-Attributes: gid10015c,public
From: "Don" <puppy@dog.astra.co.uk>
Subject: Review my Code............  post suggestions or comments!
Date: 1997/12/01
Message-ID: <348293c5.0@stan.astra.co.uk>
X-Deja-AN: 294407467
X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3
Organization: Dummy connection record
Newsgroups: comp.os.ms-windows.programmer.win32,fido.win32,microsoft.public.win32,microsoft.public.win32.programmer,microsoft.public.win32.programmer.kernel