Little example of Data types and size of>>
' size of example 2, 11/13-09-2024 halProment, f.bruebach
' data types, part two
'
take kons
pstring st=chr(13,10)
printl "size of example for halProment data types" st
Printl SizeOf(Byte) st ' returns 1
Type mybar
a As Integer '4
b as float '4
c as long '4
d As Double '8
e as ulong '4
f as short '2
g as byte '1
h as char ' 1
j as int '4
End Type
Dim myfoo As mybar
Print SizeOf(myfoo) st ' returns 40
printl SizeOf(myfoo) st
Type mybar1
i as pstring ' 4
ii as p% '4
end type
Dim myfoo1 As mybar1
Print SizeOf(myfoo1) st ' returns 8
printl SizeOf(myfoo1) st
Type mybar2
l as quad '8
m as dword ' 4
n as qword ' 8
o as word ' 2
p as ubyte ' 1
q as string ' 4
r as bstr ' 4
s as zstring ' 1
t as wstring '4
u as bstring ' 4
End Type
Dim myfoo2 As mybar2
Print SizeOf(myfoo2) st ' returns 48
printl SizeOf(myfoo2) st
Type mybar3
v as single '4
w as bool ' 4
x as asciiz ' 4
y as uint ' 4
z as void '0 -> if you are chosing it alone it's 8
end type
Dim myfoo3 As mybar3
Print SizeOf(myfoo3) st ' returns 16
printl SizeOf(myfoo3) st
wait
' ends
Select a Hero example
' input example and select case, halProment
' 21-08-2024, frank bruebach, 10-09-2024
'
take kons
'pindex 0
bstring st
printl "start" st
' Initialize user descriptions
pstring f1 = "I am more like thor " st
pstring f2 = "I am more like ironman " st
pstring f3 = "I am more like black widow " st
pstring f4 = "I am more like superman " st
pstring f5 = "I am more like batman " st
pstring f6 = "I am more like hawkeye " st
pstring f7 = "I am more like spiderman " st
pstring f8 = "I am more like captain america " st
pstring f9 = "I am more like my own heroe " st
' Display the menu
Printl "Choose the kind of heroe you are: " st
Printl "1. "+ f1
Printl "2. "+ f2
Printl "3. "+ f3
Printl "4. "+ f4
Printl "5. "+ f5
Printl "6. "+ f6
Printl "7. "+ f7
Printl "8. "+ f8
Printl "9. "+ f9
printl ""
'int le,i
printl st "Enter your choice (1-9): "
' Get user input
'Dim As string choice
dim choice as integer '' go :-)
color 0xf2
choice=input
color 0xf0
Print ""
' Debug and feedback section
Printl "DEBUG: User input length is "+ Len(choice)+ " character(s)."
Printl "DEBUG: User input is '"+ choice+ "'."
Printl ""
integer number
' Validate and process the user's choice
If Len(choice) = 1 Then
Select Case asc(choice)
Case "1"
Print "You selected: "+ f1
Case "2"
Print "You selected: "+ f2
Case "3"
Print "You selected: "+ f3
Case "4"
Print "You selected: "+ f4
Case "5"
Print "You selected: "+ f5
Case "6"
Print "You selected: "+ f6
Case "7"
Print "You selected: "+ f7
Case "8"
Print "You selected: "+ f8
Case "9"
Print "You selected: "+ f9
Case Else
Print " Invalid choice. Please enter a number between 1 and 9."
End Select
Else
Print " Error: Input length is invalid. Expected 1 character."
End If
Print ""
' End of program
color 0xf0
Print "Press any key to continue..."
wait
' ends
Bstring example 2
You need the new update7 for this example See my Last Post below
' -- >bstring example, 09-09-2024, halProment Basic, frank bruebach
'
take kons
dim smytry as bstring
smytry = "A1234@§"
pget smytry
p? STR(LEN(smytry)) ' 7
p? smytry
printl smytry
dim MyStr1 as string
MyStr1="Hello halProment"
p? STR(LEN(MyStr1)) ' 17
printl STR(LEN(MyStr1))
p? MyStr1
printl MyStr1
dim MyStr2 as bstring
MyStr2="Hello halProment2"
pget MyStr2
p? STR(LEN(MyStr2)) ' 18
printl STR(LEN(MyStr2))
p? MyStr2
printl MyStr2
dim str1 as bstring
str1="hello, world"
pget str1
p? str1
printl str1
p? STR(LEN(str1)) 'returns 12, the length of the string it contains
printl STR(LEN(str1))
p? STR(SIZEOF(str1)) 'returns 4
printl STR(SIZEOF(str1))
wait
' ends
OpenGL example: Axis and coordinates
' -- opgl test with axis and sin cos curves
' -- halProment by frank bruebach, 15-04-2024, 11-09-2024
'
$ sfile "axis-and-coordinates.exe"
$ title "Triangle and Axis with sin cos curves"
pro width=800
pro height=600
take proglscene
function KeyState(pro k) as pro
===============================
return GetAsyncKeyState(k) and 0x8000 'key down
end function
sub Initialize(sys hWnd)
'=======================
end sub
'
'--------------------------------------------- //
sub Scene(pro hWnd)
static single ang1, angi1 = 1
dim i as integer
dim x, y, angle as single
dim radius as single = 2.0
glClearColor 0.3, 0.3, 0.5, 0
glClear GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT
glLoadIdentity
gltranslatef 0.0, 0.0, -10.0 '-4.0
glrotatef ang1, 0.0, 0.0, 1.0
glBegin GL_TRIANGLES
glColor3f 1.0, 0.0, 0.0 : glVertex3f 0.0, 1.0, 0.0
glColor3f 0.0, 1.0, 0.0 : glVertex3f -1.0, -1.0, 0.0
glColor3f 0.0, 0.0, 1.0 : glVertex3f 1.0, -1.0, 0.0
glEnd
' Draw axis
glBegin GL_LINES
glLineWidth 2.0
gltranslatef 0,0,-6 '-1
glscalef 0.01,0.01,0.01
glColor4ub 250,50,0,0 ' X axis color
glVertex2i -500,0
glVertex2i 500,0
glColor4ub 0,0,255,0 ' Y axis color
glVertex2i 0,500
glVertex2i 0,-500
glEnd
glBegin GL_LINES
gltranslatef 0,0,-6
glscalef 0.5,0.5,0.5
glColor4ub 0,255,255,0
' -- some Marks on axes ---------- //
for i = -5 to 5 step 1.025
glVertex2i i, -0.5001
glVertex2i i, 0.5001
glVertex2i -0.5001, i
glVertex2i 0.5001, i
next
glEnd
' Draw rounded, smooth sine and cosine curves
'pro pi = 3.1415926536
glLineWidth 2.0
glColor4ub 255, 200, 0, 0
glBegin GL_LINE_STRIP
for i = -360 to 360
angle = i * 3.1415926536 / 180 ' Correct conversion from degrees to radians
glVertex2f i / 360.0 * 2.0 * 3.1415926536, sin(angle)
next
glEnd
glBegin GL_LINE_STRIP
glColor4ub 0, 255, 200, 0
for i = -360 to 360 'step 5
angle = i * 3.1415926536 / 180 ' Convert degrees to radians
glVertex2f i / 360.0 * 2.0 * 3.1415926536, cos(angle)
next
glEnd
'
'UPDATE ROTATION ANGLES
'----------------------
'
'ang1+=angi1
'if ang1>360 then ang1-=360
'
end sub
sub Release(sys hwnd)
'====================
end sub
'ends
New: OpenGL Cube Collision (simple)
Info: you must use Arrow Keys to move the Cube and noticed the collision
Arrow Keys: Up down left right
' cube and collision example, july-august 2024, frank bruebach
' 10-august-2024, halProment Basic
'
' the collision works fine here -> both cubes lays upon each other
' move cube with arrows up,down,left,right
'
$ sFile "cube-and-collision.exe"
$ title "cubes and collision simple"
int width=640
int height=480
uses proglscene ''OpenglSceneFrame
pindex 1
Type BoundingBox
minX As Single
maxX As Single
minY As Single
maxY As Single
minZ As Single
maxZ As Single
End Type
Dim cube1 As BoundingBox
Dim cube2 As BoundingBox
Dim cube1Pos As Single = 2
Dim cube2Pos As Single = -2
Dim cube1PosX As Single = 2
Dim cube1PosY As Single = -2
Dim cube2PosX As Single = 2
Dim cube2PosY As Single = -2
Function CheckCollision(ByRef box1 As BoundingBox, ByRef box2 As BoundingBox) As LONG
' Check if the bounding boxes overlap in the X dimension
If box1.maxX < box2.minX Or box1.minX > box2.maxX Then
Return False
End If
' Check if the bounding boxes overlap in the Y dimension
If box1.maxY < box2.minY Or box1.minY > box2.maxY Then
Return False
End If
' Check if the bounding boxes overlap in the Z dimension
If box1.maxZ < box2.minZ Or box1.minZ > box2.maxZ Then
Return False
End If
' If all dimensions overlap, there is a collision
Return True
End Function
sub Initialize(sys hWnd)
'=======================
end sub
'
'----------------------------------------------------------------------------------- //
sub DrawGlCube(ByRef rotangle As Single, ByVal posX As Single, ByVal posY As Single)
glLoadIdentity
glTranslatef(posX, posY, -7)
'glRotatef ang1,1.0, 1.0, 1.0 'rquad
glBegin GL_QUADS
glColor3f 0.0, 1.0, 0.0
glVertex3f 1.0, 1.0, -1.0
glVertex3f -1.0, 1.0, -1.0
glVertex3f -1.0, 1.0, 1.0
glVertex3f 1.0, 1.0, 1.0
glColor3f 1.0, 0.5, 0.0
glVertex3f 1.0, -1.0, 1.0
glVertex3f -1.0, -1.0, 1.0
glVertex3f -1.0, -1.0, -1.0
glVertex3f 1.0, -1.0, -1.0
glColor3f 1.0, 0.0, 0.0
glVertex3f 1.0, 1.0, 1.0
glVertex3f -1.0, 1.0, 1.0
glVertex3f -1.0, -1.0, 1.0
glVertex3f 1.0, -1.0, 1.0
glColor3f 1.0, 1.0, 0.0
glVertex3f 1.0, -1.0, -1.0
glVertex3f -1.0, -1.0, -1.0
glVertex3f -1.0, 1.0, -1.0
glVertex3f 1.0, 1.0, -1.0
glColor3f 0.0, 0.0, 1.0
glVertex3f -1.0, 1.0, 1.0
glVertex3f -1.0, 1.0, -1.0
glVertex3f -1.0, -1.0, -1.0
glVertex3f -1.0, -1.0, 1.0
glColor3f 1.0, 0.0, 1.0
glVertex3f 1.0, 1.0, -1.0
glVertex3f 1.0, 1.0, 1.0
glVertex3f 1.0, -1.0, 1.0
glVertex3f 1.0, -1.0, -1.0
glEnd
End sub
'----------------------------------------------------------------------------------- //
sub DrawGlCube2(ByRef rotangle As Single, ByVal posX As Single, ByVal posY As Single)
glLoadIdentity
'glRotatef ang1,1.0, 1.0, 1.0 'rquad
glTranslatef(posX, posY, -7)
glBegin GL_QUADS
glColor3f 0.0, 1.0, 0.0
glVertex3f 1.0, 1.0, -1.0
glVertex3f -1.0, 1.0, -1.0
glVertex3f -1.0, 1.0, 1.0
glVertex3f 1.0, 1.0, 1.0
glColor3f 1.0, 0.5, 0.0
glVertex3f 1.0, -1.0, 1.0
glVertex3f -1.0, -1.0, 1.0
glVertex3f -1.0, -1.0, -1.0
glVertex3f 1.0, -1.0, -1.0
glColor3f 1.0, 0.0, 0.0
glVertex3f 1.0, 1.0, 1.0
glVertex3f -1.0, 1.0, 1.0
glVertex3f -1.0, -1.0, 1.0
glVertex3f 1.0, -1.0, 1.0
glColor3f 1.0, 1.0, 0.0
glVertex3f 1.0, -1.0, -1.0
glVertex3f -1.0, -1.0, -1.0
glVertex3f -1.0, 1.0, -1.0
glVertex3f 1.0, 1.0, -1.0
glColor3f 0.0, 0.0, 1.0
glVertex3f -1.0, 1.0, 1.0
glVertex3f -1.0, 1.0, -1.0
glVertex3f -1.0, -1.0, -1.0
glVertex3f -1.0, -1.0, 1.0
glColor3f 1.0, 0.0, 1.0
glVertex3f 1.0, 1.0, -1.0
glVertex3f 1.0, 1.0, 1.0
glVertex3f 1.0, -1.0, 1.0
glVertex3f 1.0, -1.0, -1.0
glEnd
end sub
'------------------ //
sub Scene(sys hWnd)
'==================
'
static single ang1,angi1=1
static Single angle
static int fps
'
glClearColor 0.3, 0.3, 0.5, 0
glClear GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT
'
glLoadIdentity
'
glClearColor 0.5, 0, 0, 0
glPushMatrix
'
glLoadIdentity
static int framecount
sys x,y
framecount++
gltranslatef -.5,.25,-4.0
glColor3f .99,.50,.50
glscalef .2,.2,.01 ''*** larger scale from ,06
gprint str(framecount)
'
glpopmatrix
'
glLoadIdentity
glpushMatrix
gltranslatef 2.0, 0.0, -4.0
'glClearColor 0.8, 0.3, 0.5, 0
glscalef .2,.2,.01
glRotatef 90.0,0,0,1
gprint "Hello openGL"
glPopMatrix
'
if not key[16] 'shift'
if key[37] then cube1PosX -= 0.1 ' to right side
if key[39] then cube1PosX += 0.1 ''
if key[38] then cube1PosY += 0.1 '' up ''
if key[40] then cube1PosY -= 0.1 '' down ''
if key[33] then cube1PosY += 0.1 '''page up
if key[34] then cube1PosY -= 0.1 '''page down
end if
' Update bounding boxes
cube1.minX = cube1PosX - 1
cube1.maxX = cube1PosX + 1
cube1.minY = cube1PosY - 1
cube1.maxY = cube1PosY + 1
cube1.minZ = -7 - 1
cube1.maxZ = -7 + 1
cube2.minX = cube2PosX - 1
cube2.maxX = cube2PosX + 1
cube2.minY = cube2PosY - 1
cube2.maxY = cube2PosY + 1
cube2.minZ = -7 - 1
cube2.maxZ = -7 + 1
' Clear the screen
glClear(GL_COLOR_BUFFER_BIT)
' Draw the cubes
'glEnable(GL_CULL_FACE)
DrawGlCube(angle, cube1PosX, cube1PosY)
DrawGlCube2(angle, cube2PosX, cube2PosY)
'glDisable(GL_CULL_FACE)
'------------------------------- // solved and corrected ----------- //
' Check for collision
If CheckCollision(cube1, cube2) Then
gltranslatef 4.0, 0.0, -4.0
glscalef .52,.52,.01
glRotatef 90.0,0,0,1
gprint "Collision!"
End If
'------------------------------- // solved and corrected ----------- //
'ang1+=angi1
if ang1>360 then ang1-=360
end sub
sub Release(sys hwnd)
'====================
end sub
Here is the new little update7 of halProment with all new examples, Screenshots, new halPromIde24 IDE and new halProment DLL
Hello two more examples at the start: 1) class sum2 example
And 2) select a Hero with more choice than 12 Inputs for Users I have updated the Code example
1) class sum2 example
' class test sum, april 2024, halproment
' converted and update an old oxygen basic example
'
class pstat
method psum() as double
method average() as double
da(100) as double
dn as long
end class
'--------------- //
methods of pstat
method psum() as double
dim i as integer
for i = 1 to this.dn
method += this.da(i)
next
end method
'--------------------------- //
method average() as double
method = this.psum / this.dn
end method
end methods
' test
'dim ast as pstat
new pstat ast
ast.da => 2,4,6,8,10,12,14,16,18,20,22,24
ast.dn = 6
p? `Sum: ` str(ast.psum) ` Average: ` str ast.average ' results: 42 ' 7
Example 2) select a heroe Input with a greater Ränge of choice..
' input example2 and select case2, halProment
' 21-08-2024, frank bruebach, 10-09-2024, 14-09-2024
' addition for more choice than 9 inputs
'
take kons
bstring st
printl "start" st
' Initialize user descriptions
pstring f1 = "I am more like thor "
pstring f2 = "I am more like ironman "
pstring f3 = "I am more like black widow "
pstring f4 = "I am more like superman "
pstring f5 = "I am more like batman "
pstring f6 = "I am more like hawkeye "
pstring f7 = "I am more like spiderman "
pstring f8 = "I am more like captain america "
pstring f9 = "I am more like my own hero "
pstring f10 = "I am more like wonder woman "
pstring f11 = "I am more like the flash "
pstring f12 = "I am more like aquaman "
' Display the menu
Printl "Choose the kind of hero you are: "
Printl "1. " + f1
Printl "2. " + f2
Printl "3. " + f3
Printl "4. " + f4
Printl "5. " + f5
Printl "6. " + f6
Printl "7. " + f7
Printl "8. " + f8
Printl "9. " + f9
Printl "10. " + f10
Printl "11. " + f11
Printl "12. " + f12
printl ""
printl st "Enter your choice (1-12): "
' Get user input
dim choice as integer
color 0xf2
choice=input
color 0xf0
Print ""
color 0xf0
Print ""
' Debug and feedback section
Printl "DEBUG: User input length is " + Len(choice) + " character(s)."
Printl "DEBUG: User input is '" + choice + "'."
Printl ""
' Validate and process the user's choice
If choice >= 1 And choice <= 12 Then
Select Case choice
Case 1
Print "You selected: " + f1
Case 2
Print "You selected: " + f2
Case 3
Print "You selected: " + f3
Case 4
Print "You selected: " + f4
Case 5
Print "You selected: " + f5
Case 6
Print "You selected: " + f6
Case 7
Print "You selected: " + f7
Case 8
Print "You selected: " + f8
Case 9
Print "You selected: " + f9
Case 10
Print "You selected: " + f10
Case 11
Print "You selected: " + f11
Case 12
Print "You selected: " + f12
End Select
Else
Print "Invalid choice. Please enter a number between 1 and 12."
End If
Print ""
' End of program
color 0xf0
Print "Press any key to continue..."
wait
' ends
PS I have found a little Bug in my Last Update and will fix IT for next Update :-)
Nice Weekend so far and I didnt expect any Feedback although a Lot of people have visited this Board.. its a question of User characters Here they come See Copy Download without any real interest about halProment ;-) thx
OK Last Not least: Here you can find new halProment Update8 (14-09-2024) with all examples, txt Files,includes, pics etcpp.. Screenshots.. and I fixed the little Bug in one of my example..
My Last example:
Creates a winapi SDK Style windowframe with Font and color. I didnt want to use Here gdiplus.
You can Change the fontsize Like you Wish.. this example you can Convert simple to oxygen.. I have built this example some days ago in freebasic with a little Help
Btw: all examples Here at the board you can easy Convert to oxygen
' how to create fonts in winapi without gdiplus
' halProment: new-> fontsize and color, 20-09-2024, frank bruebach
' GUI winapi, sdk style
'
uses promgui
#foreward
%OUT_DEFAULT_PRECIS = 0?
%ANSI_CHARSET = 0?
%DEFAULT_CHARSET = 1?
%SYMBOL_CHARSET = 2?
%CLIP_DEFAULT_PRECIS = 0?
%CLIP_CHARACTER_PRECIS = 1?
%DEFAULT_QUALITY = 0?
%DEFAULT_PITCH = 0?
%FIXED_PITCH = 1?
%VARIABLE_PITCH = 2?
%MONO_FONT = 8?
%FF_DONTCARE = 0?
%FF_ROMAN = 16?
%FF_SWISS = 32?
%OUT_OUTLINE_PRECIS = 8?
DECLARE FUNCTION SetBkMode LIB "GDI32.DLL" ALIAS "SetBkMode" ( _
BYVAL hdc AS DWORD _
, BYVAL mode AS LONG _
) AS LONG
DECLARE FUNCTION CreateFontA LIB "GDI32.DLL" ALIAS "CreateFontA" ( _
BYVAL cHeight AS LONG _
, BYVAL cWidth AS LONG _
, BYVAL cEscapement AS LONG _
, BYVAL cOrientation AS LONG _
, BYVAL cWeight AS LONG _
, BYVAL bItalic AS DWORD _
, BYVAL bUnderline AS DWORD _
, BYVAL bStrikeOut AS DWORD _
, BYVAL iCharSet AS DWORD _
, BYVAL iOutPrecision AS DWORD _
, BYVAL iClipPrecision AS DWORD _
, BYVAL iQuality AS DWORD _
, BYVAL iPitchAndFamily AS DWORD _
, OPTIONAL BYREF pszFaceName AS STRING _ ''ASCIIZ _
) AS DWORD
function rgb(sys red,green,blue) as pro
sys color
color = red
color = color + green*256
color = color + blue*65536
return color
end function
'---------------------------------------- //
dim cmdline as asciiz ptr, inst as sys
@cmdline=GetCommandLine
inst=GetModuleHandle 0
WinMain inst,0,cmdline,SW_NORMAL
end
'-------------------------------------------------------------------- //
Function WinMain(pro inst, prevInst, asciiz*cmdline, pro show) as pro
'==================================================================== //
WndClass wc
MSG wm
pro hwnd, wwd, wht, wtx, wty, tax
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 =null
.lpszClassName = strptr "Demo"
end with
RegisterClass (@wc)
Wwd = 720 : Wht = 500
Tax = GetSystemMetrics SM_CXSCREEN
Wtx = (Tax - Wwd) /2
Tax = GetSystemMetrics SM_CYSCREEN
Wty = (Tax - Wht) /2
hwnd = CreateWindowEx 0,wc.lpszClassName,"halProment BASIC",WS_OVERLAPPEDWINDOW,Wtx,Wty,Wwd,Wht,0,0,inst,0
ShowWindow hwnd,SW_SHOW
UpdateWindow hwnd
'
pro bRet
'
do while bRet := GetMessage (@wm, 0, 0, 0)
if bRet = -1 then
'show an error message
else
TranslateMessage @wm
DispatchMessage @wm
end if
wend
End Function
Sub setfontcolours(f As pro,text As long,background As long=0)
SetTextColor(f,text)
if background=0 then
SetBkMode(f,TRANSPARENT)
else
SetBkColor(f,background)
end if
End Sub
Sub setfontsize(f As pro,size As Long,style As string,weight as long=400)
SelectObject(f,CreateFont(size,0,0,0,weight,0,0,0,DEFAULT_CHARSET,OUT_OUTLINE_PRECIS,CLIP_DEFAULT_PRECIS,ANTIALIASED_QUALITY,VARIABLE_PITCH,style))
End Sub
'------------------------------------------------------------------ //
function WndProc ( pro hWnd, wMsg, wParam, lparam ) as pro callback
'================================================================== //
dim as rect crect
static as pro hdc
static as String txt
static as PaintStruct Paintst
pro hfont
pro hInstances
hfont = CreateFont(50, 50, 0, 0, _ ' --> here you can change font size, 40, 40
FW_NORMAL, FALSE, TRUE, FALSE,_
ANSI_CHARSET, OUT_DEFAULT_PRECIS,_
CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY,_
DEFAULT_PITCH or FF_ROMAN,_
"Comic")
select wMsg
case WM_CREATE
// ----------- //
GetClientRect hWnd,&cRect
Dim As RECT rc
GetClientRect(hWnd, @rc)
' Create Editbox
pro hwndEdit = CreateWindowEx(0, "EDIT", "size fonts", _
WS_CHILD Or WS_BORDER Or WS_VISIBLE Or ES_AUTOHSCROLL Or ES_MULTILINE, _
20, 220, 640, 180, _
hWnd, 0, hInstances,ByVal 0)
SendMessage(hwndEdit, WM_SETFONT, hfont, TRUE)
case WM_DESTROY
// ----------- //
PostQuitMessage 0
case WM_PAINT
// ----------- //
GetClientRect hWnd,&cRect
hDC=BeginPaint hWnd,&Paintst
setfontsize(hdc,80,"times new roman")
setfontcolours(hdc,rgb(0,200,0))
SetBkColor hdc,yellow
SetTextColor hdc,red
'DrawText hDC,"Hello World!",-1,&cRect,0x25
TextOut hDC, 50, 80, "Hello, PromentBasic!", 20' 25
setfontcolours(hdc,rgb(100,200,200))
TextOut hDC, 40, 20, "Hello, Batman!", 15
EndPaint hWnd,&Paintst
case WM_KEYDOWN
Select wParam
Case 27 : SendMessage hwnd, WM_CLOSE, 0, 0
End Select
case else
function=DefWindowProc hWnd,wMsg,wParam,lParam
end select
end function
' end of example
OK thats all :-) nice Weekend and bye..