| |
|
|
 Georg Teles | Nabend,
(Ohje hatte es im Bug-Bereich des Forums posté avant einer Weile, wurde anscheinend pas comme récente gekennzeichnet lol)
tut mir leid, dass je störe, mais möglicherweise gibt es ici une ?
un Beispielcode:

si cela Icon-Handle positiv transfert wird, ist cela Ergebnis comment erwartet (menu im Bild à gauche trop voyons).
mais si je cela menu im Standard-Stil behalten voudrais (Windows standard) muss je lt. Beschreibung cela Icon-Handle négative transfert. eh bien gibt es 2 Probleme comment on im Bild à droite sieht: cela Icon bleibt dans qui Taille de 32x32 Pixel, aussi si je Single-Icônes avec 16x16 px einsetze (cela MenuIconSize hilft aussi pas).
l'autre Problem ist qui Hintergrundfarbe des Icônes beim Fokus, vous bleibt sais.
Bug ou bien habe je quoi überlesen ? 
salut |
|
|
| |
|
|
|
 RGH | qui Set("Menu..."...)-Funkltion bleibt ici sans Funktion, là es sich oui eh bien pas um un User-Drawn-menu handelt. alors wird cela Icon dans qui Taille angezeigt, dans qui es vorliegt. qui Standardgröße de Icônes ist eh bien la fois 32 x 32 Pixel. si Du zum Beispiel qui interne Toolbar-Bitmap benutzt, la hâte Du qui 16 x 16 Pixel grand Icônes:
CLS
var hBmp& = create(«PCSI», 0, "TOOLBAR")
var hIL& = Créer("ImageList", 16, 16, hBmp&, rgb(192, 192, 192))
DeleteObject hBmp&
Déclarer ico&
ico& = ImageList("GetIcon", hIL&, 4)
PopUp "&Datei"
AppendMenu 100,"&Laden",-ico&
Tandis que 1
Waitinput
Endwhile
deleteobject ico&
qui Hintergrundfarbe beim Concentrer (plutôt cela Hervorheben des gewählten Menüpunktes) wird de Windows vorgenommen. là habe je aucun Aktien tour!
Salut Roland |
|
|
| Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4 | 13.04.2016 ▲ |
|
|
|
|
 Georg Teles | Verstehe, avec qui Hintergrundfarbe peut sich rien tour changement - habe seulement un Beispiel dans Visual Basic gesehen, wohin es mittels Callback geregelt wurde Stichworte MEASUREITEMSTRUCT [...] et DRAWITEMSTRUCT [...] alors aussi rien d'autre comme un Ownerdraw, ensuite schaue je cela genauer la fois à ...
chez qui Taille voulais aufzeigen, dass cela geladene Icon (Single-Icon 16x16 px) trop 32x32 px skaliert wird (chez Übergabe négative à AppendMenu), cela verstehe je pas 
bof bien, ensuite sommes qui ImageListen tour, cet habe je nie benutzt 
Grüße |
|
|
| |
|
|
|
 RGH | Es wird chez create("hIcon",...) avec Iconnamen qui Windows-API LoadIcon benutzt, qui Icônes grundsätzlich dans qui Standardgröße 32 x 32 invite.
chez OwnerDrawn-Menüs (avec positivem Iconhandle) scaliere je qui Icônes gemäß qui eingestellten Taille. voilà ensuite aussi qui Hintergrundfarben possible.
Salut Roland |
|
|
| XProfan X3Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4 | 14.04.2016 ▲ |
|
|
|
|
 Georg Teles | Aaah vielen Dank !
avec Owner-Draw ist alles bien sûr, wusste pas, dass Du chez hIcon standardmäßig dans qui Taille de 32 x 32 lädtst, c'est eh bien bien sûr 
Grüße |
|
|
| |
|
|