View Full Version : c++ compiler error
November 15th, 2002, 12:11 AM
1- CWMSetting theDlg;
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?
November 15th, 2002, 01:17 AM
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.
November 15th, 2002, 08: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.
November 15th, 2002, 10: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 ;-) )
November 15th, 2002, 10:20 AM
How can I make sure that I'm running my windows in a separate thread?
November 15th, 2002, 11:22 AM
Take a look at Mark's example.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.