Huh-Yuh Lanuage

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

Huh-Yuh Lanuage

Postby albert » Feb 11, 2019 1:08

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

Save as Huh-Yuh.bas

Code: Select all


#define unicode
#define WIN_INCLUDEALL

#include once "windows.bi"
#include once "win\commctrl.bi"
#include once ".\Tooltip.bas"

'===============================================================================
'===============================================================================
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 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 As String nl = Chr(13) + Chr(10)

Dim As MSG msg
Dim Shared As HWND hWnd, characters(1 To 352) , Huh_Yuh(1 to 352)

Dim As HFONT   fonthdl_1 , fonthdl_2
Dim As String  fontname_1 , fontname_2
Dim As Integer fontsize_1 = 7 , fontsize_2 = 7

fontname_1 = "Terminal"
fonthdl_1 = fb_Set_Font(fontname_1,fontsize_1,TRUE,0,0,0)

fontname_2 = "consolas" ' C:\USB\MY-FB-PROGRAMS-023\Huh-Yuh\Huh-Yuh"
fonthdl_2 = fb_Set_Font(fontname_2,fontsize_2,TRUE,0,0,0)

' Create window
hWnd = CreateWindowEx( 0, "#32770", "Huh-Yuh Language by Albert Redditt 2002/2019", WS_OVERLAPPEDWINDOW Or WS_VISIBLE , 100, 0, 1000, 685, 0, 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
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 , 40 , 15 , hWnd, 0, 0, 0 )
        SendMessage(characters(button),WM_SETFONT , Cast(WPARAM,fonthdl_1),0 )
        SetWindowText( characters(button) , consonants(x) + vowels(vowel) )
       
        dim as wstring*20 str1 = > meanings(x,y)
        CreateToolTip( characters(button) , str1 , 0 )
       
        button+=1
        x_pos+=40
        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+=40
Next

button= 1
x_pos = 10
y_pos = 1
vowel = 1
dim as longint EUDC = &HE000
For x As Integer = 1 To 22
    y_pos = 1
    For y As Integer = 1 To 16
        Huh_Yuh(button) = CreateWindowEx( 0, "BUTTON", wchr(EUDC) , WS_BORDER Or WS_VISIBLE Or WS_CHILD or ANSI_CHARSET or ES_READONLY , x_pos+10 , y_pos+15 , 16 , 16 , hWnd, 0, 0, 0 )
        SendMessage(Huh_Yuh(button),WM_SETFONT , Cast(WPARAM,fonthdl_2),0 )
        y_pos+=40
        button+=1
        EUDC+=1
    next
    x_pos+=40
    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

'===============================================================================
'===============================================================================
'enter Windows MessageLoop
'===============================================================================
'===============================================================================
While GetMessage( @msg, 0, 0, 0 )
   
    TranslateMessage( @msg )
    DispatchMessage( @msg )
   
    For z As Integer=1 To UBound(characters)
   
    Select Case msg.hwnd
        Case hWnd
            Select Case msg.message
                Case 273 : PostQuitMessage(0)
            End Select
       
        Case characters(z)
            Select Case msg.message 
                Case WM_LBUTTONDOWN
                    Dim As UShort x = (z Mod 22)          :If x=0 Then x=22
                    Dim As UShort y = (((z+21)\22) Mod 16):If y=0 Then y=16
                        MessageBox( null, _
                            "Syllable = " + consonants(x) + vowels(y) + nl + nl + _
                            "Meaning = " + meanings(x,y) + nl _
                            , "Character" , 0 )
                Case WM_MOUSEMOVE
                    'Dim As UShort x = (z Mod 22)          :If x=0 Then x=22
                    'Dim As UShort y = (((z+21)\22) Mod 16):If y=0 Then y=16
                    'print x;" "; y ; " " ; z ; " " ; meanings(x,y)
            End Select
    End Select
   
    Next z 

Wend
'===============================================================================
'===============================================================================
'END Program
'===============================================================================
'===============================================================================
PostQuitMessage(0)
End



Save as Tooltip.bas

Code: Select all

''=============================================================================
'' This procedure creates a tooltip for the client area of a window, where the
'' window can be a control window, an application window, or a dialog window.
''
'' Based on a Microsoft example from the PSDK.
''=============================================================================

sub CreateToolTip( byval hwnd as HWND, byref text as Wstring , byref tthwnd as HWND )

    dim as INITCOMMONCONTROLSEX iccex
    dim as TOOLINFOW ti
    dim as HWND hwndTT

    ''-------------------------------------------
    '' This not necessary for Windows XP, but it
    '' may be for earlier versions of Windows.
    ''-------------------------------------------

    dim as HINSTANCE hInst = GetModuleHandle(NULL)

    ''------------------------------------------------
    '' Initialize the necessary common control class.
    ''------------------------------------------------

    iccex.dwICC = ICC_WIN95_CLASSES
    iccex.dwSize = sizeof(INITCOMMONCONTROLSEX)
    InitCommonControlsEx(@iccex)

    ''----------------------------
    '' Create the tooltip window.
    ''----------------------------

    hwndTT = CreateWindowEx(NULL, TOOLTIPS_CLASS, NULL, _
                            WS_POPUP or TTS_NOPREFIX or TTS_ALWAYSTIP, _
                            CW_USEDEFAULT, CW_USEDEFAULT, _
                            CW_USEDEFAULT, CW_USEDEFAULT, _
                            tthwnd, NULL, 0, NULL)

    ''------------------------------------------------------
    '' Position the window at the top of the Z order but do
    '' not move or size it, or change its activation status.
    ''
    '' This was not necessary in my tests, but there may be
    '' conditions where it is necessary.
    ''------------------------------------------------------

    SetWindowPos( hwndTT, _
                  HWND_TOPMOST, _
                  0, _
                  0, _
                  0, _
                  0, _
                  SWP_NOMOVE or SWP_NOSIZE or SWP_NOACTIVATE )

    ''-------------------------------------------------------------
    '' Initialize the necessary members of the TOOLINFO structure.
    ''-------------------------------------------------------------

    ti.cbSize = 40 'sizeof(TOOLINFOW)
    ti.uFlags = TTF_SUBCLASS
    ti.hwnd = hwnd
    ti.hinst = NULL
    ti.lpszText = strptr(text)
    GetClientRect( hwnd, @ti.rect)

    ''------------------------------------------------------
    '' Register the tool (window) with the tooltip control.
    ''------------------------------------------------------

    SendMessage( hwndTT, TTM_ADDTOOL, 0 , cast(LPARAM, @ti) )

end sub



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 sense
Yah see
Yew hear
Yoh taste
Yow touch
Yoo smell
Yaw give
Yiw take
Ya male
Yeh female
Yih adult
Yay child
Yie baby
Yee least
Yau moderate
Yoi most
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
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 boiling
Ray gas
Rie flourescing 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/fishp/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 motions
Kah toward
Kew away
Koh weight
Kow size
Koo speed
Kaw quantity
Kiw temperture
Ka transparency
Keh sound
Kih hardness
Kay softness
Kie cost
Kee brightness
Kau length
Koi height
Guh depth
Gah flexability
Gew fragility
Goh ease
Gow wetness
Goo happy
Gaw sad
Giw angry
Ga forces
Geh magnetism
Gih electric
Gay radiation
Gie light
Gee energy
Gau front
Goi back
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 brother
Vaw sister
Viw relative
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 cry
Law talk
Liw eat
La drink
Leh chew
Lih sit
Lay stand
Lie walk
Lee run
Lau sleep
Loi wake
Thuh money
Thah buy
Thew sell
Thoh trade
Thow owe
Thoo pay
Thaw income
Thiw commerce
Tha interactive actions
Theh speak
Thih listen
Thay play
Thie attack
Thee lead
Thau follow
Thoi accompany
Buh zero
Bah one
Bew two
Boh three
Bow four
Boo five
Baw six
Biw seven
Ba eight
Beh nine
Bih ones
Bay tens
Bie hundreds
Bee bumpy
Bau smooth
Boi patterned
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 wheel
Maw language
Miw symbol
Ma read
Meh write
Mih math & logic
May add
Mie subtract
Mee multiply
Mau divide
Moi calculate
Nuh time
Nah past
New present
Noh future
Now second
Noo minute
Naw hour
Niw period
Na food
Neh grain
Nih meat
Nay fork
Nie knife
Nee spoon
Nau plate
Noi bowl
Duh body parts
Dah head
Dew eye
Doh ear
Dow nose
Doo mouth
Daw teeth
Diw hand
Da limb
Deh bottom
Dih foot
Day @#&|$
Die vagina
Dee boob
Dau joint
Doi skin
Tuh place
Tah up
Tew down
Toh left
Tow right
Too center
Taw over
Tiw under
Ta in
Teh on
Tih out
Tay around
Tie through/intersect
Tee against
Tau adjacent
Toi beside
Chuh manipulative actions
Chah lift
Chew lower
Choh drag
Chow grind
Choo squeeze
Chaw fill
Chiw empty
Cha start
Cheh stop
Chih finish
Chay repeat
Chie come
Chee go
Chau work
Choi rest
Juh wipe
Jah fix
Jew carry
Joh break
Jow join
Joo make
Jaw rotate
Jiw move
Ja hold
Jeh drop
Jih throw
Jay pull
Jie push
Jee pour
Jau tie
Joi hurry
Shuh question
Shah who
Shew what
Shoh why
Show when
Shoo where
Shaw which
Shiw how
Sha with
Sheh without
Shih here
Shay there
Shie alone
Shee along
Shau fire
Shoi smoke
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
Last edited by albert on Feb 11, 2019 18:12, edited 1 time in total.
counting_pine
Site Admin
Posts: 6087
Joined: Jul 05, 2005 17:32
Location: Manchester, Lancs

Re: Huh-Yuh Lanuage

Postby counting_pine » Feb 11, 2019 14:09

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

Re: Huh-Yuh Lanuage

Postby albert » Feb 11, 2019 17:42

@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..

Return to “Windows”

Who is online

Users browsing this forum: No registered users and 0 guests