Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Good Morning every one,

rigth now I'm working on a project where I have to use GDPicture to display images.
This GDPicture lib includes some olecontrols to do this stuff for me and rigth now it is very simple but I have to extend our program an add a thumbnailviewer to this view we build.

In order to do that I thougth it couldn't be so hard to use a CSplitterWnd and just place on the left side the olecontrol for the thumbnail viewer and on the rigth side the viewer.

I tried a bit with dialogs and CFrameView classes but when I override the create method and place the controle with "CreateControl" in this CFrameView I always get an assert message displayed at this point:

(winsplit.cpp line 318,CreateView)
C++
ASSERT((int)_AfxGetDlgCtrlID(pWnd->m_hWnd) == IdFromRowCol(row, col));


Basically I just do this

(CThumbnailChild is a child of CFormView)
C++
BOOL CThumbnailChild::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext)
{
 return CreateControl(GdPicture_NET_9::CLSID_GdViewer, lpszWindowName, dwStyle, rect, pParentWnd, nID);
}


The Dialog Settings are:
Border: NONE
Style: Child
Control: true


At rest the default settings apply


Long story short I just need to place two olecontrols , thumbnailviewer and the picture viewer in a CSplitterWnd.

Many thanks for your help, I hope you understand my problem

greetings
Posted
Updated 22-Jan-15 22:41pm
v2

1 solution

A possible solution is to copy the MFC code of the function into your project and modify that it runs.
 
Share this answer
 
Comments
ThreeCheers 23-Jan-15 9:53am    
I'm not quite sure what do you mean. Do you suggest that I copy the Windowssource code from winsplit.cpp and ,for example, just remove this assert line so every thing works without any failure message?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900