Author Topic: Question about ChildWin.o2bas  (Read 1991 times)

0 Members and 2 Guests are viewing this topic.

Arnold

  • Guest
Question about ChildWin.o2bas
« on: April 25, 2018, 01:27:51 AM »
Hi Charles,

the demo \examples\WinGui\ChildWin.o2bas runs fine with the Latest Final Alpha, but using the Beta version there is an error message: Registration failed. If I add #autodim off then I get the error: not defined lpfnwndproc, line 46. Therefore I tried:

'  with wc.                 '
    wc.style=CS_HREDRAW or CS_VREDRAW
    wc.lpfnWndProc=@wndproc
    wc.cbClsExtra=0
    wc.cbWndExtra=0   
    wc.hInstance=inst
    wc.hIcon=LoadIcon 0, IDI_APPLICATION
    wc.hCursor=LoadCursor 0,IDC_ARROW
    wc.hbrBackground=GetStockObject WHITE_BRUSH '
    wc.lpszMenuName=0
    wc.lpszClassName=@"Wins"
'  end with

and now the app runs with the Beta version too. But I am not sure if my observation is correct?

Roland

Edit:
I noticed that you changed the syntax of "with". This will work:

  with wc                 '
    .style=CS_HREDRAW or CS_VREDRAW
    .lpfnWndProc=@wndproc
    .cbClsExtra=0
    .cbWndExtra=0   
    .hInstance=inst
    .hIcon=LoadIcon 0, IDI_APPLICATION
    .hCursor=LoadCursor 0,IDC_ARROW
    .hbrBackground=GetStockObject WHITE_BRUSH '
    .lpszMenuName=0
    .lpszClassName=@"Wins"
  end with

This is not yet documented in the help file and there are some more files which use the old syntax:

\examples\Console\NonBlockingCons.o2bas
\examples\WinGui\MenusPopup.o2bas
\examples\Opengl\other\ChildWins1.o2bas
\examples\Opengl\other\ChildWins2.o2bas
\examples\Opengl\other\ViewPorts.o2bas
« Last Edit: April 25, 2018, 02:14:48 AM by Arnold »

Charles Pegge

  • Guest
Re: Question about ChildWin.o2bas
« Reply #1 on: April 25, 2018, 05:34:42 AM »
Hi Roland,

Thanks for spotting those. I've fixed the dot-coding and posted an update.

I've also included the source files for self-compiling, which is rolling along nicely. These are stored in inc/o2, and I will endeavour to expose manageable pieces of code and make them available for other programs to use. Some of the obvious ones are HashStore, Lexer, MacroEngine, MetaLanguage and Assembler.

https://github.com/Charles-Pegge/OxygenBasic/blob/master/OxygenProgress.zip