Results 1 to 2 of 2

Thread: system tray problems with Win98

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2002
    Location
    Sweden
    Posts
    8

    system tray problems with Win98

    Hey

    this code belows works fine on XP and "some" Win98 machines.
    what could be the issue here?
    the app still runs after executing this code but no trayicon is added. neither an empty spot or the icon.

    Dim ICONDATA As NOTIFYICONDATA
    ICONDATA.cbSize = Len(NOTIFYICONDATA)
    ICONDATA.hWnd = SYSTRAY_HWND
    lngIconHandle = FreeIconHandle()
    If lngIconHandle = 0 Then Exit Function
    ICONDATA.uID = lngIconHandle
    ICONDATA.hIcon = ExtractIcon(SYSTRAY_HINSTANCE, SYSTRAY_ICONPATH, SYSTRAY_ICONINDEX)

    ICONDATA.szTip = SYSTRAY_TOOLTIP & Chr(0)
    ICONDATA.uFlags = NIF_TIP Or NIF_ICON Or NIF_MESSAGE
    ICONDATA.uCallbackMessage = PK_TRAYICON

    If Shell_NotifyIcon(NIM_ADD, ICONDATA) Then
    AddIcon = ICONDATA.uID
    End If

    DestroyIcon ICONDATA.hIcon

  2. #2

    Thread Starter
    New Member
    Join Date
    Jan 2002
    Location
    Sweden
    Posts
    8
    Ive solved whe issue by myself.
    actually I cant figure out what was actually the diffrent between

    taking the size of the structure (didnt work) or my own variable declared as the structure.

    but it it made it work.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width