Sign in to follow this  
Koolchamp

VC++ 2005 Express Problem - Platform SDK Install

Recommended Posts

I've downloaded and installed the Platform SDK and create the directories. Ive also edited the corewin_express file. (the file they tell to to edit, has a different name, corewin_express.vsprops, but I couldn't find it). Now when I try to create a project with a Windows Forms Application, I get this problem: A norton antivirus pop up comes us and says: Malicious script detected High Risk Your computer is halted and needs to do someting about this script: Details: Object FileSystem Object Activity GetSpecialFolder File VCExpress.exe Then in a dropdown box it give me a bunch of options. K either I have done something wrong, or I have done something wrong. If anyone can help, I would appriciate it. Thanks EDIT: Forgot to mention that it is the SDK platform that makes it so you can make Windows Forms Application programs.

Share this post


Link to post
Share on other sites
Firstly I'll just check that you were following these instructions provided by Microsoft?


Did you look in the listed location for the corewin_express.vsprops file?
Quote:
Step 4: Update the corewin_express.vsprops file.

One more step is needed to make the Win32 template work in Visual C++ Express. You need to edit the corewin_express.vsprops file (found in C:\Program Files\Microsoft Visual Studio 8\VC\VCProjectDefaults)


If not, where was the file you did edit located?
If everything above checks out, take another look at the edits you made to be sure they're correct.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by Koolchamp
EDIT: Forgot to mention that it is the SDK platform that makes it so you can make Windows Forms Application programs.


If all you want do it make WinForms applications then you do NOT need the platform sdk. WinForms is part of the .NET class library.

Share this post


Link to post
Share on other sites
Quote:
Original post by Koolchamp
Then what is all this talk about needing the platform SDK to create a Win32 Form Apps in Visual C++ 2005 Express?
You need the Platform SDK to make plain Win32 apps.

Share this post


Link to post
Share on other sites
I am not sure why norton is flagging VSExpress.exe as a malicious script, but with regards to the steps you followed when installing the platform sdk you may have inadvertantly changed the corewin_express file extension.

You say you couldn't find "corewin_express.vsprops" but you could find "corewin_express". These files are undoubtedly one and the same but the ".vsprops" might not displayed be as a result of you "hiding extensions for known file types" when using windows explorer. If you open My Computer, then click on "Tools", then "Folder Options..". In the "View" tab uncheck the box for "Hide extensions for known file types". Then go back to your "C:\Program Files\Microsoft Visual Studio 8\VC\VCProjectDefaults\" folder and make sure the corewin_express file has the file extension ".vsprops"

Hope this helps,
ViLiO

Share this post


Link to post
Share on other sites
Win32 != WinForms.

Win32 is the 'oldschool' approach to Windows application development. It uses a C-based API and large chunks of it have been around since Windows 95.

WinForms is a new tech, part of the .NET platform, that is much easier to use for Windows UI development than Win32.

Also, have you considered simply telling Norton to ignore it or turning it off while you try it out?

Share this post


Link to post
Share on other sites
A win32 app usually means a native win32 application. Native means it is compiled using your machines instruction set. .NET code on the otherhand is compiled to an intermediate language which is why C++.NET compiled code will be almost identical to C#.NET or VB.NET compiled code. This IL code is then translated / compiled on the fly to native instructions.

If you want to use windows forms and framework class library that comes with .NET then you don't need the Platform SDK. However, if you want to write apps that don't bother about .NET framework library then you need the Platform SDK. This contains all the header files and library files needed to make GUI applications.


* Have you tried fiddling with Norton. Maybe you could switch off the script warnings.

Share this post


Link to post
Share on other sites
Well I messed around with Norton, and it finally shut up. Thanks to all of you who helped, but now im confused a bit.

In my book, "C++ Programming for the Absolute Beginner", it says that I need to make a Win32 C++ App, so that I can use DirectX. Can I also use DirectX or some other...thing (haven't read to much on that stuff), that lets me display 2D artwork, in a Windows Form Applications?

...looks like I still have alot more to learn. I hope my question makes sence.

Share this post


Link to post
Share on other sites
You might know this already but you dont need DirectX to display 2D artwork
in a windows form application.

One of the components in the forms app is called PictureBox.
The PictureBox has a function called Load that should be able to load and display a image from disk.

If you want to make an application with window forms and DirectX accellerated 2D graphics, that is possible, but not the easiest way to start out.
I dont have much experience doing that myself (since I havent touched the forms applications yet).

The most common way to start out is to install DirectX SDK, create a win32 application (without the forms stuff), create a main window, and use directx to render graphics in that.

Or to install both DirectX SDK and SDL, and follow a tutorial like this one

The resources page here on GDNet has some good tutorials, and google will give you even more.

What tools and libraries to use depends on what kind of application you are going to write, so more info about that would help

Share this post


Link to post
Share on other sites
pulpfist:

I get what you saying and I thank you. Ive ran into a problem creating a Win32 app though. When I try to make one, it can't find the <windows.h> file. I've been looking on the net about it, and im either hearing: A) you can't make those kinda of projects or B) the SDK gives it to you (if it does, then I think there is a problem with my directories...I think). Any Ideas anyone?

...Da** I have alot of problems don't I?

Share this post


Link to post
Share on other sites
Pretty much the same problems I had ^^

Did you create the projcte like this?

New -> Project -> Win32 -> Win32 Console Application -> [OK] -> Application Settings.
Then check the Windows application checkbox, and the Empty project checkbox.

If you miss any of the options mentioned above, chances are you didnt do
this

Share this post


Link to post
Share on other sites
No I did do all that.

EDIT: I think I found the problem. Whan I try to create a Win32 app, its looking in the directory: C:\Program Files\Microsoft Visual Studio 8\VC\include.

But, all the win header files seem to be in the directory: C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include


Do, do I just copy all the header files into: C:\Program Files\Microsoft Visual Studio 8\VC\include, or do I switch which directory it looks in? (if so, how?)

Share this post


Link to post
Share on other sites
If you did create the project exactly the way I mentioned above, and you still get the "cant find windows.h" file. You should double check that you did step 3, 4 and 5 (in that link)

The directories in step 3 is under Tool -> Options ->Projects and Solutions -> VC++ Directories (Note the drop down list in the upper right corner there)

If you still have problems, I realy not sure what it could be...

Share this post


Link to post
Share on other sites
Hang on a sec... DONT copy the files.
Stuff like that is configured under Tool -> Options ->Projects and Solutions -> VC++ Directories

edit:
Yes you need to add "C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include" to the list of include directories, and
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib to the list of library files

Share this post


Link to post
Share on other sites
dam***, its till being stuborn. I put in this code:

#include <windows.h>

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
{
MessageBox(NULL, "Goodbye, cruel world!", "Note", MB_OK);
return 0;
}

small and simple, but I still get an error:

visual studio 2005\projects\mygodwhenwillitend\mygodwhenwillitend\file1.cpp(6) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [22]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast.


Any idea what im doing wrong now?

EDIT: Wait...this is C (I actually read the page this time). I don't know C, I only know C++

Share this post


Link to post
Share on other sites
Yea there is 2 ways to fix that:

1.
Go to Project -> xxx properties -> Configuration properties -> General
And set Character Set = Not set

2.
Change "Goodbye, cruel world!" to TEXT("Goodbye, cruel world!")

The problem is that windows expect strings to be so called wide character strings by default. The first option will turn that off for the current project.
The second option uses the TEXT macro to convert the string to wide character string

edit: Dont worry about the last error message. Its miss-leading

Share this post


Link to post
Share on other sites
Quote:
Original post by pulpfist
Suddenly you go quiet :D
I guess we finally nailed it...


I think that was his suicide note [grin]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this