home *** CD-ROM | disk | FTP | other *** search
- /* AppDraw.c */
-
- /*
- takes care of the drawing of the buttons
- */
-
- #define STRICT
- #include <windows.h>
- #include <windowsx.h>
- #include "appbar.h"
-
- /*-------------------------------------------------------------------------*/
- void DrawItem(LPDRAWITEMSTRUCT lpIconDIS, HICON *hIcon)
- {
- iCurrent = (int) (lpIconDIS->CtlID - ID_BUTTON1);
- hWndCurrentButton = lpIconDIS->hwndItem;
- if(!AppSystem.BigButtons)
- {
- if(iCurrent == SYSTEM_BUTTON)
- {
- DrawIcon(lpIconDIS->hDC, 0, 0, hSystem);
- if(bQuickLoad)
- DrawIcon(lpIconDIS->hDC, 0, 0, hQuickLoad);
- }
- if(iCurrent >= FirstAppButton)
- {
- if(hIcon[iCurrent-FirstAppButton] != NULL)
- {
- if(AppButton[iCurrent-FirstAppButton].ButtonLook)
- DrawIcon(lpIconDIS->hDC, 0, 0, hBlank);
- DrawIcon(lpIconDIS->hDC, 0, 0, hIcon[iCurrent-FirstAppButton]);
- }
- else
- DrawIcon(lpIconDIS->hDC, 0, 0, hBlank);
- if(AppButton[iCurrent-FirstAppButton].ProgStatus == ALIVE)
- DrawIcon(lpIconDIS->hDC, 0, 0, hPressed);
- }
- if(bKeyboardOn == TRUE)
- if(iCurrent == iKey)
- DrawIcon(lpIconDIS->hDC, 0, 0, hKeybOn);
- }
- if(AppSystem.BigButtons)
- {
- DrawBitmap(lpIconDIS->hDC, 0, 0, hbBlank);
- if(bKeyboardOn == TRUE)
- if(iCurrent == iKey)
- DrawBitmap(lpIconDIS->hDC, 0, 0, hbKeyb);
- if(iCurrent == SYSTEM_BUTTON)
- {
- DrawIcon(lpIconDIS->hDC, 3, 3, hSystem2);
- if(bQuickLoad)
- DrawIcon(lpIconDIS->hDC, 3, 3, hQuickLoad);
- }
- if(iCurrent >= FirstAppButton)
- {
- if(hIcon[iCurrent-FirstAppButton] != NULL)
- {
- if(AppButton[iCurrent-FirstAppButton].ProgStatus == ALIVE)
- DrawBitmap(lpIconDIS->hDC, 0, 0, hbPressed);
- DrawIcon(lpIconDIS->hDC, 3, 3, hIcon[iCurrent-FirstAppButton]);
- if(AppButton[iCurrent-FirstAppButton].ProgStatus == ALIVE)
- DrawIcon(lpIconDIS->hDC, 3, 3, hPressed2);
- }
- }
- }
- }
-