Background Menu In PowerBuilder
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
//==================================================================== // Function: n_menubackground.of_setbackground() //-------------------------------------------------------------------- // Description: //-------------------------------------------------------------------- // Arguments: // value window aw // value menu am // value string as_img //-------------------------------------------------------------------- // Returns: (none) //-------------------------------------------------------------------- // Usage: n_menubackground.of_setbackground() //-------------------------------------------------------------------- // Modify History: // //==================================================================== Long ll_hwnd, ll_BitMapBrush Long ll_hMainMenu, ll_hSubMenu Long ll_hBitMap String ls_BitMapFileName MENUINFO lstr_MenuInfo Integer i //handle window ll_hwnd = Handle(aw) //LoadImage() ls_BitMapFileName = as_img ll_hBitMap = LoadImage(0, ls_BitMapFileName, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE) ll_BitMapBrush = CreatePatternBrush(ll_hBitMap) //MENUINFO lstr_MenuInfo.cbSize = 28 lstr_MenuInfo.cyMax = 0 lstr_MenuInfo.fMask = MIM_BACKGROUND lstr_MenuInfo.hbrBack = ll_BitMapBrush //get menu from window ll_hMainMenu = GetMenu(ll_hwnd) For i = 0 To UpperBound(am.Item[]) -1 If UpperBound(am.Item[i + 1].Item) = 0 Then Continue ll_hSubMenu = GetSubMenu(ll_hMainMenu, i) SetMenuInfo(ll_hSubMenu, lstr_MenuInfo) DrawMenuBar(ll_hwnd) Next DeleteObject(ll_hBitMap) |
Find Projects On Github click here
Good Luck!
Subscribe
Login
0 Comments