Author Topic: oxygen light (ddt modus)?  (Read 6178 times)

0 Members and 2 Guests are viewing this topic.

JRS

  • Guest
Re: oxygen light (ddt modus)?
« Reply #15 on: February 06, 2013, 08:40:48 AM »
Thanks Peter for your support.

IUP is stable, easy to use and has a friendly / helpful author that reminds me of Charles.


Aurel

  • Guest
Re: oxygen light (ddt modus)?
« Reply #16 on: February 06, 2013, 10:57:08 PM »
Quote
I don't have a lifetime to write a Windows application from scratch via the SDK.
objection.... ;D :D

And by the way what is DDT  ??? ( sounds like old insecticid )

PS..ok i found:
http://www.oxygenbasic.org/downloads.htm
« Last Edit: February 07, 2013, 04:00:52 AM by Aurel »

Charles Pegge

  • Guest
Re: oxygen light (ddt modus)?
« Reply #17 on: February 07, 2013, 04:11:24 AM »

DDT was also a 1980s microsoft package 'Dynamic Debugging Tool' supplied with their 8086 Assembler

Peter

  • Guest
Re: oxygen light (ddt modus)?
« Reply #18 on: February 07, 2013, 06:12:24 AM »
This was a question  what JRS put in  the ThinBasic Forum.

Do you know, why there is another result?
I know  because I understand the  priorities.

'Which of the poll expressions will provide a different answer?
Code: [Select]
PRINT "(1)  " + str((45 * ( 9 - 5 + 8 ) - 36 / 4))  
PRINT "(2)  " + str((45 * ( 9 - ( 5 + 8 ) ) - 36 /4))
PRINT "(3)  " + str((45 * ( 9 - 5 + 8 ) - ( 36 / 4)))
PRINT "(4)  " + str((45 * ( ( 9 - 5 ) + 8 ) - 36 / 4))

'jrs@laptop:~/sb/test$ scriba qod_01.sb
'(1) 531
'(2) -189
'(3) 531
'(4) 531
'jrs@laptop:~/sb/test$
« Last Edit: February 07, 2013, 07:56:05 AM by peter »

Frankolinox

  • Guest
Re: oxygen light (ddt modus)?
« Reply #19 on: February 08, 2013, 07:44:48 AM »
followed by my idea here a first attempt to make shorter the win api with button. only the winmain() function with "width" and "height" values are a problem as I cannot change values by functions. second: the window procedere I haven't changed yet.

@peter: It's not the problem for me to understand win api or oxygen, but I thougth about other programmers and newbies using oxygen basic. For my personal opinion it's better to have a better overview about my code structures and therefore I liked (for example) the short ddt modus of powerbasic for dialogs and callbacks. I know the powerful win api and sdk modus of powerbasic too and for oxygenbasic but it was just an idea to make a simple building of an dialog with button (only as example).

use at own risk. all include file you find in rar file.

Code: [Select]
 $ filename "t.exe"
  '#include "../../inc/RTL32.inc"
  '#include "../../inc/RTL64.inc"
  '#include "../../inc/MinWin.inc"
  #include "MinWin.inc"
  #include "button.inc"
  #include "mywinz.inc"

  #lookahead ' for procedures
  
  s=error()
  '
  if s then
    print s
    end
  end if

  '=========
  'MAIN CODE
  '=========
  dim as sys = inst,hwnd
  dim cmdline as asciiz ptr
  dim as rect crect 'for WndProc and TimerProc
  
  '======================================
  '// -------------------------// my idea
  inst=GetModuleHandle 0
  oxymain(inst, 0,cmdline,SW_NORMAL)
  mywinz(hwnd,320,240,"hello oxywin")
  '// -------------------------// my idea
  '======================================
  
  
  '----------- // no idea yet how to make that one shorter // ---
  '--------------------------------------------------------------
  function WndProc ( hWnd, wMsg, wParam, lparam ) as sys callback
  '==============================================================

    static as sys hdc
    static as String txt
    static as PaintStruct Paintst
 
    '==========
    select wMsg
    '==========
      case WM_COMMAND
        mbox "hello button"      
      '--------------
      case WM_CREATE
      '=============
      '--------------------------------------------- // my idea
      call btn("button","test",20,20,120,40,hwnd)
      '--------------------------------------------- // my idea
      GetClientRect  hWnd,&cRect

      '--------------  
      case WM_DESTROY
      '===============
          
      PostQuitMessage 0
        
      '------------
      case WM_PAINT
      '============


      'TEXT
      'http://msdn.microsoft.com/en-us/library/dd144821(v=VS.85).aspx

      'DRAWING AND PAINTING
      'http://msdn.microsoft.com/en-us/library/dd162760(v=VS.85).aspx

      GetClientRect  hWnd,&cRect
      hDC=BeginPaint hWnd,&Paintst
      'style
      '0x20 DT_SINGLELINE
      '0x04 DT_VCENTER
      '0x01 DT_CENTER
      '0x25

       SetBkColor   hdc,yellow
       SetTextColor hdc,red
       DrawText hDC,"Hello OxygenWorld!",-1,&cRect,0x25      
       EndPaint hWnd,&Paintst
        
      '--------------  
      case WM_KEYDOWN
      '==============

      '============            
      Select wParam
      '============

Case 27 : SendMessage hwnd, WM_CLOSE, 0, 0      'ESCAPE
      End Select      

      '--------        
      case else
      '========          
        function=DefWindowProc hWnd,wMsg,wParam,lParam
        
    end select
  end function ' WndProc


I like the iup design too, but it's working with external dll. My idea was to use only the oxygen own power basis :-)

best regards, frank

X

JRS

  • Guest
Re: oxygen light (ddt modus)?
« Reply #20 on: February 08, 2013, 08:27:00 AM »
Quote
I like the iup design too, but it's working with external dll.

I assume you have written your own win32api and have static linked this custom code into your application?  ::)

@Charles - You are going to have to come up with something other than oxygen.dll as some of your users have a phobia with using DLLs.


Aurel

  • Guest
Re: oxygen light (ddt modus)?
« Reply #21 on: February 08, 2013, 08:45:08 AM »
Heh ...
Why use external dll if we can build compact exe without need for dll,right?
So that's why I prefer build exe.

Frank
It is not main problem use api then problem is how wrapp wndProc and use
it somwhere else...

Peter

  • Guest
Re: oxygen light (ddt modus)?
« Reply #22 on: February 08, 2013, 09:23:33 AM »
Quote
@Charles - You are going to have to come up with something other than oxygen.dll as some of your users have a phobia with using DLLs.

could I be infected?  :D

JRS

  • Guest
Re: oxygen light (ddt modus)?
« Reply #23 on: February 08, 2013, 09:55:21 AM »
Quote
Heh ...
Why use external dll if we can build compact exe without need for dll,right?
So that's why I prefer build exe.

If it wasn't for the entertainment value, I would put you on ignore.

How do you think your standalone .exe programs are accessing OS services, via a static linked interface to AurelOS?

Aurel

  • Guest
Re: oxygen light (ddt modus)?
« Reply #24 on: February 08, 2013, 01:20:59 PM »
About what kind of 'static linked interface' you talking... ::)
SLL is static linked library ,include file is not SLL....
AurelOS is not AurelOS then is Microsoft Windows ,right?

Sooo what is wrong if someone or most of us use alredy built in stuff in
OS which we use...NOTHING.

For you IUP have a value because you work on Linux and must use external GUI
to create GUI app, but on Windows you can use GUI api already built in. 

Infact if i must use something else i will use wxWindows,
i have tested wx with wxLua and work and look really great...
Another thing- not bad at all wrapper created by Vanya -called window9 based on PureBasic
syntax style..can be good to...
« Last Edit: February 08, 2013, 01:39:13 PM by Aurel »

JRS

  • Guest
Re: oxygen light (ddt modus)?
« Reply #25 on: February 08, 2013, 07:44:12 PM »
Quote
For you IUP have a value because you work on Linux and must use external GUI
to create GUI app, but on Windows you can use GUI api already built in.

Bring up a Ubuntu desktop Linux system from scratch. No IUP is installed but you have a full GUI and API to work with. (Gtk - or others depending on the distribution)

Do you have any toes left?