December 12, 2019, 01:31:42 am

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Recent posts

Pages 1 2 3 4 5 ... 10
21
Console Programs / Re: Polynomial evaluation
Last post by LarryMc - December 04, 2019, 09:24:59 am
when I was going to nite school after I got out of the AF I remember having to take a semester of RPG and of COBOL. We had to punch our own cards and submit them. Then wait for them to be run on the same main frame that handle all the university business.
22
Console Programs / Re: Polynomial evaluation
Last post by GWS - December 04, 2019, 08:57:13 am
Hi Egil,

Yes it was an interesting time - we were very lucky to have experienced it.

All the best, :)

Graham
23
General Questions / Adding menu items
Last post by Andy - December 04, 2019, 05:11:35 am
I'm about to release the very fast new version of my program to convert IW keywords to upper / lowercase, but I have a question (as always).

An option I've added in is the ability to quickly create a basic window, send it to the clipboard ready for you to paste into a new file or code - saves a lot of time and I've already found it handy.

BUT - there may be other tools you want to add into my programs "Tools" menu (menu options), and the question is this:

How do I (or my program that is) know how many tools you've added, and if you add a new one how to I get the program to select it and run it.

Example:

Code Select
BEGINMENU w1
    MENUTITLE "&File"
        MENUITEM "Quit",0,MenuQuit
    MENUTITLE "Tools"
        MENUITEM "Create a window",0,MenuWindow
        MENUITEM "Create a dialog",0,MenuDialog
        MENUITEM "Create a console",0,MenuConsole
    MENUTITLE "Options"
        MENUITEM "Change options",0,MenuChange
ENDMENU

How would I add in a new

Code Select
MENUITEM "Your tool",0,"your control"

and add this into the window's handler?

Code Select
          CASE @IDMENUPICK
                SELECT @MENUNUM
                      CASE MenuWindow
                            DoThis..........


LarryMc's IDE can do it, so any ideas anyone please?

Thanks,
Andy.
24
GUI Central / Re: dDoc IWB test
Last post by Brian - December 04, 2019, 04:05:19 am
Come back, Sapero!
25
Console Programs / Re: Polynomial evaluation
Last post by Egil - December 04, 2019, 03:03:23 am
Thanks Graham,

We had a similar example when I first learnt to code in 1962 or 1963. I beleive the languag was called RPG.
The computer occupied most of the basement of a large office building, and when we had done the coding on paper sheets, the papers where then sent to some busy ladies, that punched the cards we fed the large IBC computer with.
Those were the days....
26
GUI Central / Re: dDoc IWB test
Last post by ckoehn - December 03, 2019, 05:39:08 pm
Finally found it..

This is the link I was talking about.

DDOC errror

Later,
Clint
27
GUI Central / Re: dDoc IWB test
Last post by ckoehn - December 03, 2019, 05:28:14 pm
I had issues with anything that returned a double or float if I remember right.  Sapero gave me the following code to fix that.  I searched the forum but couldn't find the post right off.

He said that immediately after anything that returned a double or float I needed to use the asm code he provided and it should work. It did take care of my problems. Here is the code.

Code Select
lSpc=dpTextWidth(prtFile," ")
_asm
fstp dword[esp-4]
_endasm
Later,
Clint
28
Console Programs / Polynomial evaluation
Last post by GWS - December 03, 2019, 04:59:16 pm
Hi folks,

Here's an old computing method by IBM (Engineering Analysis for Computers - 1961).

This computes the value of a polynomial using only multiply and add operations ..

Code Select
' Polynomial evaluation

openconsole
cls

def x,y:float

' To compute the value of a polynomial

' f(x) = ax^5 + bx^4 + cx^3 + dx^2 + ex + f
' simplify to

' f(x) = (((((a)x + b)x + c)x + d)x +e)x + f
' ie. by repeating the steps (multiply and add) ..

' Example:
print
print "Polynomial evaluation":print:print STRING$(25, "_" )
print:print


setprecision 10

x = 2.55

' direct evaluation ..
y = 2.1 * x^5 + 0.4 * x^4 + 32 * x^3 + 12.5 * x^2 + 0.34 * x + 100

print "Direct method using exponentiation and add"
print
print y

' alternatively ..
y = (((((2.1)*x + 0.4)*x + 32)*x + 12.5)*x + 0.34)*x + 100

print
print "Alternative method using only multiply and add"
print
print y


print:print:print
print "Press any key to exit .."

do:until inkey$<>""
closeconsole
end


Best wishes, :)

Graham
29
GUI Central / Re: Title Bar Color
Last post by fasecero - December 03, 2019, 12:43:25 pm
Windows states that it is the user who must choose that background color and not the developer. But there are times where a certain color will match best the content of the client area. I was also always interested in this.

There are 2 ways to do it, the "easy" one (not easy at all but more simple than the second) is to not to use any frame at all and draw it all by yourself inside the client area. Andy made a good example of this approach some time ago, it must be in the forum.

The second, far more complex, is to start with a normal window, call some DWM functions (mainly DwmExtendFrameIntoClientArea), subclass the window procedure and process the non-client area messages (such as WM_NCACTIVATE, WM_NCCALCSIZE, and WM_NCHITTEST) and some undocumented messages, like 0xAE which draw the themed window borders. And you still need to draw everything by yourself, of course. Getting all of this to work correctly is very complex and it is a pending task that I have for ages.
30
GUI Central / Re: dDoc IWB test
Last post by Brian - December 03, 2019, 08:31:43 am
Clint,

I haven't had any problems printing so far. I have a program working on a networked printer at a local school, with no bother reported. The only problems I have had (and mentioned by Dennis Comninos), is with the dpLabelX(iHandle,x), dpLabelY(iHandle,y) and dpText(iHandle,x,y,DDOC_LEFT,"Next label") calls. Can't get them to work. Can't be dpText, as that is used extensively in the sample

I also found a small problem with the dpAngleText function. The angle has to be an INT

Brian
Pages 1 2 3 4 5 ... 10