View Full Version : c++ compiler error
RobRoy
November 14th, 2002, 10:11 PM
1- CWMSetting theDlg;
2- theDlg.SetParent(this);
3- theDlg.DoModal();
I got the error :
error C2664: 'SetParent' : cannot convert parameter 1 from 'class CGen_uirApp *const ' to 'class CWnd *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
What is my problem?
Ron
November 14th, 2002, 11:17 PM
Oh my,.. you are using the MFC :-) I wresteled with that problem for a short while too. I'd advise you to take a look at Mark's plugins, he has been so kind to release the source code ( see the developers page ). I learned a lot from the way he did this.
I think I used popup OSD as a reference.
Basically he changed the Create ( if i remember correctly ) to accept the App object instead of the CWnd parent.
RobRoy
November 15th, 2002, 06:00 AM
I start this week doing my plugin and I'm using one of Mark's plugin the serial.... as example. Just after I send my message I found a way to solve my problem in Mark's plugin.
But I still have a probleme when a press the setting button who call the config function my windows don't want to show up. If you have any advice for that to let me know.
Thank!
Ron
November 15th, 2002, 08:02 AM
Make sure that you are running your windows in a separate thread. You are not allowed to use the Girder thread for this. ( cause it don't work ;-) )
RobRoy
November 15th, 2002, 08:20 AM
How can I make sure that I'm running my windows in a separate thread?
Thank
Ron
November 15th, 2002, 09:22 AM
Take a look at Mark's example.
Powered by vBulletin® Version 4.1.8 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.