Hi
Have anyone know how to use Progress Manager correctly?
I have try to call progress manager to show some progress information,
the dialog box show correctly, and the icon changed correctly, but I can't make the
message show correctly,
the following is what my code, how can I do to make the messsages show correctly?
Thanks in advance! :)
static Boolean ProgF(PrgCallbackDataPtr cbP)
{
CharPtr header;
Handle headerH;
headerH = DmGetResource(strRsc, SearchingString);
header = MemHandleLock(headerH);
cbP->textP = header; // to show message
// StrCat(cbP->textP, cbP->message);
cbP->bitmapId = 2200 + (cbP->stage % 8); // make the icon be changed
cbP->textChanged = true;
MemHandleUnlock(headerH);
DmReleaseResource(headerH);
return true;
}
UInt GetBriefCustom(QUERYSTATE *qs)
{
UInt row = 0, count;
long sqlcode;
QUERYLIST *QueryList;
ProgressPtr prgP;
char tempStr[4];
prgP = PrgStartDialogV10("Searching...", ProgF);
PrgUpdateDialog(prgP, 0, 0, tempStr, true);
PrgHandleEvent(prgP, NULL);
count = GetCustomerCount(qs);
MemHandleResize(CusQueryListH, sizeof(QUERYLIST) * count);
QueryList = MemHandleLock(CusQueryListH);
MemSet(QueryList, MemHandleSize(CusQueryListH), 0);
sqlcode = OpenCustomerCursor(qs);
do
{
sqlcode = GetCustomerBrief(QueryList, row);
row++;
StrIToA(tempStr, ((int)(row * 100)/ count));
PrgUpdateDialog(prgP, 0, row, tempStr, true);
PrgHandleEvent(prgP, NULL);
}while(sqlcode == 0);
CloseCustomerCursor();
PrgStopDialog(prgP, true);
MemHandleUnlock(CusQueryListH);
return count;
}
=========================================
DFF Inc.
Dean Chang
Software Engineer
Tel: +886-6-2975428 FAX:+886-6-2974330
E-Mail: [EMAIL PROTECTED]
h�)ߢ���*'�{��x-��ږ`�h��Ţ�������칻�&ަW���zm����
Z�j,r��u����!�˩�����+�k?