Prev: How to disable touchscreen(mouse) in WinCE?
Next: Activate BT on an iPaq / WM2005 in Native code?
From: Dave on 27 Jul 2007 08:38 Hi, Environment: Smartphone 5.0, VIsual Studio 2005 I'm adding a notificaiton icon like this: ------------------------------------------------------------------- SHNOTIFICATIONDATA sn = {0}; sn.cbStruct = sizeof(sn); sn.dwID = 1; sn.npPriority = SHNP_ICONIC; sn.csDuration = -1; sn.hicon = LoadIcon(MAKEINTRESOURCE(IDR_MAINFRAME)); sn.clsid = CLSID_SHNAPI_MyApp; sn.hwndSink = m_pMainWnd->m_hWnd; //Add the notification to the tray LRESULT res = SHNotificationAdd(&sn); if ( res != ERROR_SUCCESS ) { printk("Can't add icon"); } ------------------------------------------------------------------- In my dialog I have tried every imaginable way I can think of getting a mesage handler to be called when the icon is clicked or dismissed. None of the ON_NOTIFY or ON_MESSAGE methods seem to work. What I'm aiming to acheive is for the icon not to go away.until I remove it when I shutdown the app. As the icon currenltly disappears when clicked, I want to pop it back again when it's clicked (or dismissed). I'd also like to prevent a notification menu appearing at the bottom of the screen. Help warmly appreciated! Dave dave_AT_seafaretech_DOT_co_DOT_uk
From: Uncle Marvo on 27 Jul 2007 09:20 In reply to Dave (dave(a)seafaretech.co.uk) who wrote this in 1185539888.767573.206690(a)g4g2000hsf.googlegroups.com, I, Marvo, say : > In my dialog I have tried every imaginable way I can think of getting > a mesage handler to be called when the icon is clicked or dismissed. > None of the ON_NOTIFY or ON_MESSAGE methods seem to work. > http://msdn2.microsoft.com/en-US/library/aa458046.aspx
From: Dave on 27 Jul 2007 09:25 On 27 Jul, 14:20, "Uncle Marvo" <pau...(a)deletethisbitfortescue.org.uk> wrote: > In reply to Dave (d...(a)seafaretech.co.uk) who wrote this in > 1185539888.767573.206...(a)g4g2000hsf.googlegroups.com, I, Marvo, say : > > > In my dialog I have tried every imaginable way I can think of getting > > a mesage handler to be called when the icon is clicked or dismissed. > > None of the ON_NOTIFY or ON_MESSAGE methods seem to work. > > http://msdn2.microsoft.com/en-US/library/aa458046.aspx Thanks, but I don't want to use the IUknown mecahnism in this app, I just want the WM_NOTIFY interception to work. Dave
From: " ctacke/>" on 27 Jul 2007 10:41 So you're main window is not getting any message you're saying? Have you tried using a MessageWindow and passing that hWnd to the API? -- Chris Tacke, Embedded MVP OpenNETCF Consulting Managed Code in an Embedded World www.OpenNETCF.com "Dave" <dave(a)seafaretech.co.uk> wrote in message news:1185539888.767573.206690(a)g4g2000hsf.googlegroups.com... > Hi, > > Environment: Smartphone 5.0, VIsual Studio 2005 > > I'm adding a notificaiton icon like this: > > ------------------------------------------------------------------- > SHNOTIFICATIONDATA sn = {0}; > > sn.cbStruct = sizeof(sn); > sn.dwID = 1; > sn.npPriority = SHNP_ICONIC; > sn.csDuration = -1; > sn.hicon = LoadIcon(MAKEINTRESOURCE(IDR_MAINFRAME)); > sn.clsid = CLSID_SHNAPI_MyApp; > sn.hwndSink = m_pMainWnd->m_hWnd; > > //Add the notification to the tray > LRESULT res = SHNotificationAdd(&sn); > if ( res != ERROR_SUCCESS ) > { > printk("Can't add icon"); > } > ------------------------------------------------------------------- > > In my dialog I have tried every imaginable way I can think of getting > a mesage handler to be called when the icon is clicked or dismissed. > None of the ON_NOTIFY or ON_MESSAGE methods seem to work. > > What I'm aiming to acheive is for the icon not to go away.until I > remove it when I shutdown the app. As the icon currenltly disappears > when clicked, I want to pop it back again when it's clicked (or > dismissed). > > I'd also like to prevent a notification menu appearing at the bottom > of the screen. > > Help warmly appreciated! > > Dave > > dave_AT_seafaretech_DOT_co_DOT_uk >
|
Pages: 1 Prev: How to disable touchscreen(mouse) in WinCE? Next: Activate BT on an iPaq / WM2005 in Native code? |