April 30, 2024, 04:59:22 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


New control

Started by LarryMc, November 05, 2007, 03:20:15 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

LarryMc

January 13, 2008, 08:02:48 AM #25 Last Edit: January 22, 2008, 06:59:13 PM by Larry McCaughn
Release of V1.0 of my Round Gage Control Library GageRLM

The included example contains all documentation.
Read "readme.txt" file before using.

NOTICE: This library works only with windows and NOT dialogs.

Larry

Revision: Removed download - Replaced below by Ver2.0
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Brian

Good stuff, Larry - just tried it!

Brian

LarryMc

Thanks Brian

I still want to make a dual gage where the scale in down the center with the dial face arcs on each side and the pointer pivot points originating on the far left and right; kinda like \)|(/

Also want to make some rectangle gages (tall but thin) which I want to ultimately turn into
a PID proportional/integral/derivative closed loop controller faceplate.


Larry
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

LarryMc

I now know why my gage control works in a window but not in a dialog.

Controls in a dialog don't exist until domodal or showdialog is executed.
I'm using sendmessage to configure the gages before that happens in my current version.

To fix the problem will require a structural change to my implementation.

Just a heads up to anyone who might use my gages in an application.

The new library, when I get it done, will not be compatible with the current version.

Just part of my learning curve.

Also a big thanks to Sapero for his help.

Larry
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

LarryMc

Restructured implementation.

GageRLM Ver 2.0 now supports windows and dialogs.
Increased number of gages from 4 to 10.

Larry
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

John S

Larry,
The dialog example works great!

I haven't done anything in EBasic, so this is most likely a silly mistake on my part.
I compiled and ran the dialog example, but the window example won't compile.  The window example yields this:

Compiling...
GageRLM2_example.eba
File: D:\downloads\GageRLM2\GageRLM2_example.eba (681) Warning: undeclared function 'GetSysColor' - )
D:\downloads\GageRLM2\GageRLM2_example.eba:681: error: symbol `GetSysColor' undefined
D:\downloads\GageRLM2\GageRLM2_example.eba:960: error: phase error detected at end of assembly.
Error(s) in assembling D:\downloads\GageRLM2\GageRLM2_example.a
John Siino, Advanced Engineering Services and Software

LarryMc

Put this in:
DECLARE "user32.dll",GetSysColor(nIndex:INT),INT

I have an .incc file that has that declared as a command.

Sorry about that.

Larry
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

John S

thanks Larry,
I was looking for something like that.  On of these days, I'm going to have to learn something about programming.
John Siino, Advanced Engineering Services and Software

John S

what other stuff do you have in that .incc?
John Siino, Advanced Engineering Services and Software

John S

John Siino, Advanced Engineering Services and Software

LarryMc

Quote from: John S on January 23, 2008, 02:50:49 PM
what other stuff do you have in that .incc?
It's a carry over from IBasic.  I put some functions in an incc file as "command$" so I cound use the functions without having to declare them.

Works great with IBasic's PAK setup and/or when you're writting programs for yourself.

But as you saw it can cause problems if you use them in a non-compiled program for others.

Sorry about that.

Larry
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

LarryMc

Comming soon!

My Annunciator custom control.

Larry
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

LarryMc

Paul,
Almost afraid to ask.  :-\
Do you have an example (source code) of a custom control (that is not based upon another standard control) that was written in I/Ebasic and starts out as a child window with some buttons/radiobuttons/text controls added to it  that I can look at? :-[

Larry
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Ionic Wind Support Team

Nothing short or public domain at the moment.  I do have custom controls written in Emergence but they are not examples.

Did you have a question perhaps?

Paul.
Ionic Wind Support Team

LarryMc

Okay, here goes.
In my custom controls I've made so for I get the custom class registered and I have no problems with using GWL_USERDATA message to save the configuration of each instance of my control.

I have no problem with callinf sendmessage to handle specific (custom) things my controls can do.

I draw everthing in the client area of my control between _BeginPaint(hWnd, ps) and _EndPaint(hWnd, ps) using API calls and objects and all that.

I'm even using regions and mouse clicks inside regions to initiate actions.


What I don't understand is how to add a button, radio button, combobox, edit, etc control to be an integral part of my custom control and for me to be able to use all that built in fuctionallity.  I'd like my control to have it's own integral timer etc.

Since I'm not creating a window in the normal EBasic sense I don't know where to start.

I'm hoping there is something simple I can do to accomplish what I want but just am clueless what it will be from what I've been figuring out so far.

Larry
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Ionic Wind Support Team

You have to use CreateWindowExA with the class name of the control you are adding to your control.  The standard classnames are things like "BUTTON", "EDIT", "SCROLLBAR", etc.

Paul.
Ionic Wind Support Team

LarryMc

February 05, 2008, 04:47:02 AM #41 Last Edit: February 05, 2008, 04:54:47 AM by Larry McCaughn
What about my custom control having its own timer?

Here comes the dumb one.
Also, is there something I can do when drawing arcs/circles to make the final result display smoother(ie, reduce that sawtooth appearance)? Would "transforms" have anything to do with that?

Larry
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Ionic Wind Support Team

I'm pretty sure you have the library source for Emergence Larry.  Just look at the timer functions, it's just a couple of API functions.

Paul

Ionic Wind Support Team

LarryMc

Quote from: Paul Turley on February 05, 2008, 09:30:38 AM
Just look at the timer functions, it's just a couple of API functions.
duh :-[

Thanks

Larry
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Ionic Wind Support Team

no problem.

If you need further help then I may have some time later.

Paul.
Ionic Wind Support Team

LarryMc

I started the timer in my WMCreate section and deleted it in my WMDestroy section.  Worked like a top.

I picked an arbitrary timer id number.  Is there some slick way to avoid having a user pick the same timer id for the parent window?

Larry
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Ionic Wind Support Team

Timers are window specific.

Ionic Wind Support Team

LarryMc

but my control isn't a window.
It is drawn om a parent window or dialog or am I missing somethin?

Larry
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Ionic Wind Support Team

ok.  then pick an odd timer id like 31254

Paul.
Ionic Wind Support Team

LarryMc

that's what I did.

Thanks
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library