Page 3 of 4

Posted: Tue Nov 13, 2007 3:01 pm
by Anden
Any volunteers who tailbite this into a PB 4.10 userlib?

Posted: Tue Nov 13, 2007 3:03 pm
by DoubleDutch
Why? it works great as an include.

Posted: Tue Nov 13, 2007 3:20 pm
by srod
Anden wrote:Any volunteers who tailbite this into a PB 4.10 userlib?
It's easy enough to Tailbite; flype did it earlier on before I made several updates.

Personally, like DoubleDutch, I only ever use this in source code form. There's enough user libraries floating around already without me adding yet more when one is not really needed in this case. :)

If you wish to tailbite it then you only need to beware of optional parameters in procedures because Tailbite cannot cope with those. In such cases, you just need to supply multiple versions of the same procedure etc. But, thanks to flype, this work has already been done.

Tailbite away! But if it doesn't work then I'm afraid that I have no time to help out with this. :wink:

Posted: Tue Nov 13, 2007 3:37 pm
by gnozal
Anden wrote:Any volunteers who tailbite this into a PB 4.10 userlib?
1. Download latest version of jaPBe V3 and start it
2. Open "nxResidents.pbi"
3. Main menu -> Project -> Compile manually (Resident) ; Press OK ; -> Resident is done
4. Open "nxToolbar.pbi" ; adjust IncludePath !!!
5. Main menu -> Project -> Tailbite ; Press OK ; -> Userlibrary is done
Ready !

Posted: Tue Jan 08, 2008 6:12 pm
by Karbon
I was just getting ready to post about this library and somehow missed your updates! Thanks for the single-image function, it's *exactly* what I needed!

I noticed something odd in the 1.3 update text file - it says "Created with Purebasic 4.2 for Windows". Did you mean 4.1? I only ask because I want to know of any incompatibility issues before I update what I'm using.

Thanks again!

Posted: Tue Jan 08, 2008 6:26 pm
by srod
Hi Mitch,

I probably meant PB 4.02! :)

I haven't tried the library with PB 4.2, but I see no reason why it shouldn't run fine.

Posted: Sun Apr 27, 2008 8:11 pm
by DoubleDutch
There is a problem with tooltips if you hide a button - it shows the wrong tooltip sometimes.

Here is a fix that seems to work ok:

Code: Select all

ProcedureDLL nxUpdateTBtooltips(hTb); Updates the ToolbarTooltips ( resize Tooltips to actual ButtonSize )
  Protected count, i
  Protected *nxTB._nxToolbar, btn.TBBUTTON, ti.TOOLINFO
  *nxTB = GetProp_(hTb, #PROP$)
  If hTb And *nxTB
    count = SendMessage_(hTb, #TB_BUTTONCOUNT,0,0)
    If count
      For i = 0 To (count-1)
        If SendMessage_(hTb, #TB_GETBUTTON, i, btn);
          If btn\idCommand ;Separators have no index.  Hence the reason why button indexes must be > 0.
            ti\cbSize = SizeOf(TOOLINFO)
            ti\uId    = btn\idCommand
            ti\hwnd   = hTb
          ;Get new rect from TB button
          	If SendMessage_(hTb,#TB_ISBUTTONHIDDEN,btn\idCommand,0)
          		ti\rect\left=0
          		ti\rect\right=0
          	Else
	            SendMessage_(hTb, #TB_GETITEMRECT, i, @ti\rect)
	          ;Set new rect for tooltip.
	         	EndIf
						SendMessage_(*nxTB\hTt, #TTM_NEWTOOLRECT, 0, ti)
          EndIf        
        EndIf
      Next
    EndIf
  EndIf
EndProcedure

Posted: Sun Apr 27, 2008 8:20 pm
by srod
That'll do nicely. Thanks. 8)

Posted: Mon Jun 16, 2008 7:14 pm
by Thorsten1867
If I create a library, I always get an error:
NxToolbar.desc
Error at line 26: '] Long' is not a valid argument type

Code: Select all

ASM
;
4
COMCTL32
GDI32
KERNEL32
USER32
;
LIB
;
5
Memory
Image
Object
SimpleList
ImagePlugin
;
nxToolbar.chm
;
nxUpdateTBtooltips, Long (hTb) - Updates the ToolbarTooltips ( resize Tooltips to actual ButtonSize )
None | StdCall
;
nxSetTBbuttonWidth, Long, Long, Long (hTb, buttonid, width) - Set a new Width for a TB-Button.
Long | StdCall
;
nxCreateTB,[] Long, Long, Long, ([ hWndParent, buttonx, buttony]) - This Command creates a Toolbar and assigns the TB to the Window with the Handle hwnd.
Long | StdCall
;
nxSetTBImage,[] Long, Long, Long, ([ hTb, hImage, hMask]) - Set the Button-Images and the Button-Masks for the Toolbar-Buttons.
Long | StdCall
.....

Posted: Mon Jun 16, 2008 7:23 pm
by ts-soft
Thorsten1867 wrote:Error at line 26: '] Long' is not a valid argument type
In line 26 is missing a , (german: Komma)

Posted: Mon Jun 16, 2008 7:32 pm
by Thorsten1867
This file is created by tailbite. I can't change it.

Posted: Mon Jun 16, 2008 7:46 pm
by ts-soft
> I can't change it.
change the options with tailbite-manager:
keep source, build batch and compile by hand, no problem but i'm not shure
with the "komma"

Posted: Mon Jun 16, 2008 9:52 pm
by srod
The problem is because I modified the library to make it easier to use as a source code include file. It is with the functions using optional parameters.

The source will need a few modifications before it will compile as a user library.

I'll post an update later.

Posted: Mon Jun 16, 2008 11:12 pm
by srod
Fixed.


16th June 2008 - Update.
Whilst the library is intended for use as a source code include, it is now compatible with Tailbite. There were problems with those functions taking optional parameters etc.

An important change is that any program using the nxToolbar library in the form of a source code include file must now declare the constant:

Code: Select all

#nxToolbar_USESOURCE
before including the main nxToolbar source file. (See the example program.) This meant that I could keep the optional parameters when using the lib either in source code form or as a Tailbitten library without making any changes to the host program etc.

The download link is in the first post.

Posted: Mon Jun 16, 2008 11:51 pm
by netmaestro
I use an optional parameter for the flags in ManagedMessageBox and Tailbite doesn't have a problem with it. I thought optional parameters were solved in Tailbite? Or am I wrong?