title image


Smiley So gehts über API
#include #define _WM_TNA WM_USER#define BEZ "Systray (TNA) Icon"NOTIFYICONDATA NID={sizeof(NID),0,0,NIF_MESSAGE|NIF_ICON|NIF_TIP,_WM_TNA,0,BEZ};LRESULT CALLBACK WndProc(HWND hwnd,UINT Msg,WPARAM wp,LPARAM lp){ switch(Msg){ case WM_CREATE: NID.hWnd=hwnd; NID.hIcon=LoadIcon(0,IDI_WINLOGO); Shell_NotifyIcon(NIM_ADD,&NID); DestroyIcon(NID.hIcon); break; case _WM_TNA: switch(lp){ case WM_LBUTTONDBLCLK: //mit doppelklick wird beendet SendMessage(hwnd,WM_DESTROY,0,0); break; } break; case WM_DESTROY: Shell_NotifyIcon(NIM_DELETE,&NID); PostQuitMessage(0); return 0; } return DefWindowProc(hwnd,Msg,wp,lp);}int WINAPI WinMain(HINSTANCE hi,HINSTANCE pr,PSTR,int){ MSG msg; if(!pr){ WNDCLASS wc={0,WndProc,0,0,hi,0,0,0,0,BEZ}; if (RegisterClass(&wc) && CreateWindow(BEZ,BEZ,0,0,0,0,0,NULL,NULL,hi,NULL)) while(GetMessage(&msg,0,0,0))DispatchMessage(&msg); } return msg.wParam;}bei fragen... einfach fragen :)mfgkwoTx

geschrieben von

Login

E-Mail:
  

Passwort:
  

Beitrag anfügen

Symbol:
 
 
 
 
 
 
 
 
 
 
 
 
 

Überschrift: