English
Forum

In a ExtMenu through User Message the menuitem detect

 

CB
Hello, love Profaner!
I steh time again on. I need in my Program order Automatisierung verschiedener Edit-Controls The request same over User Messages. the funkioniert too perfect. mere can I, since I The User Messages in my Hauptschleife installed have, my and @ GetFocus not any more over MenuItem(n) inquire.
therefore my question: (How) can I the chosen Menuitem over User Messages detect? has of/ one of you a Solution parat?
whom relevanten part of my DLL finds your in the Menudll.dll.
Sincerely,
Christian

2 kB
Hochgeladen:01/02/05
Downloadcounter185
Download
 
XProfan 8/9.1, Win XP, AMD 64/3200
01/02/05  
 




Rolf
Koch
Hi,
only one suggestion:
what hälst You of it simply time by Print
%message or %lastmessage the Result view, if you on one Menuitem click?

Rolf
 
01/02/05  
 




Frank
Abbing
Hi.

my Proposals. API:

GetWindowLong() with GWL_ID Flag
or
GetClassLong() with GCL_MENUNAMEFlag

not tested...
 
01/02/05  
 




CB
@ Rolf: Have I in the interim probiert.
with %(Last)Message come I unfortunately not further. the result is always (alternately) 32, 312 or 512, but without Connex to that each chosen Menupunkt.

@Frank: i think, with GetClassLong() could it klappen, mere were my Experimente diesbezüglich not successful, moreover would I a morsel of Nachhilfeunterricht need... :?:

Sincerely,
Christian
 
XProfan 8/9.1, Win XP, AMD 64/3200
01/03/05  
 




Frank
Abbing
Hi,

only with your Dll can I not testing.
best posting You too whom dazugehörige code (quiet a Testcode), How You The thing yet attempt. then can you rather help.
 
01/03/05  
 




Jörg
Sellmeyer
Hello Christian,
have You Perhaps $0111 as usermessage declared?
then helps you the evtl. moreover:

Declare menuitem%
Cls
User Messages $0111wm_command
Declare end%
WhileNot end%
WaitInput
If %mousepressed=2
TrackMenu %mousex,%mousey
CreateMenu
AppendMenu 100,Test 1
AppendMenu 101,Test 2
menuitem%=&uwparam
print menuitem%,%menuitem
EndIf
IF Equ(%key,2)
Let end%=1
EndIf
Wend

Greeting
Jörg
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
01/03/05  
 




CB
Anm.: ought to these Message already time present his - i'm just to one Backspace rausgeflogen...

Hi, to 2 Meet heftiger Fehlersuche login I again back. there were another couple others crude dogs in the end. the Extmenu goes unfortunately yet always not.

@Jörg:
User Messages $0111
was already declared. only Problem with dBase one from of my DLL geladenes and @ GetFocus to that Time the Window-Creation one. have then with TrackMenu %mousex,%mousey experimentiert, too thereby come always the same values of 32, 312 or 512 out.

@Frank:
i don't know right, whether I the someone zumuten can! presently stand I with round 9000 Lines code, ca 1000 variables, some 1000 Registry-Einträgen, 2 (except for The Language identischen) DLLs, also the program-Setup include, several Unterverzeichnissen incl. Test-Ini-Files etc.
whom code have I of course in the own interest relatively well documents, but hold for my own needs.

presently happens at Click on a Menueintrag either quite nothing or I land somewhere in the Hauptschleife, where I none hinmöchte.
i think, i'll first time whom code fehlerbereinigen, before I somebody Please, itself this hoisted anzutun! I have too another ältere Version, The only The Window and the Menu contains - the has then yet well functions. Perhaps find so did i in the comparison the Files whom Error. I had hold hoped, that of/ one from the Community already time with User Messages in a and @ GetFocus experimentiert has.

Sincerely,
Christian
 
XProfan 8/9.1, Win XP, AMD 64/3200
01/05/05  
 




Frank
Abbing
Hi,

[quote:2799a393bf]@Frank:
i don't know right, whether I the someone zumuten can! presently stand I with round 9000 Lines code, ca 1000 variables, some 1000 Registry-Einträgen, 2 (except for The Language identischen) DLLs, also the program-Setup include, several Unterverzeichnissen incl. Test-Ini-Files etc.
whom code have I of course in the own interest relatively well documents, but hold for my own needs.

presently happens at Click on a Menueintrag either quite nothing or I land somewhere in the Hauptschleife, where I none hinmöchte.
i think, i'll first time whom code fehlerbereinigen, before I somebody Please, itself this hoisted anzutun! I have too another ältere Version, The only The Window and the Menu contains - the has then yet well functions. Perhaps find so did i in the comparison the Files whom Error. I had hold hoped, that of/ one from the Community already time with User Messages in a and @ GetFocus experimentiert has.
[/quote:2799a393bf]
in the drop prepares You best a short Testcode, the your trouble darstellt. apiece kürzer, so rather can you help.
 
01/05/05  
 



Hello Christian...

so?
CompileMarkSeparation
WINDOWTITLE "Usermessage und Menü"
WINDOWSTYLE 31
WINDOW 0,0-640,440
POPUP "&Menü"
Appendmenu 101,"&Test"
Appendmenu 102,"&Test 2"
Appendmenu 111,"&beenden"
USERMESSAGES  $0111

While 0=0

    Getmessage

    IF @AND(%UMESSAGE=$0111,&UWPARAM=101)

        @SENDMESSAGE(%HWND,$0111,0,0) Menuitem löschen
        @Messagebox("Test wurde gedrückt!","Menü wurde gewählt",64)

    ElseIF @AND(%UMESSAGE=$0111,&UWPARAM=102)

        @SENDMESSAGE(%HWND,$0111,0,0) Menuitem löschen
        @Messagebox("Test 2 wurde gedrückt!","Menü wurde gewählt",64)

    ElseIF @AND(%UMESSAGE=$0111,&UWPARAM=111)

        @SENDMESSAGE(%HWND,$0111,0,0) Menuitem löschen
        END

    ENDIF

wend


without Gewähr!

with %MENUITEM, %LASTMESSAGE or %MESSAGE can you not weiterkommen - Why standing really already in the Profanhilfe.
 
01/05/05  
 



Hello Christian...

with the usage of User Messages would I your place with one so umfangreichen code very softly-softly - particularly if You not genauestens know, what You there do.
The User Message WM_COMMAND=$0111 affects not only on Menüs, separate too possible on that Closing of Dialogen and the Closing the Mainwindow from, there %MENUITEM not on -2 staid becomes.
I personally can z.B. not genauestens say, for what The Message WM_COMMAND everything Responsible is - and apparently can the eachone, the you not help on could, neither.

means: look very to, whether really everything in your Program so runs, How You you the pictured have, otherwise Gibts possible very angry Überraschungen.
 
01/05/05  
 




Jörg
Sellmeyer
Hi,
-thereby come always the same values of 32, 312 or 512 out.
Womit erhälst You The values?
with %message, %key or &umessage?
Related to the Trackmenu isn't definitive, separate The Deklaration of menuitem% (Variable! no Systemvariable)
and the Auswertung of &umessage.
I use Prfellow and there is $0111 as User Message declared, circa Controls abzufragen - z. B. Buttons should first at release react.
by me functions it with &umessage at least with generierten Menüs.
whether it with Extmenu functions, white I do not.
Greeting
Jörg
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
01/05/05  
 




CB
so, love people!
i was in the interim neither dormant and I me time the to bust taken, what Andreas me there so from the Ärmel shook has - GENIAL - the goes really with my and @ GetFocus!

as Thank you for all Beteiligten have I the Konstrukt time a morsel of aufgepeppt and on The speedy another couple small Überraschungen installed. Schauts you simply at times.
and schaut too time in the Menu under About... to!

@Andreas: For this Gibts temporary a golden Laterne, because You me whom lane so beautiful beleuchtet have, and if I time dazukomme, naturally a entry ebendort. (become already see ,I so my)

@Jörg: I habs always only with my Extmenu probiert and there ists in the form unfortunately not gone. power nothing - nevertheless thanks!

another Note: in the Zuge of my Basteleien for you have I mean Original-DLL something minimizes (Setup-Program rausgenommen etc.), the went yet, as i dieselbe DLL on Menu_DE.dll umbenannt have, was Extmenu not any more ladbar. i see not so integrally, wieso. therefore have I The abgespeckte Original-DLL taken.

over again cordial Thanks all
Christian

37 kB
Hochgeladen:01/06/05
Downloadcounter104
Download
 
XProfan 8/9.1, Win XP, AMD 64/3200
01/05/05  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

8.156 Views

Untitledvor 0 min.
Manfred Barei11/08/21
Georg Teles05/07/14
maroro04/20/14

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