Re: [WIN]Win32Lib: v50 : trap click in SIMPLE combo?

new topic     » goto parent     » topic index » view thread      » older message » newer message

Dan,
try the following code to see if if might suit...
--------------------------
include win32lib.ew
integer w,c,s

w = create(Window, "Test", 0, 0, 0, 500, 400,0)
s = create(StatusBar, "", w, 0, 0, 0, 0, 0)
c = create(Combo, "", w, 5, 5, 300, 100, 0)


procedure ee(atom msg, atom wparam, atom lparam)

    sequence t

    if msg = WM_PARENTNOTIFY then
        if wparam = WM_LBUTTONDOWN then
            t = "Left"
        elsif wparam = WM_RBUTTONDOWN then
            t = "Right"
        else
            t = sprintf("%d", wparam)
        end if
        setText(s, t)
    end if
end procedure
onEvent[c] = routine_id("ee")

addItem(c, "One")
addItem(c, "Two")

WinMain(w, 0)
----
Derek

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu