| |
|
|
 | good skeleton for a TrayAPP? Funktionierts everywhere?
{$cleq}
const appTitle=TrayApp
//messages
const m_base=wm_user+4096
const m_tray_TrackMenu_exitApp=m_base+0
//defaults
const d_hwndSizeX=300
const d_hwndSizeY=450
long hwnd.showMode=1
windowTitle apptitle
windowStyle 2 | 4 | 8 | 16 | 512 | 1024
window maxx,maxy - 0,0
hwnd.showWindow(false)
moveWindow(hwnd,(maxx/2-d_hwndSizeX/2),(maxy*0.4-d_hwndSizeY/2),d_hwndSizeX,d_hwndSizeY,false)
long tray.iconH=tray.init()
userMessages wm_close
do {
select TrayIcon(msg,1)
caseof wm_lButtonDown,wm_lButtonDblClk : hwnd.showWindow(true-hwnd.showMode)
caseof wm_rButtonDown
select tray.trackMenu()
caseof m_tray_TrackMenu_exitApp : break
endSelect
endSelect
select uMessage
caseof wm_close : hwnd.showWindow(false)
endSelect
waitinput
}
tray.close(tray.iconH)
end
tray.init{
long h=create(hIcon,A)
trayIcon(add,hWnd,1,h,appTitle)
return h
}
tray.close(long h){
int bVal=trayIcon(delete,hWnd,1)
deleteObject h
return bVal
}
tray.trackMenu{
createMenu
appendMenu m_tray_TrackMenu_exitApp,terminate
setActiveWindow(hWnd)
int bVal=trackMenu()
setMenuitem 0
return bVal
}
hwnd.showWindow(int fashion){
ifnot hwnd.showMode==fashion {
showWindow(hWnd,fashion)
}
if fashion {
setForeGroundWindow(hwnd)
setActiveWindow(hwnd)
}
hwnd.showMode=fashion
return true
}
|
 |
|
| |
|
|
|
 Jac de Lad | |
|
| Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE) Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP | 12/25/07 ▲ |
|
|
|
|
 Rolf Koch | Jepp Vista likes it apparently too very  |
|
|
| |
|
|
|
 Michael Wodrich | this is Yes gemogelt - single- and Double click together...  |
|
|
| Programmieren, das spannendste Detektivspiel der Welt. | 12/26/07 ▲ |
|
|
|
|
 | Gib To, it reacted perfect. so often one with left clicking - so often becomes hwndAnzeige correctly getoggelt. 
circa Einzelklick correctly abzufangen could one it How MS make - good example is the sndvol32.exe. quick sees to the there waited becomes. (for what it x Lösungsansätze gives) |
|
|
| |
|
|
|
 Michael Wodrich | sound already in of my question on Roland on ...whether we the self make should.
Beautiful would one sauberes Double click-incident.
Best wishes Michael Wodrich
Gib To, it reacted perfect.
mandatory I the extra allude?  |
|
|
| Programmieren, das spannendste Detektivspiel der Welt. | 12/26/07 ▲ |
|
|
|
|
 | this is Yes the joke, such one sauberes Doppelklickereignis get You Yes! its hold you give over whether and How You on the einfachen Click respond. it would indeed pity if the simple Click first to term the Doppelklickzeit gemeldet would. |
|
|
| |
|
|
|
 | well, then can the skeleton Perhaps yet with a couple Vervollständigungen close.
Verbesserungsvorschläge? |
|
|
| |
|
|
|
 | hm 2x loaded is ca. 50 time To little, click You means here [...] and say obs working... |
|
|
| |
|
|
|
 Christian Eichler | iF
hm 2x loaded is ca. 50 time To little, click You means here [...]  and say obs working...
shining correct To funktionnieren (Win XP SP2). Linksklick becomes one Window unzipped, Rechtsklick one Menu  |
|
|
| Debian Lenny, Intel Celeron 2,8 Ghz, 768 MB Ram && Win XP Pro, Intel C2D 1,66Ghz, 2 GB Ram ... PROFAN² 6.6 | 12/27/07 ▲ |
|
|
|
|
 Jörg Sellmeyer | Christian Eichler
iFhm 2x loaded is ca. 50 time To little, click You means here [...]  and say obs working... shining correct To funktionnieren (Win XP SP2). Linksklick becomes one Window unzipped, Rechtsklick one Menu 
Dito |
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ...  | 12/27/07 ▲ |
|
|
|
|
 | Have no Linux with ui here - what says wine? |
|
|
| |
|
|