Re: update for SetLibEntryPoints

2005-08-31 Thread Jacek Szumigaj
Hi Developers!


> hMainWindow:=FindWindow('TMailerForm',NIL);

> hMenu:=GetMenu(hMainWindow); //RETURNS 0 !
 
 In  TB version > 3.02.10 menu is placed on the toolbar. You need HWND
 of this toolbar instead.
 
 But (from help, about GetMenu):

> Return Values
> 
> If the function succeeds, the return value is the handle of the
> menu. If the given window has no menu, the return value is NULL. If
> the window is a child window, the return value is undefined.
  ^^^^^

-- 
Best regards, Jacek Szumigaj
http://szumi.one.pl
The Bat! 3.0.2.10/Windows XP 5.1




http://www.silverstones.com/thebat/TBUDLInfo.html


Re: update for SetLibEntryPoints

2005-08-30 Thread Jacek Szumigaj
Hi Developers!

> I will try to add similar code in my [buggy] UMC/UMX plugin :)

I forgot about Finalize:

It will look like this:

void TBP_EXPORT TBP_Finalize()
{
//restoring oryginal windowproc
SetWindowLong(hMainWindow, GWL_WNDPROC, (LONG)lpPrevMainWndProc);

//deleting added menu items
HMENU hMenu = GetMenu(hMainWindow);

//get own menu item:
for(int i=0; ihttp://www.silverstones.com/thebat/TBUDLInfo.html


Re: update for SetLibEntryPoints

2005-08-30 Thread Jacek Szumigaj
Hi Developers!

> And just one question: can i add a new menu item using plugin API or
> not?
 

 Yes of course! :)
 I have successfully added menu into TB!
 Look at attachment.


 Here is my example code:


[...]

std::vectorsLabels;


void TBP_EXPORT TBP_Initialize()
{

//search  TB main window:
BOOL rc = EnumWindows(
//hDesk,// 
handle to desktop to enumerate
(WNDENUMPROC)EnumWindowsProc,   // points 
to application's callback function
(LPARAM)&hMainWindow// 
32-bit value to pass to the callback function
);




HMENU hMenu = GetMenu(hMainWindow);

hMyMenu = CreateMenu();

sLabels.push_back("MenuItem 1");
sLabels.push_back("MenuItem 2");
sLabels.push_back("MenuItem 3");

BuildMenu(hMyMenu);

//add menu :
rc = AppendMenu(
hMenu,
MF_POPUP,   // menu-item flags
(UINT)hMyMenu,  // menu-item identifier or handle of 
drop-down menu or submenu
"TB-Plugin"  // menu-item content
   );

//replace original window proc
#ifdef STRICT
lpPrevMainWndProc = (WNDPROC)SetWindowLong(hMainWindow, GWL_WNDPROC, 
(LONG)MainWindowProc);
#else
lpPrevMainWndProc = (FARPROC)SetWindowLong(hMainWindow, GWL_WNDPROC, 
(LONG)MainWindowProc);
#endif

if(lpPrevMainWndProc)
MessageBox(NULL, "OK", "OK", MB_OK);//debug msg
}
 


//EnumChildProcedure
BOOL CALLBACK EnumWindowsProc(
 HWND hwnd, // handle to child window
 LPARAM lParam  // application-defined value
 )
{
HWND *hMailer = (HWND*)lParam;

TCHAR ClassName[256];
LPTSTR lpClassName = ClassName;

int Ret = GetClassName(hwnd,// handle of window
lpClassName,// address of buffer for class name
256 // size of buffer, in characters
);

if(strncmp(ClassName, "TMailerForm", 256) == 0)
{
*hMailer = hwnd;
return FALSE;
}
return TRUE;
}


   
void BuildMenu(HMENU hMenu)
{
MENUITEMINFO mii;
ZeroMemory(&mii, sizeof(MENUITEMINFO));
mii.cbSize = sizeof(MENUITEMINFO);

for(int i=0; i

TBMenuPlugin.png
Description: PNG image

http://www.silverstones.com/thebat/TBUDLInfo.html

SQL Plugin

2004-11-26 Thread Jacek Szumigaj
Hi All

 Yesterday I developed new simple The Bat! plug-in to co-operate with
 Data Bases.

 It is available for download from http://szumi.one.pl/thebat/SQL page.

 SQL Plugin adds four macros:

%SQLQuery("SQL_Connection_String", "SQL_Query")

This macro execute SQL query and return dataset as comma separated
data in each rows or exception message in even plugin throw it.

Example:

%_ConnectionString='Provider=Microsoft.Jet.OLEDB.4.0;Data 
Source=C:\customers.mdb'%-
%_Query='select FirstName, LastName from Customers'%-
%SQLQuery(%_ConnectionString, %_Query)%-

%SQLCommand("SQL_Connection_String", "SQL_Command")

This  macro execute SQL command without return any dataset (it may
return execute exception only)

Example:

%_ConnectionString='Provider=Microsoft.Jet.OLEDB.4.0;Data 
Source=C:\customers.mdb%-
%_Command='insert into Customers (FirstName, LastName) values 
("%FromFName", "%FromLName")'%-
%SQLCommand(%_ConnectionString, %_Command)%-

%SQLBuildConnectionString

This  macro  open wizard to configure connection string and return it.

%SQLVersion

Returns plugin name and version number.



 Caution!
 It  is  first  beta version of this plugin. Some problems my occurred
 with it, also be careful! :)


-- 
Best regards, Jacek Szumigaj
The Bat! 2.13 "Lucky" Beta/6
Windows XP 5.1



http://www.silverstones.com/thebat/TBUDLInfo.html


Re: Bug in X-Face Plugin 1.5

2004-08-23 Thread Jacek Szumigaj
Hi Developers!

on Monday, August 23, 2004 at 11:24 Thomas Lieblang
<[EMAIL PROTECTED]> wrote:

> Can anybody confirm?
 
 Yes, I know.

 Plugin simulates shortcut keypress to invoke a filter. It may disturb
 shift key hold.

 You  may  try  to  define  shortcut without shift key to resolve this
 problem...  but  it  may  conflict  with  other keyshortcuts that are
 combination your_shortcut+shift

 sorry for my terrible english :-/
 
-- 
Best regards, Jacek Szumigaj
The Bat! 2.13 "Lucky" Beta/6/Windows 98 4.10



http://www.silverstones.com/thebat/TBUDLInfo.html


Re: New Plugin: X-Face

2004-08-09 Thread Jacek Szumigaj
Hi Developers!

 Next version - 1.5  is available from
 http://www.szumi.w.pl/thebat/X-Face/en
 
 Last changes are:
 [*]  Macro  %SetXFace  accept  now also path to text file with x-face
  header code (without preceding "X-Face: ")



-- 
Best Regards, Jacek Szumigaj
The Bat! 2.13 "Lucky" Beta/3/Windows 98 4.10



http://www.silverstones.com/thebat/TBUDLInfo.html


Re: New Plugin: X-Face

2004-08-06 Thread Jacek Szumigaj
Hi All!

on Wednesday, August 4, 2004 at 16:08 Jacek Szumigaj
<[EMAIL PROTECTED]> wrote:

>> [...] auto displaying,

> There is already possible in version 1.4
>  http://www.szumi.w.pl
 
  In version 1.4.1 image is transparent. IMHO Looks better :)
  http://natserwis.pl/~szumi/thebat/en/XFace_plugin.php
  

-- 
Bet Regards, Jacek Szumigaj
The Bat! 2.13 "Lucky" Beta/2/Windows 98 4.10



http://www.silverstones.com/thebat/TBUDLInfo.html


Re: New Plugin: X-Face

2004-08-04 Thread Jacek Szumigaj
Hi All!

on Thursday, June 24, 2004 at 11:12 I'm wrote:

>  I  want  to  make auto displaying, and hiding face on select
>  mails on the list.
 
 There is already possible in version 1.4

 http://www.szumi.w.pl
 
 

-- 
Bet Regards, Jacek Szumigaj
The Bat! 2.12.00/Windows 98 4.10




http://www.silverstones.com/thebat/TBUDLInfo.html


Shell-Plugin

2004-07-05 Thread Jacek Szumigaj
Hi Developers

 I developed new plug-in: Shell-Plugin

 This plugin adds some macros, and two are most important:

1. %Shell_Run("path\to\exe\file")

   This macro run *console* process and capture all outputs.

2. %Shell_Cmd

   This  macro  open  shell  command  window.  After  exit (close this
   window) all output is captured by macro and inserted into message.
   
 Plug-in is available for download from page:
 http://www.szumi.w.pl/thebat/ShellPlugin


--
Best Regards, Jacek Szumigaj
The Bat! 2.11/Windows 98 4.10



http://www.silverstones.com/thebat/TBUDLInfo.html


Re: New Plugin: X-Face

2004-06-27 Thread Jacek Szumigaj
Hi,

on June 24, 2004 at 11:12 I'm wrote:

> auto hiding face

 is available in version 1.3

 http://natserwis.pl/~szumi/thebat/en/XFace_plugin.php


-- 
Best Regards, Jacek Szumigaj
The Bat! 2.11/Windows 98 4.10



http://www.silverstones.com/thebat/TBUDLInfo.html


Re: New Plugin: X-Face

2004-06-24 Thread Jacek Szumigaj
Hi All!

on Wednesday, June 23, 2004 at 19:46 Leif Gregory
<[EMAIL PROTECTED]> wrote:

> How hard would it be to change the plugin so that it could display a
> .gif or .jpg in the header pane.

> Where I'm going with this is a combination of the Roguemoticons and
> the X-Face plugin so that you could define a header called:

> X-Rogue: :Leif_Gregory:

> So that it would display the image of the person in the header pane
> instead of the body of the message?

 Yes, It is interesting idea. I think of to do try it later.

 Earlier  I  want  to  make auto displaying, and hiding face on select
 mails on the list.

 Now I am waiting for free time to do this... :)

-- 
Best Regards, Jacek Szumigaj
The Bat! 2.11/Windows 98 4.10




http://www.silverstones.com/thebat/TBUDLInfo.html


Re: New Plugin: X-Face

2004-06-23 Thread Jacek Szumigaj
Hi All,

I'm wrote:

>  I developed new The Bat! plugin to insert and display X-Face header.

>  It  is  available  for download from http://natserwis.pl/~szumi page.

 New version is now available!

 Changes:
 [+] Face is now displayed on the headers panel active view window.




-- 
Best regards,  Jacek Szumigaj
The Bat! 2.11/Windows 2000 5.0



http://www.silverstones.com/thebat/TBUDLInfo.html


Re: New Plugin: X-Face

2004-06-15 Thread Jacek Szumigaj
Hi All!

on Monday, June 14, 2004 at 18:08 Alexey Vinogradov <[EMAIL PROTECTED]>
wrote:

> If it is written on MS VC,
 
 No, its written in BCB  :-/
 
 I try to translate plugin guide and home page to English.


-- 
Bet Regards, Jacek Szumigaj
The Bat! 2.11/Windows 98 4.10




http://www.silverstones.com/thebat/TBUDLInfo.html


New Plugin: X-Face

2004-06-14 Thread Jacek Szumigaj
Hi All

 I developed new The Bat! plugin to insert and display X-Face header.

 It  is  available  for download from http://natserwis.pl/~szumi page.
 The page is in polish, but usage of this plugin is very very easy.

 Plugin adds two macros:

 %SetXFace("Path\to\48x48x1\bmp_file\with\your_face.bmp")  - to insert
 header.  This  macro  requires X-Face header. You should add it using
 "Options/Preferences.../Message Headers/Add Button".

 and

 %DisplayXFace  -  (without  parameters)  to  display  image of X-Face
 header.  IMHO  the  best  place for this macro is filter with enabled
 "save  to file" option, %DisplayXFace macro in save template and with
 defined keyboard shortcut.


--
Best Regards, Jacek Szumigaj
The Bat! 2.11/Windows 98 4.10



http://www.silverstones.com/thebat/TBUDLInfo.html