Page 1 of 1

A small editor to code PureLibraries in C...

Posted: Thu Dec 18, 2003 6:03 pm
by freak
Hello,

Here's my last little project. (right on top)
http://freak.purearea.net/tools/

It started as a simple little learning project, and well, just grew bigger
and bigger. Made it up to 3399 lines (nice number 8) )

Have fun with it...

Timo

Posted: Thu Dec 18, 2003 6:29 pm
by Fred
Very nice piece of code :wink:

Posted: Thu Dec 18, 2003 7:24 pm
by fsw
Freak, this is extremely nice code.

Suppose that you normally split your code :)
Don't know if I would see through 120KB of source code after some time passed by... :?

I code MDI apps for quite awhile and there are 2 little things I would like to suggest you add into your code ( you don't have to... ) :

1.) Every MDI-Child Window has his own SysMenu.
You can see that at the end there is a: NEXT Ctrl+F6.
This should be functional - you would have to add some piece of code for it.

2.) Another thing is the WINDOW Menu.
Normally if you have a MDI Application you GRAY this MenuTitle when there are no MDI-Child Windows, and ENABLE it if there is at least one.
( the same goes for the Toolbar Buttons 'Tile Vertically/Horizontally and Cascade Windows )
PureBasic does not have a function for disabling the MenuTItle, but it's doable.


Tell me if you need some piece of code for my suggestions :wink:

Another thing would be to make the Main Window active after the User closes the Library Designer Preferences Window.

Like I said above - these are only suggestions that you don't have to follow.

Again good work, keep it up man 8)

BTW did I tell you I like your coding style...

Posted: Thu Dec 18, 2003 7:42 pm
by fsw
Freak
while playing aroung I found a bug.

If there is a MDI-ChildWindow already open and you change the ProcedureBrowser to MDI-Window the application crashes.

The same goes if the Procedure Browser is a MDI-Window and you open up a MDI-ChildWindow. If you make the ProcedureBrowser active it crashes.

Sorry man.

BTW I tested it under Win2kSp3

Posted: Thu Dec 18, 2003 7:53 pm
by Karbon
Awesome. I've been trying to do some MDI stuff as well and I'm sure this will help. Sure wish that MDI was easier in PureBasic *hint-hint-hint, Fred*

Thanks for sharing Timo!

Posted: Thu Dec 18, 2003 9:51 pm
by freak
Thanks for the suggestions, they are always welcome..

yes, usually i split my code.. but this jte grew from a small test to a
big project in quite a short time, so...

I didn't pay much attension to the window menus. It doesn't change the
functionality, if they are not disabled, the buttons just don't work, if there
is no child. That's just the small things that make things look perfect i guess :)

If you could give me some info on how i can detect that SysMenu thingy,
that would be nice.

That bug with the ProcedureBrowser happened, because i never used it
as a MDI window, since i first implemented it, well, too much changed since
then. Thanks for shoing this one.

Timo

Posted: Thu Dec 18, 2003 10:57 pm
by fsw
freak wrote: If you could give me some info on how i can detect that SysMenu thingy,
that would be nice.
The SysMenu function works already if you use the mouse - it's a windows thing.
The only thing that you have to do is to catch the KeyBoard Keys and send a message with:

Code: Select all

Case #WM_KEYUP
  If wParam = #VK_F6 + #VK_CONTROL
    SendMessage_(MDIClientHandle, #WM_MDINEXT, 0, 0)
  EndIf
This code should be placed in the MDI-ChildWindow Procedure.