As it seems to me, I found a more correct solution. As noted in another thread, the problem is that mLayoutFunc is called later than other functions,
therefore IControl objects are not initialized. I tried to initialize them before mLayoutFunc, and in mLayoutFunc only use AttachControl. Everything works fine.
|