It is currently Thu Jan 23, 2020 9:44 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 29 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: Tue Nov 18, 2008 4:05 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Aug 07, 2003 7:01 pm
Posts: 3113
Location: United Kingdom
Being NT4 compatible is still a good idea, there are still loads of people with NT4 machines.

_________________
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Nov 22, 2008 5:33 pm 
Offline
Addict
Addict

Joined: Wed Nov 12, 2008 5:01 pm
Posts: 1059
Location: Russia
Here is new version of the library in action
She will be a worthy change CoolMenu.dll

Image

Image

Image

Image



The Library while not yet ready.
Shall publish in the near future.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Nov 23, 2008 4:19 pm 
Offline
Enthusiast
Enthusiast

Joined: Fri Oct 24, 2008 2:07 pm
Posts: 228
User_Russian wrote:
Quote:
Why occured this
Install library Droopy Library
For PB 4.00 http://www.purearea.net/pb/download/userlibs/DroopysLib_installer1.31.4.zip
For PB 4.10 and PB4.20 http://www.purearea.net/pb/download/userlibs/Droopys_lib_1.31.9.zip

Quote:
A little bug
This bug is already eliminated.
New version of the library shall publish in the near future

Image

Image


Ok, We're waiting for your great work :)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Nov 24, 2008 5:03 pm 
Offline
Addict
Addict

Joined: Wed Nov 12, 2008 5:01 pm
Posts: 1059
Location: Russia
New version of the library http://purik.nextmail.ru/PureBasic/XP_Menu_Lib.rar

Example of the use

Code:
; For compiling library needs Library XP_Menu_Lib - http://purik.nextmail.ru/PureBasic/XP_Menu_Lib.rar


StyleMenu.xp_menudata
Procedure GlavWindowCallback(WindowID, Message, wParam, lParam)
Protected Result=#PB_ProcessPureBasicEvents

XP_Menu_CB(WindowID, Message, wParam, lParam)

ProcedureReturn Result
EndProcedure



Procedure SetSideText_CB(*DIS.DRAWITEMSTRUCT, *SideText.Xp_SideText)
Shared FontID_Text, FontID_Text_1, FontID_Text_2
Protected Result.c=0
*SideText\y=2
*SideText\x=2
*SideText\FontID=FontID_Text
*SideText\Color=RGB(147, 2, 108)
   
If  *SideText\MenuType=0 ; General menu
   
 Select *SideText\TitlePopupMenu
  Case "File"
   *SideText\Text="File"
   Result=1
 
  Case "Edit"
   *SideText\Text="Edit"
   Result=1
 
  Case "Help"
   *SideText\Text="Help"
   Result=1
   
  Case "Files"
   *SideText\Text="Recent Files"
   Result=1

 EndSelect

ElseIf  *SideText\MenuType=1 ; Popup menu
  If *DIS\hwndItem=MenuID(8)
    *SideText\Text="Popup"
    *SideText\Color=0
    *SideText\FontID=FontID_Text_1
     Result=1
  ElseIf *DIS\hwndItem=MenuID(10)
    *SideText\Text="Tray"
    *SideText\Color=RGB(255, 11, 0)
    *SideText\FontID=FontID_Text_2
    *SideText\y=0
     Result=1
  EndIf
 
ElseIf  *SideText\MenuType=2 ; System menu
 *SideText\FontID=FontID_Text_1
 *SideText\Color=RGB(254, 25, 21)
 *SideText\Text="System menu"
 *SideText\x=4
 *SideText\y=10
   Result=1
 
EndIf

ProcedureReturn Result
EndProcedure


OpenWindow(4,0,0,300,200,"Example XP_Menu_Lib",#PB_Window_MinimizeGadget|#PB_Window_ScreenCentered|#PB_Window_Invisible)
CreateGadgetList(WindowID(4))

CheckBoxGadget(0,10,20,200,15,"Style menu general")    : SetGadgetState(0,1)
CheckBoxGadget(1,10,50,200,15,"Style menu popup") : SetGadgetState(1,1)
CheckBoxGadget(2,10,80,200,15,"Style menu system")   : SetGadgetState(2,1)
CheckBoxGadget(3,10,110,200,15,"Style menu tray")      : SetGadgetState(3,1)

TextGadget(4,10,140,80,15, "Style menu")
ComboBoxGadget(5,80,136,100,100)
 AddGadgetItem(5,-1,"2000")
 AddGadgetItem(5,-1,"XP")
 AddGadgetItem(5,-1,"2003")
 AddGadgetItem(5,-1,"Violet")
 AddGadgetItem(5,-1,"Black")
SetGadgetState(5,2)



;ImageGadget(7,250,0,10,10,0)

   If CreateMenu(2,WindowID(4))
      MenuTitle("File")
    MenuItem(1,"New"+Chr(9)+"Ctrl+N")
    MenuItem(2,"Open..."+Chr(9)+"Ctrl+N") : DisableMenuItem(2,2,1)
    MenuItem(3,"Save"+Chr(9)+"Ctrl+N")
    MenuItem(4,"Save As..."+Chr(9)+"Ctrl+N") : DisableMenuItem(2,4,1) : SetMenuItemState(2,4,1)
    MenuItem(46,"Save All"+Chr(9)+"Ctrl+N")
    MenuItem(15,"Close"+Chr(9)+"Ctrl+N") : SetMenuItemState(2,15,1)
    MenuBar()
    OpenSubMenu("Files")
     MenuItem(20,"1)    1")
     MenuItem(21,"2)    2")
     MenuItem(22,"3)    3")
     MenuItem(23,"4)    4")
     MenuItem(24,"5)    5")
     MenuItem(25,"6)    6")
     MenuItem(26,"7)    7")
     MenuItem(27,"8)    8")
     MenuItem(28,"9)    9")
     MenuItem(29,"10)  10")
    CloseSubMenu()
    ; Ðàçäåëèòåëü ìåæäó ïóíêòàìè.
    MenuBar()
    MenuItem(6,"Exit")
       MenuTitle("Edit")
    MenuItem(7, "Undo")
    MenuItem(8,"Redo")
   
      MenuTitle("Help")
      MenuItem(2,"About")
      MenuBar()
      OpenSubMenu(" ¹1")
      For i=2 To 8
      MenuItem(1,"Item")
      OpenSubMenu(" ¹"+Str(i))
       
     
      Next
     
      CloseSubMenu()
      CloseSubMenu()
      CloseSubMenu()
      CloseSubMenu()
      CloseSubMenu()
      CloseSubMenu()
      CloseSubMenu()
      CloseSubMenu()
      MenuItem(73,"Item")
     
    EndIf
   
   
  If  CreatePopupMenu(8)
   MenuItem(1,"Item 1")
   MenuItem(2,"Item 2")
  EndIf
   
   If  CreatePopupMenu(10)
   MenuItem(1,"Item 3")
   MenuItem(2,"Item 4")
  EndIf

   
   
  ExtractIcon_(0,GetSystemDirectory()+"\sendmail.dll",0) 
  AddSysTrayIcon(0,WindowID(4),ExtractIcon_(0,GetSystemDirectory()+"\sendmail.dll",0) )
  SysTrayIconToolTip(0,"Example XP_Menu_Lib")

SetWindowCallback(@GlavWindowCallback(),4)


 
XP_MenuRegister(MenuID(2), #XP_RegMenu, #XP_RegGeneralMenu,WindowID(4)) ; Ðåãèñòðàöèÿ ãëàâíîãî ìåíþ
XP_MenuRegister(MenuID(8), #XP_RegMenu, #XP_RegPopupMenu)  ; Ðåãèñòðàöèÿ êîíòåêñòíîãî ìåíþ
XP_MenuRegister(GetSystemMenu_(WindowID(4),0), #XP_RegMenu, #XP_RegSysMenu) ; Ðåãèñòðàöèÿ ñèñòåìíîãî ìåíþ
XP_MenuRegister(GetSystemMenu_(WindowID(4),0), #XP_DelMenu, #XP_RegSysMenu) ; Ðåãèñòðàöèÿ ñèñòåìíîãî ìåíþ
XP_MenuRegister(GetSystemMenu_(WindowID(4),0), #XP_RegMenu, #XP_RegSysMenu) ; Ðåãèñòðàöèÿ ñèñòåìíîãî ìåíþ
XP_MenuRegister(MenuID(10), #XP_RegMenu, #XP_RegPopupMenu) ; Ðåãèñòðàöèÿ êîíòåêñòíîãî ìåíþ â òðåå


XP_SetMenuIcon(MenuID(2),1,ExtractIcon_(0,GetSystemDirectory()+"\sendmail.dll",0) )
XP_SetMenuIcon(MenuID(2),2,ExtractIcon_(0,GetSystemDirectory()+"\shell32.dll",19) )
XP_SetMenuIcon(MenuID(2),3,ExtractIcon_(0,GetSystemDirectory()+"\shell32.dll",38) )

;XP_SetMenuStyle()
 
FontID_Text=LoadFont(4, "MS Sans Serif", 10,#PB_Font_Bold)
FontID_Text_1=LoadFont(5, "MS Sans Serif", 8)
FontID_Text_2=LoadFont(6, "Verdana", 12,#PB_Font_Bold)
 
XP_SetSideText_CB(@SetSideText_CB()) ; Îáðàáîò÷èê ñîáûòèé îò ìåíþ. Èñïîëüçóåòñÿ äëÿ îòîáðàæåíèÿ òåêñòà â îáëàñòè çíà÷êîâ

HideWindow(4,0)

Repeat
 Event=WaitWindowEvent()
 Gadget=EventGadget()
 Type=EventType()
 Menu=EventMenu()
   
   
    If Event=#WM_RBUTTONUP
     DisplayPopupMenu(8, WindowID(4))
    EndIf
   
    If Event=#PB_Event_SysTray
      If Type=#PB_EventType_RightClick
       DisplayPopupMenu(10, WindowID(4))
      EndIf
    EndIf
   
    If Event = #PB_Event_Gadget
     Select Gadget
      Case 0
       If XP_GetMenuStyle()=#XP_StyleNormal
        XP_MenuRegister(MenuID(2), GetGadgetState(0), #XP_RegGeneralMenu)
       Else
        XP_MenuRegister(MenuID(2), GetGadgetState(0), #XP_RegGeneralMenu, WindowID(4))
       EndIf
      Case 1
       XP_MenuRegister(MenuID(8), GetGadgetState(1), #XP_RegPopupMenu)
      Case 2
       XP_MenuRegister(GetSystemMenu_(WindowID(4),0),GetGadgetState(2), #XP_RegSysMenu)
      Case 3
       XP_MenuRegister(MenuID(10), GetGadgetState(3), #XP_RegPopupMenu)
      Case 5 ; Ñòèëü ìåíþ
       If Type=1
       
      ;XP_GetMenuStructure(StyleMenu)
     
       Select GetGadgetState(5)
        Case 0
         XP_SetMenuStyle(#XP_StyleNormal)
         XP_EnableDrawTitleBar(WindowID(4), 0)
        Case 1
         XP_SetMenuStyle(#XP_StyleXP)
         XP_EnableDrawTitleBar(WindowID(4), 1)
        Case 2
         XP_SetMenuStyle(#XP_Style2003)
         XP_EnableDrawTitleBar(WindowID(4), 1)
        Case 3
         XP_SetMenuStyle(#XP_StyleViolet)
         XP_EnableDrawTitleBar(WindowID(4), 1)
        Case 4
         XP_SetMenuStyle(#XP_StyleBlack)
         XP_EnableDrawTitleBar(WindowID(4), 1)
       EndSelect 
      EndIf
     EndSelect
    EndIf

Until Event=#PB_Event_CloseWindow


Voice your opinions about library.

Quote:
Being NT4 compatible is still a good idea, there are still loads of people with NT4 machines

NT4 correct works with API function GetMenuString?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Nov 24, 2008 6:11 pm 
Offline
User
User

Joined: Sun Sep 04, 2005 4:18 pm
Posts: 26
very nice job user_russian, thanks but with this last example i have this message : "the following purelibrary is missing : StringExtension. is this related to your lib or ??

thank's in advance.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Nov 24, 2008 7:09 pm 
Offline
Addict
Addict

Joined: Wed Nov 12, 2008 5:01 pm
Posts: 1059
Location: Russia
The Library in PB 4.00, 4.10 and 420 works orderly.
In PB 4.30 until checked.
Can you use PB 4.30?

_________________
Library XP_Menu_Lib - office menu; HID_Lib - USB Library
Torrent client - pbTorrent (source code); Create driver in PureBasic.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Dec 18, 2008 9:20 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat Aug 16, 2008 2:02 pm
Posts: 143
Location: Iran
Hello User_Russian
Your project is exelent really
why don't continue that to ending?
Thanks for sharing


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Dec 18, 2008 5:47 pm 
Offline
Addict
Addict

Joined: Wed Nov 12, 2008 5:01 pm
Posts: 1059
Location: Russia
New version library

FOR PB 4.00 - PB 4.20 http://purik.nextmail.ru/PureBasic/XP_Menu_Lib.rar
FOR PB 4.30 :) http://purik.nextmail.ru/PureBasic/XP_Menu_Lib_FOR_PureBasic_4_30.rar


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Dec 19, 2008 7:30 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat Aug 16, 2008 2:02 pm
Posts: 143
Location: Iran
Xmass Version!
Thanks User_Russian. :)
I 've hope to see your nice future project as soon.


Top
 Profile  
Reply with quote  
 Post subject: Re: Library XP_Menu_Lib
PostPosted: Wed Dec 09, 2009 2:03 pm 
Offline
Addict
Addict

Joined: Wed Nov 12, 2008 5:01 pm
Posts: 1059
Location: Russia
Library for PB 4.40 http://purebasic.programist.ru/pb_lib_e ... .40_en.rar

_________________
Library XP_Menu_Lib - office menu; HID_Lib - USB Library
Torrent client - pbTorrent (source code); Create driver in PureBasic.


Top
 Profile  
Reply with quote  
 Post subject: Re: Library XP_Menu_Lib
PostPosted: Wed Dec 09, 2009 3:10 pm 
Offline
Enthusiast
Enthusiast

Joined: Fri Oct 24, 2008 2:07 pm
Posts: 228
nice work, thanks User_Russian
maybe see more from u :D


Top
 Profile  
Reply with quote  
 Post subject: Re: Library XP_Menu_Lib
PostPosted: Thu Dec 31, 2009 2:55 pm 
Offline
Addict
Addict
User avatar

Joined: Fri Feb 13, 2004 12:45 am
Posts: 2787
Location: Bergen, Norway
I didn't know there were such a large Russian community for PB :)
Nice work :) Хорошая работа.

_________________
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!


Top
 Profile  
Reply with quote  
 Post subject: Re: Library XP_Menu_Lib
PostPosted: Thu Dec 31, 2009 4:00 pm 
Offline
Addict
Addict

Joined: Sat Dec 31, 2005 5:24 pm
Posts: 2970
Location: Where ya would never look.....
Looks good. Any source code?

_________________
The advantage of a 64 bit operating system over a 32 bit operating system comes down to only being twice the headache.


Top
 Profile  
Reply with quote  
 Post subject: Re: Library XP_Menu_Lib
PostPosted: Mon Apr 05, 2010 3:14 pm 
Offline
Enthusiast
Enthusiast

Joined: Fri Oct 24, 2008 2:07 pm
Posts: 228
omg, some people are in waiting for new version with more brilliant views :D
please man


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 29 posts ]  Go to page Previous  1, 2

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye