English
Source / code snippets

Choicebox Editable Numerisch numbers only Digits

 

E.T.
I such to the Message for a editierbare ChoiceBox )3) , circa in this only Numerische Inputs to admit. Have now already everything on the head set, kanns but not any more find. i'm but so, as had I The already time somewhere had...

If someone these Message in the Schubkasten has, then Please I integrally endearing circa Preisgabe.

[offtopic]the would too time ne idea: an Messages-collection, because somehow standing everywhere only The Half, but never the, what seek... [/offtopic]


Edit: Solution:
Michael Dell
A small example:
Def sEditNum(1) External("USER32","SetWindowLongA",&(1),-16,(External("USER32","GetWindowLongA",&(1),-16) | $2000))
Def gWindow(1)  External("USER32.DLL","GetWindow",&(1),5)   &GW_CHILD = 5
Declare GL_ChB01&,GL_ChBoxChild01&
Cls
GL_ChB01&        = Control("ComboBox","",$5401024E,20,20,360,240,%HWnd,$9100,%HInstance)  Editable ChoiceBox
GL_ChBoxChild01& = gWindow(GL_ChB01&)           Child-Edit-lever the ChoiceBox fetch!
sEditNum(GL_ChBoxChild01&)   Child-Edit on only-numbers-input settle.

While 1

    WaitInput

EndWhile

End


iF
ES_NUMBER
 
Grüße aus Sachsen... Mario
WinXP, Win7 (64 Bit),Win8(.1),Win10, Win 11, Profan 6 - X4, XPSE, und 'nen schwarzes, blinkendes Dingens, wo ich das alles reinschütte...
12/08/08  
 



Message or Style?

me helps mostly Konstantinopel  [...]  .
 
12/08/08  
 




Detlef
Jagolski
From Thomas Hölzer and Andreas Miethe.
 $H C:WINDOWS.PH
 $H C:MESSAGES.PH
 $P+
Set("ErrorLevel",0)
Def SetEditNumeric(1) ~SetWindowLong(&(1),~GWL_STYLE, ~GetWindowLong(&(1),~GWL_STYLE) | $2002)
Struct ComboBoxInfo = cbSize&,rcItem#(16),rcButton#(16),stateButton&,hwndCombo&,hwndItem&,hwndList&
Declare appexit%
Declare ChoiceBox1&
Declare ComboBoxInfo#
Declare Edithandle&

Proc EditComboBox

    Parameters Handle&
    Dim ComboBoxInfo#,ComboBoxInfo
    ComboBoxInfo#.cbSize& = SizeOf(ComboBoxInfo#)
    ~GetComboBoxInfo(Handle&,ComboBoxInfo#)
    var ComboBoxEdit& = ComboBoxInfo#.hwndItem&
    Dispose ComboBoxInfo#
    Return ComboBoxEdit&

ENDPROC

Set("TrueColor",1)
Window Style $003F
Window Title "Test"
Window %maxX + 5,114 - 498,415
Cls ~GetSysColor(15)
ChoiceBox1&=Create("ChoiceBox",%hwnd,3,64,46,145,120)
Edithandle& = EditComboBox(ChoiceBox1&)
SetEditNumeric(Edithandle&)
SetWindowPos %hwnd = 207,114 - 498,415;0

WhileNot appexit%

    WaitInput

    If %key = 2

        Let appexit%=1

    ElseIf GetFocus(ChoiceBox1&)

    ElseIf %key = 4

        Fenstergröße

    ElseIf %key = 5

        Help

    EndIf

EndWhile


Greeting
Detlef
 
XProfan X4, PRFellow, Profan2Cpp - Version 2.0c-pre5, Windows 11
12/08/08  
 




Michael
Dell
A small example:
Def sEditNum(1) External("USER32","SetWindowLongA",&(1),-16,(External("USER32","GetWindowLongA",&(1),-16) | $2000))
Def gWindow(1)  External("USER32.DLL","GetWindow",&(1),5)   &GW_CHILD = 5
Declare GL_ChB01&,GL_ChBoxChild01&
Cls
GL_ChB01&        = Control("ComboBox","",$5401024E,20,20,360,240,%HWnd,$9100,%HInstance)  Editable ChoiceBox
GL_ChBoxChild01& = gWindow(GL_ChB01&)           Child-Edit-lever the ChoiceBox fetch!
sEditNum(GL_ChBoxChild01&)   Child-Edit on only-numbers-input settle.

While 1

    WaitInput

EndWhile

End
 
Salu Michael...

Hab zwar krumme Fieß awer dofir e' ecklich Gsicht! 
12/08/08  
 



ES_NUMBER
 
12/08/08  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

9.091 Views

Untitledvor 0 min.
Walter05/08/21
E.T.10/31/19
Rainer Hoefs07/02/19
Manfred Barei06/20/17
More...

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie