Why should I use DECLARE_DYNAMIC instead of DECLARE_DYNCREATE?

前端 未结 2 907
日久生厌
日久生厌 2020-12-21 01:41

DECLARE_DYNCREATE provides exactly the same feature of DECLARE_DYNAMIC along with its dynamic object creation ability. Then why should anyone use DECLARE_DYNAMIC instead of

2条回答
  •  情书的邮戳
    2020-12-21 02:20

    You're asking "why buy a Phillips screwdriver when I own a flathead?" The answer is that you should use the tool that suits your needs: if you need to drive only flathead screws, don't buy a Phillips driver. Otherwise, buy one.

    If you need the features provided by DECLARE_DYNCREATE (e.g. because you're creating a view that's auto-created by the framework when a document is opened) then you should use DECLARE_DYNCREATE and if you don't and DECLARE_DYNAMIC works, you should use it.

提交回复
热议问题