$IFNDEF __FREEQ_LEAN
DIM gSystm AS QSYSTEM
IF IDE.MenuIcons THEN
IDE_SetMenuIcons
ELSE
mnuCloseMFE_Tab.CAPTION = "{ X }"
END IF
SUB IDE_SetMenuIcons
DIM gMenuBack AS QBITMAP
gMenuBack.Width = 0
gMenuBack.Height = 0
DEFINT bmpReduce = False
IF gSystm.MajorVersion > 5 THEN gMenuBack.BMPHandle = MenuBack_BMP ELSE bmpReduce = True
IDE.gBMP.Transparent = True
IDE.hDC = CreateCompatibleDC(0)
IDE.gBMP.BMPHandle = new_Bmp: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(mnuNew, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = Open_BMP: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(mnuOpen, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = html_BMP: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(mnuOpenFileFromWeb, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = SaveXP_BMP: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(mnuSave, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = SaveAll_BMP: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(mnuSaveAll, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = OpenProj_BMP: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(mnuOpenProj, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = SaveProj_BMP: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(mnuSaveProj, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = closeTab_bmp: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(mnuCloseProjFiles, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = closeTab_bmp: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(mnuClose, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = Print_BMP: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(PrintMenu, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = exit_bmp: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(ExitMenu, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = ParamXP_bmp: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(mnuViewMode, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = ZoomIn_bmp: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(mnuMagnifyFont, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = ZoomOut_bmp: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(mnuMinifyFont, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = ZoomRestore_bmp: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(mnuRestoreFontMagnification, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = undo_BMP: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(UndoMenu, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = redo_BMP: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(RedoMenu, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = Cut_BMP: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(CutMenu, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = Copy_BMP: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(CopyMenu, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = Paste_BMP: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(PasteMenu, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = SelectAll_BMP: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(SelectAllMenu, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = Sort_BMP: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(mnuSort, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = DateTime_BMP: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(mnuDateTime, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = Search_BMP: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(mnuTxtFind, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = Find_BMP: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(mnuFindinFiles, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = Next_BMP: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(mnuFindNext, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = Prev_BMP: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(mnuFindPrev, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = Replace_BMP: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(mnuReplace, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = Options_BMP: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(OptionsMenu, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = Font_BMP: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(Mnu_FontMenu, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = WordWrap_bmp: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(Mnu_WordWrap, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = AutoIndent_bmp: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(Mnu_AutoIndent, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = CommentBlock_bmp: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(Mnu_CommentBlock, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = UnCommentBlock_bmp: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(Mnu_UnCommentBlock, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = LowerCase_bmp: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(Mnu_Lowercase, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = UpperCase_bmp: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(Mnu_Uppercase, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = Indent_bmp: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(Mnu_IndentBlock, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = UnIndent_bmp: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(Mnu_UnIndentBlock, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = Run_BMP: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(mnuRun, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = Compile_BMP: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(mnuCompile, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = iconset_BMP: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(IconsetMenu, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = FBLogo_BMP: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(FBCompileMenu, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = FBLogo_BMP: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(FBRunMenu, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = FBLogo_BMP: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(FBDLLMenu, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = ViewBookMarks_bmp: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(mnuNViewBookMark, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = BookMarkAdd_bmp: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(mnuAddBookMark, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = BookMarkDel_bmp: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(mnuDelBookMark, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = BookMarkNext_bmp: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(mnuNextBookMark, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = BookMarkPrev_bmp: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(mnuPrevBookMark, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = Help2_BMP: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(ContentHelpMenu, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = Help_BMP: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(ContentTopicHelpMenu, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = HelpXP_BMP: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(Content2Menu, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = hlp_bmp: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(WinHelpMenu, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = Info_BMP: IDE.BackBMP.BMP = gMenuBack.BMP: IDE_AddMenuBMP(AboutMenu, IDE.BackBMP, IDE.gBMP, IDE.hDC, bmpReduce)
IDE.gBMP.BMPHandle = closeTab_bmp
IDE.gBMP.Transparent = True
zzz = CreateCompatibleBitmap(IDE.gBMP.Handle, IDE.gBMP.width, IDE.gBMP.height)
DEFINT hOldBitmap = SelectObject(IDE.hDC, zzz)
BitBlt(IDE.hDC, 0, 0, IDE.gBMP.width, IDE.gBMP.height, IDE.gBMP.handle, 0, 0, SRCCOPY)
ModifyMenu(mnuMain.Handle, mnuCloseMFE_Tab.Command, MF_BYCOMMAND OR MF_BITMAP, mnuCloseMFE_Tab.Command, zzz )
SelectObject(IDE.hDC, hOldBitmap)
DeleteDC(IDE.hDC)
END SUB
SUB IDE_AddMenuBMP(theMenu AS QMENUITEM, TheBackBMP AS QBITMAP, TheBMP AS QBITMAP, TheHDC AS INTEGER, ReduceIt AS INTEGER)
DEFINT hOldBitmap = 0, r = 0, hBitmap
TheBMP.Transparent = True
TheBMP.TransparentColor = TheBMP.Pixel(0,0)
IF ReduceIt THEN
DIM myRect AS QRECT
myRect.Top = 0
myRect.Left = 0
myRect.Right = 15
myRect.Bottom = 15
TheBackBMP.Width = myRect.Right
TheBackBMP.Height = myRect.Bottom
TheBackBMP.PixelFormat = TheBMP.PixelFormat
TheBackBMP.StretchDraw(myRect, TheBMP.BMP)
ELSEIF TheBackBMP.Width < 1 THEN
TheBackBMP.Width = TheBMP.Width
TheBackBMP.Height = TheBMP.Height
TheBackBMP.PixelFormat = TheBMP.PixelFormat
TheBackBMP.FillRect(0, 0, TheBackBMP.Width, TheBackBMP.Height, clMenu)
TheBackBMP.Draw(TheBackBMP.Width\2 - TheBMP.Width\2 ,TheBackBMP.Height\2 - TheBMP.Height\2, TheBMP.BMP)
ELSE
TheBackBMP.Draw(TheBackBMP.Width\2 - TheBMP.Width\2 ,TheBackBMP.Height\2 - TheBMP.Height\2, TheBMP.BMP)
END IF
hBitmap = CreateCompatibleBitmap(TheBackBMP.Handle, TheBackBMP.width, TheBackBMP.height)
hOldBitmap = SelectObject(TheHDC, hBitmap)
r = BitBlt(TheHDC, 0, 0, TheBackBMP.width, TheBackBMP.height, TheBackBMP.handle, 0, 0, SRCCOPY)
IF r <> 0 THEN SetMenuItemBitmaps(mnuMain.Handle, theMenu.Command, MF_BITMAP, hBitmap, hBitmap)
SelectObject(TheHDC, hOldBitmap)
END SUB
SUB IDE_AddMenuCheckBMP(theMenu AS QMENUITEM, TheBackBMP AS QBITMAP, TheBMP AS QBITMAP, TheCheckedBMP AS QBITMAP, TheHDC AS INTEGER, ReduceIt AS INTEGER)
DEFINT hOldBitmap = 0, r = 0, hBitmap, hBitmapCheck
TheBMP.Transparent = True
TheBMP.TransparentColor = TheBMP.Pixel(0,0)
TheBackBMP.Draw(TheBackBMP.Width\2 - TheBMP.Width\2 ,TheBackBMP.Height\2 - TheBMP.Height\2, TheBMP.BMP)
hBitmap = CreateCompatibleBitmap(TheBackBMP.Handle, TheBackBMP.width, TheBackBMP.height)
hOldBitmap = SelectObject(TheHDC, hBitmap)
r = BitBlt(TheHDC, 0, 0, TheBackBMP.width, TheBackBMP.height, TheBackBMP.handle, 0, 0, SRCCOPY)
TheCheckedBMP.Transparent = True
TheCheckedBMP.TransparentColor = TheCheckedBMP.Pixel(0,0)
TheBackBMP.Draw(TheBackBMP.Width\2 - TheCheckedBMP.Width\2 ,TheBackBMP.Height\2 - TheCheckedBMP.Height\2, TheCheckedBMP.BMP)
hBitmapCheck = CreateCompatibleBitmap(TheBackBMP.Handle, TheBackBMP.width, TheBackBMP.height)
SelectObject(TheHDC, hBitmapCheck)
r = BitBlt(TheHDC, 0, 0, TheBackBMP.width, TheBackBMP.height, TheBackBMP.handle, 0, 0, SRCCOPY)
IF r <> 0 THEN SetMenuItemBitmaps(mnuMain.Handle, theMenu.Command, MF_BITMAP, hBitmap, hBitmapCheck)
SelectObject(TheHDC, hOldBitmap)
END SUB
$ENDIF
|
|