PnP TerrainCreator - Forum

The PnP TerrainCreator Forum
It is currently Sun Sep 24, 2017 4:50 am

All times are UTC




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: raw heightmap import
PostPosted: Thu Feb 08, 2007 1:04 am 
Offline

Joined: Tue Sep 26, 2006 10:18 pm
Posts: 142
Location: Northern California
If I build it, I get (in a build solution and a compile of AreaDisplayCtrl.cpp):

1>c:\documents and settings\art\my documents\user\pnpterraincreator\plugin sdk\samples\pnptcutils\controls\areadisplayctrl.cpp(4) : fatal error C1083: Cannot open include file: 'stdafx.h': No such file or directory

All other files compile ok. I attempted to figure this out, but ran out of ideas other than to recreate new copies of the .cpp and .h by hand. Or, maybe there is something simple I missed.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 08, 2007 10:38 am 
Offline
Programmierdochfix
User avatar

Joined: Tue Apr 27, 2004 12:53 pm
Posts: 891
Location: Braunschweig
Well, I had a few problems for reusing controls and dialogs across all plugins, without complicating everything by creating libs or dlls or something like that. Thats why I ended up putting several copies of the importareadialog into all projects that need it, because VS wouldn't let me share resources (multiple .rc and resource.h files) over multiple projects. Well different story....

To solve this one, simply add

Code:
#include <afxwin.h>


after

Code:
#pragma once


to the AreaDisplayCtrl.h file

and remove

Code:
#include "stdafx.h"


from the AreaDisplayCtrl.cpp file


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 08, 2007 5:22 pm 
Offline

Joined: Tue Sep 26, 2006 10:18 pm
Posts: 142
Location: Northern California
OK. That allowed the build to complete successfully. I did get: 1> WINVER not defined. Defaulting to 0x0502 (Windows Server 2003)

I have not played much with solution configurations, but couldn't you place the import area dialog in a common folder and then "add existing item" to the solution?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 08, 2007 8:52 pm 
Offline
Programmierdochfix
User avatar

Joined: Tue Apr 27, 2004 12:53 pm
Posts: 891
Location: Braunschweig
You can add

Code:
#ifndef WINVER
#if _MSC_VER >= 1300
#define WINVER 0x0500
#else
#define WINVER 0x0400
#endif
#endif


at the beginning of the AreaDisplayCtrl.cpp file, if you want to avoid this warning.

Yes, copying them to a common folder would be possible with the .cpp and .h files. But when I tried to use common resource files (.rc) for the dialog, VS made some funny things and nothing worked any more. Well, I haven't tried very hard to make these things work. Maybe I'll try again before releasing the next SDK version.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 08, 2007 11:19 pm 
Offline

Joined: Tue Sep 26, 2006 10:18 pm
Posts: 142
Location: Northern California
I added the code and got a clean build. Thanks.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron