Huh-Yuh Lanuage

Windows specific questions.
albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Huh-Yuh Lanuage

Post by albert »

Here's what i got so far , on my "Huh-Yuh" language.

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

Save as Words_Out.txt

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
Save as Numbers.txt

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 #
Last edited by albert on Mar 03, 2019 17:42, edited 19 times in total.
counting_pine
Site Admin
Posts: 6323
Joined: Jul 05, 2005 17:32
Location: Manchester, Lancs

Re: Huh-Yuh Lanuage

Post by counting_pine »

Can you explain what this code does?
albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Huh-Yuh Lanuage

Post by albert »

@Counting_Pine

"Huh-Yuh" is a spoken language , i'm working on..
I'm currently working on the font for it.

It has 352 letters in the alphabet.
So it's bigger than any other earth language.

I still have to write an editor for the glyph's.
I wrote "Picto-Font" to create the alphabet characters.

I'm working on drawing the alphabet chars to the button. Dodicat has been helping me write the code..
albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Huh-Yuh Lanuage

Post by albert »

I just edited the first post of the topic..

I updated the Words_Out.txt file and Huh-Yuh program..


Now to complete the font. and stick the font drawings on the buttons.
Then i can work on the editor for the font.
albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Huh-Yuh Lanuage

Post by albert »

I updated the Words_Out.txt

I think , i have the language done now.

Can anyone think of a word , that's not in the language? or , Find a word that's duplicated?
albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Huh-Yuh Lanuage

Post by albert »

I updated the Words_Out.txt post , above at the top..

I had "give" and "take" in there twice..
albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Huh-Yuh Lanuage

Post by albert »

I took out the numbers from the language... And put in symbols and punctuation , instead...

I'm gonna add the numbers in , at the bottom of the grid...

Here's the numbers:

Code: Select all

hur 1
yur 2
wur 3
rur 4
sur 5
zur 6
kur 7
gur 8
fur 9
vur 0

hawn 10
yawn 20
wawn 30
rawn 40
sawn 50
zawn 60
kawn 70
gawn 80
fawn 90

hin 100
yin 200
win 300
rin 400
sin 500
zin 600
kin 700
gin 800
fin 900

hen thousnds
yen millions
wen billions
ren trillions
sen quadrillions
zen quintillions
ken sextillions
gen septillions
fen octillions
I got to figure out how to add the numbers to the grid...
albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Huh-Yuh Lanuage

Post by albert »

I got the numbers added into the grid. See Top:

Now to do the font characters....
albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Huh-Yuh Lanuage

Post by albert »

I updated Huh-Yuh above with Dodicat's button finder..

All it does so far ; is bring up a message box , with the button number..

Click on the little square button , next to the Huh , Yuh etc... to see the button number...
albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Huh-Yuh Lanuage

Post by albert »

Another update..

See top post for the Huh_Yuh Language...

Click on the little square button next to the Huh , Yuh , Zuh etc..to see the button number and text meaning..

In a future version , it will put the Huh_Yuh font chr of the button , on an image editor.
I got to write the editor yet..
dodicat
Posts: 7983
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: Huh-Yuh Lanuage

Post by dodicat »

Hi Albert.
What do you think of dragging the static window with the right mouse button down?
example

Code: Select all

#define WIN_INCLUDEALL
#include once "windows.bi"
#include once "win\commctrl.bi"

'===============================================================================
'===============================================================================
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 4, 1 to 10)
    open "Numbers.txt" for input as #1
        for a as integer = 1 to 4
            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  4)

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) = "awn"
num_vowels(3) = "in"
num_vowels(4) = "en"

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 40) , num_edit(1 to 40)
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 , 10 , 10 , 2300 , 1400 , 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 or ANSI_CHARSET , 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 ANSI_CHARSET 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 ANSI_CHARSET 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

button = 1
For y As Integer = 1 To 4
    x_pos = 10
    For x As Integer = 1 To 10
        num_edit(button) = CreateWindowEx( 0, "BUTTON", "" , WS_BORDER Or WS_VISIBLE Or WS_CHILD or ANSI_CHARSET , 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 ANSI_CHARSET or ES_CENTER , x_pos , y_pos+22 , 100 , 20 , statics, 0, 0, 0 )
        SetWindowText(nums(button) , numbers(y,x))
        
        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

ep.x = 0
ep.y = 0

dim as longint mouse_x
dim as longint mouse_y
dim as point m

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

sub MoveStaticWindow(i as hwnd,ms as msg,mx as integer,my as integer,w as integer,h as integer)
    dim as rect r
    getwindowrect(i,@r)
    dim as point m
    Dim As Integer x=mx,y=my,dx,dy,b
    dim as integer idx=r.left-mx,idy=r.top-my
    while GetMessage( @ms, 0, 0, 0 )
        TranslateMessage(@ms )
        DispatchMessage(@ms )
        getcursorpos(@m)
     if inrect(i,m.x,m.y) then
        If m.x<>x Or m.y<>y  Then
            dx = m.x - x
            dy = m.y - y
            x = m.x
            y = m.y
            r.left=x+dx+idx-100
            r.top=y+dy+idy-20
        movewindow(i,r.left,r.top,w,h,1)    
            updatewindow(i)
        end if
        end if
        if loword(ms.message) = WM_RBUTTONUP then exit while
    wend
    end sub

While GetMessage( @msg, 0, 0, 0 )
   
    TranslateMessage( @msg )
    DispatchMessage( @msg )
    
   ' mouse_x = LoWord(msg.LPARAM)
   ' mouse_y = HiWord(msg.LPARAM)
    getcursorpos(@m)
   '===================== get the button =======
    for n as long=lbound(characters) to ubound(characters)
        if inrect(characters(n),m.x,m.y) and loword(msg.message) = WM_LBUTTONDOWN then
                setwindowtext(edits(n),"I am "+str(n))
                end if
        next
       'drag the static window by right button down
        if inrect(statics,m.x,m.y) and loword(msg.message) = WM_RBUTTONDOWN then
            MoveStaticWindow(statics,msg,m.x,m.y,2300 ,1400)
            end if
   '===========================================
  
    Select Case msg.hwnd
    
        Case hWnd
            Select Case msg.message
                Case 273 : PostQuitMessage(0)
            End Select
            
       'Albert's was here     
            
        
    End Select

Wend

End
 
albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Huh-Yuh Lanuage

Post by albert »

@Dodicat

I don't like it... When you release the right button to get another grip it has problems..
I got it working , how i want it...

Now : it's just to draw the font for it..
I got the letters all picked out , just to draw them yet. and make an editor..

I might still alter the vowels..with different ends like the numbers.
dodicat
Posts: 7983
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: Huh-Yuh Lanuage

Post by dodicat »

Fair enough Albert.
I agree, your original scroll was OK.
albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Huh-Yuh Lanuage

Post by albert »

@Dodicat

With my scrolling : you have to position the moue over the static, it can't be over a button or edit.

How about putting an invisible , static , over the buttons and edits? Then maybe it would scroll right?? Not sure??



.
dodicat
Posts: 7983
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: Huh-Yuh Lanuage

Post by dodicat »

Albert
I have been messing around with the actual horizontal and vertical scrollers if put on to the main window, but no luck yet.
If you use the mousewheelpress in my previous code it is a bit sharper.
WM_MBUTTONDOWN
and
WM_MBUTTONUP (in the sub)
Post Reply