Posts

Post not yet marked as solved
0 Replies
291 Views
Hi. The following code creates and initialises a simple progress bar. How would I add a callback to update the progress bar ? float prog = 0.5;     CFNumberRef cfNum = CFNumberCreate(kCFAllocatorDefault,kCFNumberFloatType, &prog);     const void* keys[] = { kCFUserNotificationAlertHeaderKey, kCFUserNotificationProgressIndicatorValueKey };      const void* vals[] = { CFSTR("Progress Bar"), cfNum};          CFDictionaryRef dict = CFDictionaryCreate(0, keys, vals,                     sizeof(keys)/sizeof(*keys),                     &kCFTypeDictionaryKeyCallBacks,                     &kCFTypeDictionaryValueCallBacks);           CFUserNotificationRef pDlg = NULL;      pDlg = CFUserNotificationCreate(kCFAllocatorDefault, 0,                          kCFUserNotificationPlainAlertLevel,                          &nRes, dict);
Posted
by zcream.
Last updated
.