Re: Array of custom controls
"Bill" <billa-l3pLR9/iSOgztatW0fm/[email protected]> Wed, 01 Jun 2011 23:48:18 -0000
| Newsgroups | gmane.comp.windows.wtl |
|---|---|
| Message-ID | <[email protected]> |
What makes CWindowImpl not copyable? The thunking that goes on? --- In [email protected], Igor Tandetnik <itandetnik@...> wrote: > > On 6/1/2011 6:11 PM, Bill wrote: > > I need to make an dynamic array of custom controls subclassed from > > CStatic in a dialog. I have tried using CAtlArray but after the > > controls are created and the dialog begins running, there is an > > exception in CWindowImplBaseT::WindowProc. If I create the array > > using CStatic controls, it works. > > CAtlArray wants its elements to be copyable. CStatic is not derived from > CWindowImpl, just from CWindow, and thus is copyable. Your class is > derived from CWindowImpl, and thus is not copyable. So you can't put it > into CAtlArray by value. > > Allocate them on the heap, store pointers in CAtlArray.-- > Igor Tandetnik > ------------------------------------ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/wtl/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/wtl/join (Yahoo! ID required) <*> To change settings via email: [email protected] [email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/