Save as Huh-Yuh.bas
Code: Select all
#define WIN_INCLUDEALL
#include once "windows.bi"
#include once "win\commctrl.bi"
Dim Shared As Long Sbh=0 , getlasth=0
Dim Shared As Long Sbv=0 , getlastv=0
'===============================================================================
'===============================================================================
Private function fb_Set_Font (Font As String,Size As Integer,Bold As Integer,Italic As Integer,Underline As Integer,StrikeThru As Integer) As HFONT
Dim As HDC hDC=GetDC(HWND_DESKTOP)
Dim As Integer CyPixels=GetDeviceCaps(hDC,LOGPIXELSY)
ReleaseDC(HWND_DESKTOP,hDC)
Return CreateFont(0-(Size*CyPixels)/72,0,0,0,0,0,0,StrikeThru, ANSI_CHARSET _
,OUT_TT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,FF_DONTCARE,Font)
End Function
'===============================================================================
'===============================================================================
Dim Shared As string meanings(1 To 22, 1 to 16)
open "Words_Out.txt" for input as #1
for a as integer = 1 to 22
for b as integer = 1 to 16
line input #1, meanings(a,b)
if meanings(a,b)="" then
line input #1, meanings(a,b)
end if
meanings(a,b) = mid(meanings(a,b),instr(1,meanings(a,b)," ")+1)
next
next
close #1
Dim Shared As string numbers(1 To 5, 1 to 10)
open "Numbers.txt" for input as #1
for a as integer = 1 to 5
for b as integer = 1 to 10
line input #1, numbers(a,b)
if numbers(a,b)="" then
line input #1, numbers(a,b)
end if
numbers(a,b) = mid(numbers(a,b),instr(1,numbers(a,b)," ")+1)
next
next
close #1
Dim Shared As String consonants(1 To 22)
Dim Shared As String vowels(1 To 16)
consonants(01) = "H"
consonants(02) = "Y"
consonants(03) = "W"
consonants(04) = "R"
consonants(05) = "S"
consonants(06) = "Z"
consonants(07) = "K"
consonants(08) = "G"
consonants(09) = "F"
consonants(10) = "V"
consonants(11) = "L"
consonants(12) = "Th"
consonants(13) = "B"
consonants(14) = "P"
consonants(15) = "M"
consonants(16) = "N"
consonants(17) = "D"
consonants(18) = "T"
consonants(19) = "Ch"
consonants(20) = "J"
consonants(21) = "Sh"
consonants(22) = "Zh"
vowels(01) = "uh" ' hut
vowels(02) = "ah" ' tah
vowels(03) = "ew" ' too
vowels(04) = "oh" ' go
vowels(05) = "ow" ' how
vowels(06) = "oo" ' foot
vowels(07) = "aw" ' paw
vowels(08) = "iw" ' elmer fudd "hill"
vowels(09) = "a" ' at
vowels(10) = "eh" ' hell
vowels(11) = "ih" ' hill
vowels(12) = "ay" ' hay
vowels(13) = "ie" ' pie
vowels(14) = "ee" ' pee
vowels(15) = "au" ' bostonian O , aw with your lips pushed out
vowels(16) = "oi" ' boy
Dim Shared As String num_consonants(1 To 10)
Dim Shared As String num_vowels(1 To 5)
num_consonants(01) = "H"
num_consonants(02) = "Y"
num_consonants(03) = "W"
num_consonants(04) = "R"
num_consonants(05) = "S"
num_consonants(06) = "Z"
num_consonants(07) = "K"
num_consonants(08) = "G"
num_consonants(09) = "F"
num_consonants(10) = "V"
num_vowels(1) = "ur"
num_vowels(2) = "en"
num_vowels(3) = "in"
num_vowels(4) = "awn"
num_vowels(5) = "an"
Dim As HFONT fonthdl_1
Dim As String fontname_1
Dim As Integer fontsize_1 = 10
fontname_1 = "Consolas"
fonthdl_1 = fb_Set_Font(fontname_1,fontsize_1,0,0,0,0)
Dim As MSG msg
Dim Shared As HWND hWnd , statics _
, characters(1 To 352) _
, edits(1 to 352) _
, Huh_Yuh(1 to 352) _
, nums(1 to 50) _
, num_edit(1 to 50) _
, num_button(1 to 50)
dim shared as SCROLLINFO si_h , si_v
dim as point ep
' Create window
hWnd = CreateWindowEx( 0, "#32770", "Bitmap Button Test plus mouse wheel", WS_OVERLAPPEDWINDOW Or WS_VISIBLE , 100, 0, 800, 600, 0, 0, 0, 0 )
statics = CreateWindowEx( 0, "STATIC", "" , WS_BORDER Or WS_VISIBLE Or WS_CHILD or WS_CLIPSIBLINGS , 10 , 10 , 2300 , 1550 , hWnd, 0, 0, 0 )
'create buttons for each syllable
Dim Shared As Integer button , x_pos , y_pos , vowel
button= 1
x_pos = 1
y_pos = 1
vowel = 1
dim as longint EUDC = 33'2&H0010
For y As Integer = 1 To 16
x_pos = 10
vowel = y
For x As Integer = 1 To 22
characters(button) = CreateWindowEx( 0, "BUTTON", "" , WS_BORDER Or WS_VISIBLE Or WS_CHILD , x_pos , y_pos , 80 , 20 , statics, 0, 0, 0 )
SetWindowText( characters(button) , consonants(x) + vowels(vowel) )
'SendMessage(characters(button),WM_SETFONT , Cast(WPARAM,fonthdl_1),1 )
edits(button) = CreateWindowEx( 0, "EDIT", "" , WS_BORDER Or WS_VISIBLE Or WS_CHILD or ES_CENTER , x_pos , y_pos+22 , 100 , 20 , statics, 0, 0, 0 )
SetWindowText(edits(button) , meanings(x,y))
SendMessage(edits(button),WM_SETFONT , Cast(WPARAM,fonthdl_1),1 )
Huh_Yuh(button) = CreateWindowEx( 0, "BUTTON", wchr(EUDC) , WS_BORDER Or WS_VISIBLE Or WS_CHILD or ES_READONLY , x_pos+80 , y_pos , 20 , 20 , statics, 0, 0, 0 )
SendMessage(Huh_Yuh(button),WM_SETFONT , Cast(WPARAM,fonthdl_1),1 )
button+=1
x_pos+=100
EUDC+=1
if consonants(x) = "Y" then x_pos+=10
if Consonants(x) = "R" then x_pos+=10
if Consonants(x) = "Z" then x_pos+=10
if Consonants(x) = "G" then x_pos+=10
if Consonants(x) = "V" then x_pos+=10
if Consonants(x) = "Th" then x_pos+=10
if Consonants(x) = "M" then x_pos+=10
if Consonants(x) = "T" then x_pos+=10
Next
y_pos+=70
Next
y_pos+=70
button = 1
For y As Integer = 1 To 5
x_pos = 10
For x As Integer = 1 To 10
num_edit(button) = CreateWindowEx( 0, "BUTTON", "" , WS_BORDER Or WS_VISIBLE Or WS_CHILD , x_pos , y_pos , 80 , 20 , statics, 0, 0, 0 )
SetWindowText( num_edit(button) , num_consonants(x) + num_vowels(y) )
nums(button) = CreateWindowEx( 0, "EDIT", "" , WS_BORDER Or WS_VISIBLE Or WS_CHILD or ES_CENTER , x_pos , y_pos+22 , 100 , 20 , statics, 0, 0, 0 )
SetWindowText(nums(button) , numbers(y,x))
SendMessage(nums(button),WM_SETFONT , Cast(WPARAM,fonthdl_1),1 )
num_button(button) = CreateWindowEx( 0, "BUTTON", wchr(EUDC) , WS_BORDER Or WS_VISIBLE Or WS_CHILD or ES_READONLY , x_pos+80 , y_pos , 20 , 20 , statics, 0, 0, 0 )
SendMessage(num_button(button),WM_SETFONT , Cast(WPARAM,fonthdl_1),1 )
button+=1
x_pos+=100
if num_consonants(x) = "Y" then x_pos+=10
if num_Consonants(x) = "R" then x_pos+=10
if num_Consonants(x) = "Z" then x_pos+=10
if num_Consonants(x) = "G" then x_pos+=10
if num_Consonants(x) = "V" then x_pos+=10
Next
y_pos+=70
Next
'Set the scrolling range and page size of horz
si_h.cbSize = sizeof(si_h)
si_h.fMask = SIF_RANGE or SIF_PAGE
si_h.nMin = 0
si_h.nMax = 5 ' adjust here to change the thumb size
si_h.nPage = 1
SetScrollInfo(hwnd, SB_HORZ, @si_h, TRUE)
'Set the scrolling range and page size of horz
si_v.cbSize = sizeof(si_v)
si_v.fMask = SIF_RANGE or SIF_PAGE
si_v.nMin = 0
si_v.nMax = 5 ' adjust here to change the thumb size
si_v.nPage = 1
SetScrollInfo(hwnd, SB_VERT, @si_v, TRUE)
SetScrollPos(hWnd, SB_HORZ , 0 , 1)
SetScrollPos(hWnd, SB_VERT , 0 , 1)
Dim As rect w
getwindowrect(hWnd,@w)
dim as long w_wide = w.right - w.left
dim as long w_high = w.bottom - w.top
dim as long last_w = w_wide
dim as long last_h = w_high
Dim As rect s
getwindowrect(statics,@s)
dim as long s_wide = s.right - s.left
dim as long inc_h = s_wide \ 7
dim as long s_high = s.bottom - s.top
dim as long inc_y = s_high \ 7
ep.x = 0
ep.y = 0
dim as point m
MessageBox( null, "Left Click ScrollBar to decrement , Right Click ScrollBar to increment" , 0 , 0 )
'Dodicat code
function inrect(h as hwnd,mx as integer,my as integer) as long
Dim As rect r
getwindowrect(h,@r)
return mx>r.left and mx<r.right and my>r.top and my<r.bottom
end function
While GetMessage( @msg, 0, 0, 0 )
TranslateMessage( @msg )
DispatchMessage( @msg )
getcursorpos(@m)
'Dodicat's code
'===================== get the button =======
for n1 as long = lbound(Huh_Yuh) to ubound(Huh_Yuh)
if inrect(Huh_Yuh(n1),m.x,m.y) and loword(msg.message) = WM_LBUTTONDOWN then
Dim As UShort x = (n1 Mod 22) :If x=0 Then x=22
Dim As UShort y = (((n1+21)\22) Mod 16):If y=0 Then y=16
MessageBox( null, "Button " + str(n1) + " = " + meanings(x,y) , 0 , 0 )
end if
next
'===========================================
'===================== get the button =======
for n2 as long = lbound(num_button) to ubound(num_button)
if inrect(num_button(n2),m.x,m.y) and loword(msg.message) = WM_LBUTTONDOWN then
Dim As UShort x = (n2 Mod 10) :If x=0 Then x=10
Dim As UShort y = (((n2+9)\10) Mod 5) :If y=0 Then y= 5
MessageBox( null, "Button " + str(n2) + " = " + numbers(y,x) , 0 , 0 )
end if
next
'===========================================
Select Case msg.hwnd
Case hWnd
Select Case msg.message
Case 273 : PostQuitMessage(0)
case 161,163 ' left button down
select case loword(msg.wparam)
case 6
if getlasth > 0 then getlasth-=1
SetScrollPos(hWnd, SB_HORZ , getlasth , 1)
ep.x = getlasth * inc_h
movewindow(statics,-ep.x,-ep.y,s_wide,s_high,1)
case 7
if getlastv > 0 then getlastv-=1
SetScrollPos(hWnd, SB_VERT , getlastv , 1)
ep.y = getlastv * inc_y
movewindow(statics,-ep.x,-ep.y,s_wide,s_high,1)
end select
case 164,165 ' Right button down
select case loword(msg.wparam)
case 6
if getlasth < 5 then getlasth+=1
SetScrollPos(hWnd, SB_HORZ , getlasth , 1)
ep.x = getlasth * inc_h
movewindow(statics,-ep.x,-ep.y,s_wide,s_high,1)
case 7
if getlastv < 5 then getlastv+=1
SetScrollPos(hWnd, SB_VERT , getlastv , 1)
ep.y = getlastv * inc_y
movewindow(statics,-ep.x,-ep.y,s_wide,s_high,1)
end select
end select
End Select
Wend
PostQuitMessage(0)
End
Code: Select all
Huh I
Hah you
Hew it
Hoh him
How her
Hoo other
Haw group
Hiw the
Ha sky
Heh wind
Hih cloud
Hay rain
Hie snow
Hee earth
Hau sand
Hoi rock
Yuh senses
Yah see
Yew hear
Yoh taste
Yow touch
Yoo smell
Yaw give
Yiw take
Ya no
Yeh yes
Yih adult
Yay child
Yie baby
Yee least\small
Yau moderate\medium
Yoi most\large
Wuh color
Wah black
Wew brown
Woh red
Wow orange
Woo yellow
Waw green
Wiw blue
Wa violet
Weh white
Wih gray
Way silver
Wie gold
Wee is\am
Wau was
Woi will be
Ruh states of matter
Rah solid
Rew crystal
Roh granule
Row powder
Roo paste
Raw sludge
Riw gel
Ra syrup
Reh liquid
Rih frozen
Ray boiling
Rie gas
Ree verticle
Rau horizontal
Roi diagonal
Suh fall
Sah roll
Sew grow
Soh age
Sow float
Soo sink
Saw hang
Siw leak
Sa animal/bird/fish/parts
Seh feather
Sih tail
Say fin
Sie wing
See egg
Sau hoof
Soi beak
Zuh mental
Zah think
Zew remember
Zoh like
Zow will
Zoo circle
Zaw square
Ziw point
Za none
Zeh few
Zih many
Zay half
Zie all
Zee more
Zau enough
Zoi any
Kuh weight
Kah size
Kew speed
Koh quantity
Kow temperture
Koo sound
Kaw hardness
Kiw cost
Ka brightness
Keh length
Kih height
Kay depth
Kie flexability
Kee fragility
Kau ease
Koi wetness
Guh motions
Gah toward
Gew from
Goh away
Gow top
Goo front
Gaw back
Giw side
Ga forces
Geh magnetism
Gih electric
Gay light
Gie energy
Gee happy
Gau sad
Goi angry
Fuh yeast\spores
Fah molds\fungus
Few germs\virus
Foh mosses\grasses
Fow plants\canes
Foo bushes\trees
Faw mamals
Fiw animals
Fa reptiles
Feh fish
Fih birds
Fay insects
Fie water
Fee wave
Fau flow
Foi salty
Vuh family
Vah father
Vew mother
Voh son
Vow daughter
Voo relative
Vaw fire
Viw smoke
Va typeofmater
Veh element
Vih molecule
Vay compound
Vie space
Vee star
Vau planet
Voi orbital
Luh body actions
Lah pee
Lew poop
Loh breathe
Low see
Loo hear
Law eat
Liw drink
La chew
Leh sit
Lih stand
Lay lay
Lie walk
Lee run
Lau sleep
Loi wake
Thuh money
Thah buy
Thew sell
Thoh commerce
Thow owe
Thoo earn
Thaw own
Thiw borrow
Tha interactive actions
Theh speak
Thih play
Thay knock\attack
Thie fight
Thee lead
Thau follow
Thoi accompany
Buh inch
Bah foot
Bew yard
Boh mile
Bow cup
Boo pint
Baw quart
Biw gallon
Ba pinch
Beh ounce
Bih pound
Bay ton
Bie rough
Bee bumpy
Bau jagged
Boi smooth
Puh civilization
Pah building
Pew floor
Poh ceiling
Pow wall
Poo opening
Paw shelf
Piw seat
Pa bed
Peh cabinet
Pih table
Pay container
Pie utensil
Pee room
Pau carpet
Poi art
Muh science\Technology
Mah machine
Mew tool
Moh cloth
Mow paper
Moo pen
Maw wheel
Miw invention
Ma letter
Meh read
Mih write
May learn
Mie here
Mee there
Mau alone
Moi along
Nuh logic\number
Nah and
New or
Noh not
Now number
Noo answer
Naw with
Niw without
Na question
Neh who
Nih what
Nay why
Nie when
Nee where
Nau which
Noi how
Duh place
Dah up
Dew down
Doh left
Dow right
Doo center
Daw over
Diw under
Da in
Deh on
Dih out
Day around
Die through/intersect
Dee against
Dau by
Doi near
Tuh body parts
Tah head
Tew eye
Toh ear
Tow nose
Too mouth
Taw teeth
Tiw hand
Ta limb
Teh bottom
Tih shoulder
Tay @#&|$
Tie boob
Tee joint
Tau skin
Toi hair
Chuh food
Chah grain
Chew meat
Choh knife
Chow fork
Choo spoon
Chaw plate
Chiw bowl
Cha time
Cheh past
Chih present
Chay future
Chie second
Chee minute
Chau hour
Choi period
Juh manipulative actions
Jah lift
Jew lower
Joh drag
Jow grind
Joo squeeze
Jaw fill
Jiw empty
Ja start
Jeh stop
Jih finish
Jay repeat
Jie come
Jee go
Jau work
Joi rest
Shuh wipe
Shah fix
Shew carry
Shoh break
Show join
Shoo make
Shaw rotate
Shiw move
Sha hold
Sheh drop
Shih throw
Shay pull
Shie push
Shee pour
Shau tie
Shoi use
Zhuh clock
Zhah calendar
Zhew day
Zhoh week
Zhow month
Zhoo year
Zhaw weekend
Zhiw holiday
Zha root
Zheh trunk
Zhih branch
Zhay leaf
Zhie flower
Zhee seed
Zhau nut
Zhoi fruit
Code: Select all
hur 1
yur 2
wur 3
rur 4
sur 5
zur 6
kur 7
gur 8
fur 9
vur 0
hen ten
yen twenty
wen thirty
ren fourty
sen fifty
zen sixty
ken seventy
gen eighty
fen ninety
ven hundred
hin thousands
yin millions
win billions
rin trillions
sin quadrillions
zin quintillions
kin sextillions
gin septillions
fin octillions
vin novtillions
hawn "
yawn .
wawn ,
rawn ;
sawn :
zawn !
kawn ?
gawn $
fawn &
vawn @
han +
yan -
wan *
ran /
san ^
zan =
kan (
gan )
fan %
van #