English
Source / code snippets

strain Menu system - 4

 

CompileMarkSeparation
Source wurde am 15.07.2007 aus der MMJ-Quellcodesammlung (Dietmar Horn) in die Babyklappe auf XProfan.Com abgelegt:
Menü: System-Menü erweitern (2)
-Begin-----------------------------------------------------------------
-HeaderFiles---------------------------------------------------------
 $H Windows.ph
 $H Messages.ph
-Variables Declaration-----------------------------------------------
Declare Ende%, OldWndProc&, hButton%
-CallBack Routine----------------------------------------------------

Proc SystemMenu

    Parameters hWnd&, Message&, wParam&, lParam&

    If Message& = ~WM_SYSCOMMAND

        If wParam& = 5000

            @MessageBox(Test für CallBack, Über..., 64)

        EndIf

    EndIf

    Return ~CallWindowProc(OldWndProc&, hWnd&, Message&,
    wParam&, lParam&)

EndProc

-Main----------------------------------------------------------------
-Erweitertes MessageHandling abschalten----------------------------
Set(FastMode, 1)
-Fenster oeffnen und GUI aufbauen----------------------------------
Window 0, 0 - 640, 480
hButton% = @Create(Button, %hWnd, Ende, 10, 10, 100, 24)
-SystemMenu erweitern----------------------------------------------
~AppendMenu(~GetSystemMenu(%hWnd, 0), ~MFT_SEPARATOR, 0, 0)
~AppendMenu(~GetSystemMenu(%hWnd, 0), ~MFT_STRING, 5000,
Über...)
-ProgramMainRoutine mit CallBack umleiten auf eigene---------------
OldWndProc& = ~GetWindowLong(%hWnd, ~GWL_WNDPROC)
~SetWindowLong(%hWnd, ~GWL_WNDPROC, @ProcAddr(SystemMenu, 4))
-Dialog-Schleife---------------------------------------------------
Clear Ende%

WhileNot Ende%

    WaitInput

    If %Key = 2

        Ende% = 1

    ElseIf @Clicked(hButton%)

        Ende% = 1

    EndIf

EndWhile

-Urspruengliche ProgramMainRoutine wieder herstellen---------------
~SetWindowLong(%hWnd, ~GWL_WNDPROC, OldWndProc&)
-End-------------------------------------------------------------------
s4 href='./../../function-references/XProfan/end/'>End
 
07/16/07  
 



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

1.468 Views

Untitledvor 0 min.
H.Brill09/13/22
Andre Rohland03/12/18

Themeninformationen

this Topic has 1 subscriber:

unbekannt (1x)


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