I have to add a activex control into the project use doc/view, and the control must hide, so I want to use it as object or class, so I have to dymanic create it, the class wizard generate a class named like CSampleControl, and the interface of the control was generated as class' member function. I use the "new" operator create a control' instanse, when I use create function to create the control, the env throw exception and dump, so how can I do? eg. CSampleControl* control; control = new CSampleControl(); control->Create( "", "", WS_CHILD, this, 1000 );
ladder
Posts
-
how to use control -
how to use controlI have to add a activex control into the project use doc/view, and the control must hide, so I want to use it as object or class, so I have to dymanic create it, the class wizard generate a class named like CSampleControl, and the interface of the control was generated as class' member function. I use the "new" operator create a control' instanse, when I use create function to create the control, the env throw exception and dump, so how can I do? eg. CSampleControl* control; control = new CSampleControl(); control->Create( "", "", WS_CHILD, this, 1000 );
-
how to use controlI have to add a activex control into the project use doc/view, and the control must hide, so I want to use it as object or class, so I have to dymanic create it, the class wizard generate a class named like CSampleControl, and the interface of the control was generated as class' member function. I use the "new" operator create a control' instanse, when I use create function to create the control, the env throw exception and dump, so how can I do? eg. CSampleControl* control; control = new CSampleControl(); control->Create( "", "", WS_CHILD, this, 1000 );
-
how to use controlI have to use a control in doc/view mode, and I want to use the Create function to create a control's instanse, not in the dialog window mode, so I use the "add to projects\components and controls" menu add the control to the project, how can I use the Create function to create the control?
-
Windows' HandleThanks. Please tell me which section show this message in MSDN.
-
Windows' HandleHow many Handle can be create or open in Windows system? Same as how many file or socket can be open in Windows system? Thanks.
-
CPropertySheet & CPropertyPagePerfectly, Thanks.
-
CPropertySheet & CPropertyPageIn MSDN, the Method "AddPage"'s describe, MS told us "AddPage adds the CPropertyPage object to the CPropertySheet object’s list of pages but does not actually create the window for the page. The framework postpones creation of the window for the page until the user selects that page.", so if I don't click the page, the page's member can not be accessed or make a exception. But if I click the page, the "OnInitDialog" will be executed, so I can access the page's member when the sheet destory. so I need initialze the all pages when the sheet be shown, the all pages's "OnInitDialog" will be executed.
-
CPropertySheet & CPropertyPage1. In MSDN, the disactive Page not initialize if you not click it, how can I initialize all page when the sheet is shown? 2. When I use the function "UpdateDialogControls" in a CPropertyPage, in Debug mode, it works perfectly, but in release mode, some warning will be shown, and the applications will destory, why?