- (*m_labels)[n] = ::CreateWindow
- (
- wxT("STATIC"),
- NULL,
- WS_CHILD | WS_VISIBLE | SS_CENTER,
- 0, 0, 0, 0,
- hwndParent,
- (HMENU)NewControlId(),
- wxGetInstance(),
- NULL
- );
+ wxWindowIDRef lblid = NewControlId();
+
+ HWND wnd = ::CreateWindow
+ (
+ wxT("STATIC"),
+ NULL,
+ WS_CHILD | WS_VISIBLE | SS_CENTER,
+ 0, 0, 0, 0,
+ hwndParent,
+ (HMENU)wxUIntToPtr(lblid.GetValue()),
+ wxGetInstance(),
+ NULL
+ );
+
+ m_labels->Set(n, wnd, lblid);