How to convert a non-mfc multithreading vc++6.0 win32sdk program to a mfc one ?
-
Hi, guys: How to convert a non-mfc multithreading vc++6.0 win32sdk program to a mfc one ? Any suggestion/advice is much appreciated. TIA :confused:
-
Hi, guys: How to convert a non-mfc multithreading vc++6.0 win32sdk program to a mfc one ? Any suggestion/advice is much appreciated. TIA :confused:
WHy would you want to do that ? Code in win32 is better than MFC IMHO. Hari Krishnan
-
WHy would you want to do that ? Code in win32 is better than MFC IMHO. Hari Krishnan
I have to convert my program to an ocx. And I've got that it's very difficult to implement it from a win32 one. Somebody told me it's a little easier to do that from a mfc one. Am I right or wrong ? Any advice ?
-
I have to convert my program to an ocx. And I've got that it's very difficult to implement it from a win32 one. Somebody told me it's a little easier to do that from a mfc one. Am I right or wrong ? Any advice ?
If it's a standalone windows program like SDI/MDI/or Dialog: solution maybe very easy: Just create standard MFC COleControl application: 1. Overload OnCreateWindow -- add to it creation of your main Win32 SDI/MDI/Dialog frame or window; immediately after that call SetParent on it so your Control Window will becomw parent of it -- also you may need to change style of your Win32 window to WS_CHILD -- remeber m_hWnd32 handler to your SDI/MDI/Dialog frame here in one of member variables; 2. Overload OnSize of your COleControl and resize your m_hWnd32 here to occupy all available space of COleControl; 3. Remove message pump from the original code of your application -- you are running on message pump of container now; 4. Add PreTranslateMessage to you COleControl and perform appropriate calls to your win32 app returning true/false if appropriate... Regards "...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..." Me
-
If it's a standalone windows program like SDI/MDI/or Dialog: solution maybe very easy: Just create standard MFC COleControl application: 1. Overload OnCreateWindow -- add to it creation of your main Win32 SDI/MDI/Dialog frame or window; immediately after that call SetParent on it so your Control Window will becomw parent of it -- also you may need to change style of your Win32 window to WS_CHILD -- remeber m_hWnd32 handler to your SDI/MDI/Dialog frame here in one of member variables; 2. Overload OnSize of your COleControl and resize your m_hWnd32 here to occupy all available space of COleControl; 3. Remove message pump from the original code of your application -- you are running on message pump of container now; 4. Add PreTranslateMessage to you COleControl and perform appropriate calls to your win32 app returning true/false if appropriate... Regards "...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..." Me
Thanks for your kind and clear direction. But my program is not a simple SDI/MDI/Dialog one, instead, something more complex. Does your solution fit this ? Thank you very much !
-
Thanks for your kind and clear direction. But my program is not a simple SDI/MDI/Dialog one, instead, something more complex. Does your solution fit this ? Thank you very much !
-
No...;P "...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..." Me
What a pity! Are there any other ways in which I can finish my task ? Thanks a lot for your help anyway!
-
What a pity! Are there any other ways in which I can finish my task ? Thanks a lot for your help anyway!
-
Instead of using MFC, why not consider ATL. Yes, writing a control is not necessarily easy, but instead of bloating your control by using MFC, ATL will take much of the pain away... Steve S [This signature space available for rent]
convert my program to a MFC one then convert the MFC one to an ocx. He also told me the first step need only minor change on source and the latter is also not very difficult. Time is so limited though I'm not familiar with VC++... Can you give me some further help? Thank you very much !