Sure… sorta. The dialog itself can be generated in PhAB. The event itself is a little trickier, but basically drop a timer on your base window and check for the event in the timer’s activate callback. When the event happens call ApCreateModule(). In PhAB, make sure you create a link (Project → Internal Links) to define the location & setup function.
In PhAB, create dialog and it’s internal link, and create a timer on the base window.
In code, watch for the event in the timer callback and call ApCreateModule().
I’ve modified your solution a little. Instead of having a timer cicle every x seconds, I’ve setup signal handlers that receive signals when a pop-up is required. Signal hanlders work great, but I’m crashing when I call ApCreateModule (ABM_Stuff, NULL, NULL). It sucks because the debugger doesn’t seem to be able to step through the signal handler.
Ah well, can’t have all I want I guess. I’ll keep on working on this signal stuff, but if I start running around in circles, I may just use a timer afterall!
In that case you don’t need the putc() because fclose will flush it for you.
Hey Mitch, lol! I jumped on the occasion to mention puts, because I recently wrote some benchmark program to evaluate performance of printf, sprintf, puts and their C++ counter part cout, strstream stringstream.
I was amazed to see that puts was almost 10 times faster then printf. That’s understandable because puts doesn’t have to parse the string to look for format (%…).
I was also surprised to see that cout was also faster the printf ( almost as fast a puts ) and for the same reason; no parsing. It however makes the code bigger, each value use in the cout expression results in a call.
strstream, stringstream also proved much faster then sprintf even if they perform memory allocation.