English
Source / code snippets

Menu Programmdesign

 

Normann
Strübli
:?: :?: :?:

How important is Eurer opinion to the good Appearance one Program?
clear, it should simply To valet and funktionell his, but power it with little more Pep not mismatched More Fun one Program To valet?
or rewards the hoisted not and is unnütze Spielerei?

so my I now not any ausgefallenen Fensterformen or bunten Graphics in the background.
crept ought to it already his and the users one gewohntes Image afford,
finally should it itself Yes quick zurechtfinden.

as mögliches example Have I time one Popupmenü herangezogen.
should so like a Menu in XP-Style looks - naja.
load you the example still time down, then can the evtl. rather
understand

one möge me forgive the the code not really well auskommentiert is, is Yes only to that try.
Also might Andreas Miethe The Grundstruktur famous vorkommen, The Have I from his XPRFDEMO geklaut

i will the example too yet work up and plainer make because it are missing yet items like a Subpopupmenü or one plainer Separator. Verbesserungsvorschläge are too gerngesehen
Evtl. pack I the whole then in a Include... but first ask
whether the hoisted rewards.

on the side would my interests whether the example each runs, can
it by me only XP testing.

Achja, without XProfan runs there unfortunately nothing

writes me Your opinion
 
06/05/04  
 




Rolf
Koch
Hi Normann,
utterly GEIL!
I personally bevorzuge such grafischen Spielerein. Perhaps has one it the Roc already angemerkt
i'm stunned, finally a basis, which The altbackenen Menüs verwirft - The find I, are in the meantime something like of tedious.
SUPER
unfortunately Have so did i XP and there's Yes logical, that it How with you runs.
NORMANN MACH WEITER DAMIT
 
06/05/04  
 




Ragnar
Rehbein
hi

have time a short Test under w2k and win98 made.
w2k -> everything ok very How with XP
win98 -> functions fundamentally, however go The colours the row in the the mouse befindet not highlighted. only The font becomes white.
The icons having first any The colour How the highlighted icon.
with einmaligem herüberfahren becomes tappt im dunkeln then heller and changes itself then only yet if The mouse drüberfährt.

r.r.
 
06/09/04  
 



this is super!!! The small Symbols left are aba a couple pixel To high, or? I mean by me are The not center.

iF
 
06/09/04  
 




Dietmar
Horn
Hi,

have short under ME tested.

Result: -> How with r.r. under win98

Dietmar
 
Multimedia für Jugendliche und junge Erwachsene - MMJ Hoyerswerda e.V.  [...] 

Windows 95 bis Windows 7
Profan² 6.6 bis XProfan X2 mit XPSE

Das große XProfan-Lehrbuch:  [...] 
06/10/04  
 




Normann
Strübli
thanks first, I Have there well another little To do...

I hope I find The Time on the WE and will be the whole time
complete revise should Yes later too simply einzubinden his

whom Error with the colours werd I then well too yet find
i think the whole is a Completed: the transparency
 
06/10/04  
 




Frank
Abbing
Hi,

means I find, the sees yet somehow wrong from (see Screenshot).

- The weiße Hintergrundsfarbe is correct apparently not.
- left next to whom Icons is too much leerer Space.
- with markierte Einträgen is the Text not visible.
- Entries, The Schonmal markiert were, go left 1-2 Pixel breiter
 
06/11/04  
 




Normann
Strübli
[quote:f4279d66e3] means I find, the sees yet somehow wrong from (see Screenshot). [/quote:f4279d66e3]
Oh, you have Yes so right...
[quote:f4279d66e3] The weiße Hintergrundsfarbe is correct apparently not. [/quote:f4279d66e3]
still, white is really correctly.. your others Menüs müssten still too
so his or? can Yes time in your Systemsteuerung The colour for Menüs adjust then is the too differently
[quote:f4279d66e3] left next to whom Icons is too much leerer Space. [/quote:f4279d66e3]
Yep! , missing the image. ought to really so looks How under.
[quote:f4279d66e3] with markierte Einträgen is the Text not visible. [/quote:f4279d66e3]
the besagte Completed: the transparency.
[quote:f4279d66e3] Entries, The Schonmal markiert were, go left 1-2 Pixel breiter[/quote:f4279d66e3]
impudence!
but thanks.

How already erwähnt I will me bemühen (the sound always somehow negative ) the whole on the weekend To bereinigen and a reasonable Include To Basteln also enough documents is.
 
06/11/04  
 




Normann
Strübli
Hilfäää,

mannomann is the tricky for a How me!
I try now since hours through the API-function
GetMenuItemInfo The Parameter one selected Menüpunktes To
to determine but the function supply me always 0 back.

but time slow to that understand...

Erstmal structure create...
CompileMarkSeparation
the was Schonmal beautiful simply...
means moreover:

Calling the function:

BOOL WINAPI GetMenuItemInfo(
HMENU hMenu,
UINT uItem,
BOOL fByPosition,
LPMENUITEMINFO lpmii
);

The function expects as first Parameter the lever the Menüs
and as second The ID. The Dritte Parameter gives only on whether it itself with
the second Parameter circa a Positions-ID the Menüeintrages or a
Menu ID deal.

means Have I the following made:
WM_Menuselect becomes gesendet if the users one entry selecting has.
The Own structure Itemselect contains only the lever the Menüs
and the chosen entry.
CompileMarkSeparation
...

IF Message& = ~WM_MENUSELECT

    ItemSelect#.Hmenu& = lParam&                 Handle des gewählten Menüs
    ItemSelect#.uItem& = LOWORD(wParam&)  ID des Eintrages
    Return 0

Endi
...

so now know I the lever the Menüs and the ID.
theoretical can I now means The function Call.
CompileMarkSeparation
~GetMenuItemInfo(ItemSelect#.Hmenu&,ItemSelect#.uItem&,0,MenuItemInfo#)

now gives me The function though only one nüllchen back

hope time I Have not To tricky and almost declared, but you are
Yes any integrally beautiful helle
 
06/11/04  
 




Normann
Strübli
OK, then we go the time differently on
means now VOLL KONKRET with mini example.

The function GetMenuItemInfo is weder in of my API-BIBLE still in
my loved Petzold documents, though tappt im dunkeln already since Win95
present is

Yes need because no human these überaus notwendige function???


CompileMarkSeparation
Header-Dateien
 $H windows.ph
 $H structs.ph
Struct MenuItemInfo = ~TMenuItemInfoA
Struktur sieht so aus:
cbSize%, fMask%, fType%, fState%, wID%, hSubMenu&, hbmpChecked&, hbmpUnchecked&, dwItemData&, dwTypeData&, cch%
Declare MenuItemInfo#
Declare hmenu&,Text$,Retval&
DIM MenuItemInfo#,MenuItemInfo
CLS
PopUp "&Datei"                Erstmal Menü erstellen
AppendMenu 100,"irgendwas"
AppendMenu 101,"irgendwie"
hmenu& = ~Getmenu(%hwnd)      her mit dem Menü-Handle
So zwischendurch mal was aus ner VB-Hilfe was den Aufruf von Getmenuiteminfo anbelangt:
Funktions Parameter:
hMenu
Erwartet den Handle eines Existierenden Menüs. (also hmenu&)
uItem
Erwartet einen ID der den Menüeintrag Identifiziert. Dies kann ein Positions-ID oder ein Menü-ID sein,
je nach dem was in "fByPosition" angegeben wird. (also z.B. 100)
fByPosition
Wird hier ein wert "ungleich 0" angegeben so erwartet die Funktion bei "uItem" den Positions-ID des
Menüeintrages, andernfalls muss bei "uItem" der Menü-ID angegeben werden. (also hier 1)
lpmii
Erwartet eine  MENUITEMINFO-Struktur die voreingestellt ist um die Informationen zu Empfangen.
Zu diesem Zweck müssen die "cbSize, fMask, dwTypeData und cch" Optionen der Struktur gesetzt sein
um erfolgreich die Informationen zu ermitteln. (also die Struktur MenuitemInfo#)
Also erstmal cbSize, fMask, dwTypeData und cch mit Werten bestücken:
Text$ = @space$(256)
MenuitemInfo#.cbSize% = @SizeOf(Menuiteminfo#)  Größe der Struktur
MenuitemInfo#.fMask% = ~MIIM_STATE | ~MIIM_TYPE Das was ich an "Info" haben will
MenuitemInfo#.dwTypeData& = @addr(Text$)        Hier bin ich mir nicht sicher wird hier die Adresse der Variablen
erwartet???
MenuitemInfo#.cch% = 256                        Länge des Menü-Item textes
SO JETZT SOLLTE ES DOCH KLAPPEN !?
RETVAL& = ~GetMenuItemInfo(Hmenu&,100,1,Menuiteminfo#)
Print "GetmenuitemInfo Returns:" ,RetVal&

If Retval& = 0

    Print "War wieder nix!"

else

    Print "Ich liebe Dich!"

endif

waitinput
 
06/13/04  
 




Andreas
Miethe


One small Why stay ?
CompileMarkSeparation
 $H windows.ph
 $H structs.ph
Struct MenuItemInfo = cbSize&, fMask&, fType&, fState&, wID&, hSubMenu&, hbmpChecked&, hbmpUnchecked&, dwItemData&, dwTypeData&, cch&
Declare MenuItemInfo#
Declare hmenu&,Text$,Retval&
DIM MenuItemInfo#,MenuItemInfo
CLS
PopUp "&Datei"                Erstmal Menü erstellen
AppendMenu 100,"irgendwas"
AppendMenu 101,"irgendwie"
hmenu& = ~Getmenu(%hwnd)      her mit dem Menü-Handle
Text$ = @space$(256)
MenuitemInfo#.cbSize& = SizeOf(Menuiteminfo#)
MenuitemInfo#.fMask& = ~MIIM_STATE | ~MIIM_TYPE
MenuitemInfo#.fType& = ~MFT_STRING
MenuitemInfo#.dwTypeData& = addr(Text$)
MenuitemInfo#.cch& = 256Buffer-Groesse für Text$
RETVAL& = ~GetMenuItemInfo(Hmenu&,100,0,Menuiteminfo#)
Print "GetmenuitemInfo Returns:" ,RetVal&

If Retval& = 0

    Print "War wieder nix!"

else

    Print "Ich liebe mich!"
    Print Trim$(Text$)

endif

waitinput
 
Gruss
Andreas
________ ________ ________ ________ _
Profan 3.3 - XProfanX2
Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit
ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher
Homepage :  [...] 
06/13/04  
 




Normann
Strübli
Arrghh!

No, what about me dope Have me always on the structure in the windows.ph leave!

but the only Difference is still the in the Headerdatei partly integer instead of longint. stand

but in the Profan Help standing still:[quote:89b0dfcc1a] Integervariablen can in a 32-bit-system The equal values How Longint-variables having [/quote:89b0dfcc1a]
means Why working the lest?
is the one Error in the windows.ph?

too only again so to that understanding...

On jedenfall Andreas I THANK YOU DIR!!!

 
06/13/04  
 




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

26.530 Views

Untitledvor 0 min.
Gast.081508/25/24
Thomas Freier01/30/24
RudiB.04/18/21
Manfred Barei03/28/20
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