User (Legacy) Posted March 5, 2002 Report Share Posted March 5, 2002 Hi, I'm using ChartFX Client Server DLL version. I created chartfx window using code as follows: if (SUCCEEDED(CoGetClassObject(__uuidof(ChartFX),CLSCTX_INPROC_SERVER,NULL,IID_ IClassFactory2,(LPVOID FAR *) &pFactory2))) if (FAILED(pFactory2->CreateInstanceLic(NULL,NULL,__uuidof(IChartFX),g_sLicense String,(LPVOID FAR *) &m_pChartFX))) return 0; pFactory2->Release(); } m_pChartFX->CreateWnd(NULL,IDC_CHARTFX,200,200,500,500,WS_OVERLAPPEDWINDOW | WS_VISIBLE ); It works fine. But when I tried to create the chartfx as a child window (using WS_CHILD | WS_VISIBLE), I got runtime error. I can't figure out why. Any help will be appreciated. Danqing Link to comment Share on other sites More sharing options...
User (Legacy) Posted March 5, 2002 Author Report Share Posted March 5, 2002 With a valid parent window handle, the chartfx child window can be created. Although using WS_OVERLAPPEDWINDOW| WS_CHILD, the chartfx child window does not have a title and is not moveable. Don't know why. Any idea about the problem? "Danqing" <dhu@chemimage.com> wrote in message news:sU$wVoHxBHA.2644@webserver1.softwarefx.com... > Hi, > > I'm using ChartFX Client Server DLL version. I created chartfx window using > code as follows: > if > (SUCCEEDED(CoGetClassObject(__uuidof(ChartFX),CLSCTX_INPROC_SERVER,NULL,IID_ > IClassFactory2,(LPVOID FAR *) &pFactory2))) > > if > (FAILED(pFactory2->CreateInstanceLic(NULL,NULL,__uuidof(IChartFX),g_sLicense > String,(LPVOID FAR *) &m_pChartFX))) > return 0; > pFactory2->Release(); > } > m_pChartFX->CreateWnd(NULL,IDC_CHARTFX,200,200,500,500,WS_OVERLAPPEDWINDOW > | WS_VISIBLE ); > > It works fine. But when I tried to create the chartfx as a child window > (using WS_CHILD | WS_VISIBLE), I got runtime error. I can't figure out why. > > Any help will be appreciated. > > > Danqing > > Link to comment Share on other sites More sharing options...
Software FX Posted March 6, 2002 Report Share Posted March 6, 2002 A child window can not be moveable. The combination WS_OVERLAPPEDWINDOW | WS_CHILD is invalid. You either have it as child or as overlapped (any windows not just the chart). -- FP Software FX, Inc. Link to comment Share on other sites More sharing options...
User (Legacy) Posted March 6, 2002 Author Report Share Posted March 6, 2002 Thanks. I have it as overlapped window. When I minimize this window, its minimized icon goes to the bottom of the screen rather than the bottom of the application main window. Is there anyway I can set this overlapped chartfx window so that this winodw won't go outside of the application main window? Any help will be appreciated. "SoftwareFX Support" <support@softwarefx.com> wrote in message news:il7ZylTxBHA.1412@webserver1.softwarefx.com... > A child window can not be moveable. The combination WS_OVERLAPPEDWINDOW | > WS_CHILD is invalid. > > You either have it as child or as overlapped (any windows not just the > chart). > > -- > FP > Software FX, Inc. > > Link to comment Share on other sites More sharing options...
Software FX Posted March 7, 2002 Report Share Posted March 7, 2002 The only way is to create an MDI child window. The chart itself can not be an MDI child window so you will have to create a "container" for the chart that is the MDI child window and the chart is simply a child of that window. Confusing ? I know ! But I hope you understand. MDI is supported in MFC. You can check MSDN for more Info on MDI apps. Once you figure out how to create an MDI child, its only a matter of creating the chart inside of it as a child and resize the chart every time the MDI child is resized. -- FP Software FX, Inc. Link to comment Share on other sites More sharing options...
User (Legacy) Posted March 7, 2002 Author Report Share Posted March 7, 2002 Thanks a lot, I got the idea. Unfortunately, I can't use MDI child window in my case. "SoftwareFX Support" <support@softwarefx.com> wrote in message news:7pG1ZjfxBHA.2652@webserver1.softwarefx.com... > The only way is to create an MDI child window. The chart itself can not be > an MDI child window so you will have to create a "container" for the chart > that is the MDI child window and the chart is simply a child of that window. > > Confusing ? I know ! But I hope you understand. > > MDI is supported in MFC. You can check MSDN for more Info on MDI apps. Once > you figure out how to create an MDI child, its only a matter of creating the > chart inside of it as a child and resize the chart every time the MDI child > is resized. > > > -- > FP > Software FX, Inc. > > Link to comment Share on other sites More sharing options...
Software FX Posted March 7, 2002 Report Share Posted March 7, 2002 Only MDI Child windows will be minimized inside a workspace. All other windows will be minimized in the taskbar (outside). -- FP Software FX, Inc. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.