English
Forum

Done: CBN_SelChange by SubClassProc intercepting

 

Georg
Hovenbitzer
Hello together,

i sit time again on a trouble and come not further.
i'd gladly The Notification CBN_SelChange of/ one Combo Box in a SubClassProc intercepting.
To dato have I it always with the EasyVENT DLL made, would these but gladly omit.
No alternative is it this by User Messages ~WM_COMMAND To solve, I for To plenty rebuild should.
alternatively could one naturally a Loop basteln The to the leave of Waitinput checks whether The selection itself changed has.
me would but a direct Possibility rather.

If someone a Tipp had would I forward.
 
Viele Grüsse, Georg Hovenbitzer(Windows XP Pro, XProfan 11.2, Profan2Cpp 1.6a)
02/05/10  
 



You can the control unterbrechnungsfrei and sure with XPSE subclassen by:
//Native Subclassing
declare meinhandle.owp&,meinhandle&
cls
meinhandle&=create(...
meinhandle.owp&=setWindowLong(meinhandle&,gwl_wndProc,procaddr(meinhandle.wndProc,4))
waitinput
end

nProc meinhandle.wndProc

    Parameters wnd&,msg&,wp&,lp&
    global owp&

    if msg&=CBN_SelChange//wm_command

        ...

    endif

    return callWindowProc(owp&,wnd&,msg&,wp&,lp&)

endproc

or Mainwindow:  [...]  .
 
02/05/10  
 




Georg
Hovenbitzer
Hello iF,

many Thanks for speedy response.
I have it time attempts in reinem Profan nachzustellen, without success.

If I the code starte remaining everything hang and we must task fire.
What am I doing here wrong ?
 
P.s.: it fehlte FastMode so it's running, is unfortunately not The Solution.
I come not on The Notifikation ran.
 $H Messages.ph
 $H windows.ph
Declare FPArt&, OWProc&

Proc SelChange

    Parameters Wnd&, Msg&, wParam&, lParam&

    If Msg& = ~CBN_SelChange

        Print @GetText$(FPArt&)

    EndIf

    Return ~CallWindowProc(OWProc&,Wnd&,Msg&,wParam&,lParam&)

ENDPROC

@Set("FastMode",1)
Window Style 2 + 8 + 16 + 128 + 256 + 512
Window 0,0-1024,768
FPArt& = @Create("ChoiceBox",%hWnd,1,100,100,280,150)

WhileLoop 1, 10, 1

    @AddStrings(FPArt&,"Test " + @Str $(&Loop))

EndWhile

OWProc& = ~SetWindowLong(FPArt&,~GWL_WNDPROC,@ProcAddr(SelChange,4))

WhileNot %Key = 2

    WaitInput

EndWhile

End
 
Viele Grüsse, Georg Hovenbitzer(Windows XP Pro, XProfan 11.2, Profan2Cpp 1.6a)
02/05/10  
 




Rolf
Koch
have You on Set("Fastmode",1) staid?
 
02/05/10  
 




Georg
Hovenbitzer
is me too straight Aufgefallen, this fehlte.

but these unfortunately not The Solution, The Notification CBN_SelChange bewirkt unfortunately nothing.
someone yet a Tipp
 
Viele Grüsse, Georg Hovenbitzer(Windows XP Pro, XProfan 11.2, Profan2Cpp 1.6a)
02/05/10  
 



Georg Hovenbitzer, Beitrag=55989, Zeitpunkt=05.02.2010
Hello iF,

many Thanks for speedy response.
I have it time attempts in reinem Profan nachzustellen, without success.


I Have You have written down and profane and a Fastmode needed it (to that Happiness) neither.
 
02/05/10  
 




Georg
Hovenbitzer

Have The Solution found
who The MSDN correctly. reading can is clear in the benefit.
 $H Messages.ph
 $H windows.ph
Declare FPArt&, OWProc&

Proc SelChange

    Parameters Wnd&, Msg&, wParam&, lParam&

    If ((Msg& = ~WM_COMMAND) AND (@HiWord(wParam&) = ~CBN_SelChange))

        Locate 1,1
        Print @GetText$(FPArt&)

    EndIf

    Return ~CallWindowProc(OWProc&,Wnd&,Msg&,wParam&,lParam&)

ENDPROC

@Set("FastMode",1)
Window Style 2 + 8 + 16 + 128 + 256 + 512
Window 0,0-1024,768
FPArt& = @Create("ChoiceBox",%hWnd,1,100,100,280,150)

WhileLoop 1, 10, 1

    @AddStrings(FPArt&,"Test " + @Str $(&Loop))

EndWhile

OWProc& = ~SetWindowLong(FPArt&,~GWL_WNDPROC,@ProcAddr(SelChange,4))

WhileNot %Key = 2

    WaitInput

EndWhile

End
 
Viele Grüsse, Georg Hovenbitzer(Windows XP Pro, XProfan 11.2, Profan2Cpp 1.6a)
02/05/10  
 



you is already clear, that this code ProcAddr so uses, that the program absturzgefährtet is? make You but from Proc SelChange simply nProc SelChange, then is it 100% sure and You need then too none FastMode More.
 
02/05/10  
 




Detlef
Jagolski
so make I the!! Klappt always.
ElseIf SubClassMessage(DesignForm&, ~WM_COMMAND)

Select &sLParam

    CaseOf DlgChoiceBox1&

    If HiWord(&sWParam) = ~CBN_SELCHANGE

        SetMenuItem 5003
        Set("WinProc",0)

    EndIf

    CaseOf Dlg2ChoiceBox1&

    If HiWord(&sWParam) = ~CBN_SELCHANGE

        SetMenuItem 9002
        Set("WinProc",0)

    EndIf

EndSelect

 
XProfan X4, PRFellow, Profan2Cpp - Version 2.0c-pre5, Windows 11
02/05/10  
 




Georg
Hovenbitzer
there i was too slow
It's all right too without FastMode and SubProc.
 $H Messages.ph
 $H windows.ph
Declare FPArt&, OWProc&

SubClassProc

    If (@SubClassMessage(FPArt&,~WM_COMMAND) AND (@HiWord(&sWParam) = ~CBN_SelChange))

        Locate 1,1
        Print @GetText$(FPArt&)

    EndIf

ENDPROC

Window Style 2 + 8 + 16 + 128 + 256 + 512
Window 0,0-1024,768
FPArt& = @Create("ChoiceBox",%hWnd,1,100,100,280,150)

WhileLoop 1, 10, 1

    @AddStrings(FPArt&,"Test " + @Str $(&Loop))

EndWhile

SubClass FPArt&,1

WhileNot %Key = 2

    WaitInput

EndWhile

SubClass FPArt&,0
End
 
Viele Grüsse, Georg Hovenbitzer(Windows XP Pro, XProfan 11.2, Profan2Cpp 1.6a)
02/05/10  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

9.424 Views

Untitledvor 0 min.
Rainer Hoefs06/10/23
H.Brill10/05/20
Jörg Sellmeyer06/16/20
Andreas Koch01/03/12

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