diff --git a/src/msw/headerctrl.cpp b/src/msw/headerctrl.cpp index e60b1bbc1b..d351d6ca62 100644 --- a/src/msw/headerctrl.cpp +++ b/src/msw/headerctrl.cpp @@ -295,7 +295,8 @@ bool wxHeaderCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) wxEventType evtType = wxEVT_NULL; int idx = nmhdr->iItem; int width = 0; - switch ( const UINT code = nmhdr->hdr.code ) + const UINT code = nmhdr->hdr.code; + switch ( code ) { // click events // ------------