IonicWind Software

IWBasic => General Questions => Topic started by: Bruce Peaslee on October 16, 2015, 03:50:37 PM

Title: Default Window Procedure
Post by: Bruce Peaslee on October 16, 2015, 03:50:37 PM
In mucking about the internet, a lot of coding examples have something like this in their main window procedure:


select @MESSAGE
  case...
    ...
    return 0
  case...
    ...
    return 0
endselect

return DefWindowProc(...)


In IWB, I have never done that and things seem to work OK. Is this correct?

Thanks.
Title: Re: Default Window Procedure
Post by: LarryMc on October 16, 2015, 05:17:18 PM
It's done in the background of the OPENWINDOW control for you.
That's why you don't have to handle messages like WM_PAINT and all those other windows messages all the time.

The same thing for CONTROL. That is nothing but another type of window and their is a DefControlProc
to handle the messages you don't handle.

The CONTROLX command gets down a little closer to the nitty-gritty.

But the bottom line it a bunch of all of that is hidden from you by IWBasic and that is one of the beauties of the language.

BTW those return 0 in most cases are telling the default procedure whether are not it should proceed or be skipped. Hince the return o at the end of the openwindow handler and the same handler being declared with
sub  handler(), int
Title: Re: Default Window Procedure
Post by: Bruce Peaslee on October 16, 2015, 05:45:42 PM
The language is beautiful. I had been thinking about taking a class in assembler for the PC (I took one for IBM mainframes ages ago). So I downloaded a popular one to get a jump on the competition.  8)

Assembly language itself was not difficult, IWB's coding structure is actually quite similar, but I could not get help for programming issues. It appears that assembly has passed out of favor and textbooks are hard to find. (The class I was considering hasn't listed anything yet.) There are forums with nice people, but when I got stuck, it was a day or so before the help arrived.

I eventually decided I was wasting my time, but I did want to explore something new, so I downloaded Microsoft's free Visual C++ system. Ouch! C++ is similar to Aurora, but the logic behind the casting of types all over the place eludes me. Much of the help - and there is lots of it - centers around Microsoft Foundation Classes or .NET, but these systems are far removed from what I already know.

To shorten this up a bit, just let me say that I have decided to come home. IWB is just so much easier. (I never did get an answer for how to change the color of a button, in either language, something that is trivial in IWB.)

Thanks to all who support this work.