开发者

How do I get uncrustify to indent BEGIN_MESSAGE_MAP regions?

I'm trying to use uncrustify on a large inherited C++ codebase and I can't figure out how to get it to indent the following code segment like t开发者_Python百科he example here.

BEGIN_MSG_MAP(CMyDlg)
  MESSAGE_HANDLER(WM_TIMER, OnTimer)
  MESSAGE_HANDLER(WM_MOUSEMOVE, OnMouseMove)

  COMMAND_HANDLER(IDC_TABLE_BTN_ONE, BN_CLICKED, OnBnClickedBtnOne)
  COMMAND_HANDLER(IDC_TABLE_BTN_TWO, BN_CLICKED, OnBnClickedBtnTwo)

  CHAIN_MSG_MAP( CDlgBase )
END_MSG_MAP()

I've tried using the UniversalIndentGUI to generate my config file and then added the following two lines, but I must have something wrong.

macro-open BEGIN_MSG_MAP
macro-close END_MSG_MAP

Or should I be using Astyle instead of uncrustify?

Update: It works fine. I mistakenly typed "BEGIN_MESSAGE_MAP" which is a misspelling. I'll leave the question here, though, for others.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜