I've been using Almond and Maunder'sDrawWireRects
function because I always like my programs to look cool. That function is great and all, however, to use it I need to overloadOnCreate
andOnDestroy
functions in EVERY dialog class which I want it to be effected, there are a few inconvenience on directly reusing theDrawWireRects
function:
It would be nice if there was an existing class that encapsulates all those necessary stuff, I could just derive my classes from it and it does all the dirty work for me. So that's where the
- If there are many (well, let's say 5) different kind of Dialog boxes I will be using in a project, each of which has to be a new class due to their different functionalities, then I need to overload
OnCreate
andOnDestroy
functions in every class and add some other members which are needed to complement the animation effect. Those will be quite a lot of duplicated code.- Other than animating the dialogs, I may also want to make some adjustment from time to time, for example, I want a dialog with class name of
CMyDialog
open from center and close towards its bottom-right corner, then a few minutes later I change my mind and want it close towards the system tray... anyway, I should be able to do those kind of stuff by simply using theDrawWireRects
, but quickly I'll find out size of MyDialog.cpp grows up rapidly, and so do other dialog classes in that project.CAniDialog
class came from.
An Animation-Style Dialog Class - CodeProject
No comments:
Post a Comment