Dear Sirs,
Please response to [EMAIL PROTECTED] because iam on holliday till
19.9.1999
SPT1700 has impovements against spt1500 - no serial receive buffer
corrupted, better contrast, finer signature capture but
with standard library 19200 baud is the maximum (unit himself reach
115200 ?)
- missing 115200kBaud searching for new libraries like
NewSerialManager???
- are there any plans to upgrade POSE to the new OS-release??
- having Tables in a Form you are not able to use the graffity-area
- if you select something in a table, do a TblRedraw and select another
item, the old one
is still selected (I have solved the problem by unselecting the item
using
TblUnhighlight, doing a TblRedraw and after that selecting the old
one manually using
TblSelectItem
- how can you handle an application update using the serial interface
(that means, we do
not use HotSync!!)
Actually I use the DatabaseHdrType - structure defined in DataPrv.h,
but this is just
no documented way and (I think so) will not work with newer
OS-releases.
Our task is to contact some server asking if there is some new
application, if so
downloading the new PRC-file to the handheld and .... yes, that's the
point -> use the
DatabaseHdrType - structure to build up the new application-version.
- how can you write a bitmap-area into a database, where each record is
just like
typedef struct {
char signid[SIGNID_LENGTH];
CharPtr sign;
} structSignature;
the only way which works is using the following code
static BitmapPtr hoGetSignatureBitmap( RectangleType* lpRect )
{
WinHandle lhWin;
Word lnError;
BitmapPtr lpBitmapPtr = NULL;
Word lnRowBytes, lnHeight;
// First, free the previous bitmap if it exists
if (gpSign)
{
MemPtrFree(gpSign);
gpSign = NULL;
}
// Create an offscreen window to copy the gadget to
lhWin = WinCreateOffscreenWindow(lpRect->extent.x -
lpRect->topLeft.x, lpRect->extent.y - lpRect- >topLeft.y,
screenFormat, &lnError );
if (!lnError)
{
// Copy the gadgets screen rectangle into the
new
window
WinCopyRectangle( NULL, lhWin, lpRect, 0, 0,
scrCopy
);
// Cache a couple of important bits of
information
lnRowBytes = lhWin->gDeviceP->rowBytes;
lnHeight = lhWin->gDeviceP->height;
// Now, allocate our bitmap and set all the
important bits of information.
lpBitmapPtr = MemPtrNew( sizeof(BitmapType) +
(lnRowBytes * lnHeight) );
if (lpBitmapPtr)
{
MemSet( lpBitmapPtr, sizeof(BitmapType)
+
(lnRowBytes * lnHeight), 0 );
lpBitmapPtr->width
= lhWin->gDeviceP->width;
lpBitmapPtr->height
=
lhWin->gDeviceP->height;
lpBitmapPtr->rowBytes
=
lhWin->gDeviceP->rowBytes;
lpBitmapPtr->pixelSize
=
lhWin->gDeviceP->pixelSize;
lpBitmapPtr->nextDepthOffset = NULL;
// CreateOffscreenWindow does not, by
default, create a compressed window
lpBitmapPtr->flags.compressed =
lhWin->gDeviceP->compressed;
// All bitmaps are version 1 bitmaps
without
a color table.
lpBitmapPtr->version
= 1;
lpBitmapPtr->flags.hasColorTable= 0;
// Move the offscreen bits into our
bitmap
MemMove( (Ptr)((ULong)(lpBitmapPtr) +
sizeof(BitmapType)),
lhWin->gDeviceP>baseAddr, lnRowBytes *
lnHeight);
}
// Delete the window that we created with
WinCreateOffscreenWindow
WinDeleteWindow( lhWin, false );
}
// Finally, return our bitmap
return lpBitmapPtr;
}
to copy the bitmap-area into a BitmapType-structure and then
Err addSign(void)
{
Word lnSignRec;
ULong lnSize;
VoidPtr lpRecPtr;
VoidHand lhRecHandle;
lnSignRec = DmNumRecords(gpDB_Sign);
lnSize = MemPtrSize( gpSign );
lhRecHandle = DmNewHandle( gpDB_Sign, lnSize +
SIGNID_LENGTH
- 1);
if (lhRecHandle)
{
lpRecPtr = MemHandleLock( lhRecHandle );
// gsSIGNid hat fixe L?nge SIGNID_LENGTH
ansonsten
mus hier auf
// diese L?nge normiert werden !!!
DmWrite( lpRecPtr, 0, gsSignId,
SIGNID_LENGTH-1);
DmWrite( lpRecPtr, SIGNID_LENGTH-1, gpSign,
lnSize
);
MemHandleUnlock( lhRecHandle );
// Now, attach the new record to the database
DmAttachRecord( gpDB_Sign, &lnSignRec,
lhRecHandle,
NULL );
}
if (gpSign)
{
MemPtrFree( gpSign );
gpSign = NULL;
}
gnSignSize = 0;
gbIsOC = false;
gsSignId[0]=0;
return 1;
}
attach the record to the database. We tried to do a MemMove
directly
into a record of the given structure above but after that the
bitmap was lost.
rgds.
Martin Hoppel
Bruck Trading Vienna