CKeM

I'm afraid I'm missing something very simple, but after looking I can't find an answer.

All I want to do is to create a Win32 Console Application Windows Application. It won't let me.

I do New Project --> Win32 --> Win32 Console Application --> "the name" and then on the next page it blocks out my choice to select "Windows Application" and only gives me "Console Application" and "Static Library"

What do I have to do to be able to select Windows Application

Step1


Step2



Thanks everyone, and I apologize if I'm missing something simple here..

Ckem

PS I've tried unchecking "Empty Project" to see if it enables "Windows Application" but it doesn't...


Re: Visual C++ General Can't create windows application

Ramkrishna Pawar

Are you trying to create a Win32 application Then why dont you select New Project -> Win32 ->Win32 Project






Re: Visual C++ General Can't create windows application

CKeM

That's what I'm doing, but on the second step I want to select "Windows application" But it's grayed out.




Re: Visual C++ General Can't create windows application

Ramkrishna Pawar

Which version of Visual C++ are you using






Re: Visual C++ General Can't create windows application

Pintu Shukla

See i don't know what's the problem .but how to write a Win32 Console Application with Empty Project have a look .After Second screen i mean to say Empty Project Click on Finish Button and write your own class with yourself.

MyApp.h

Code Block

#include
class MyApp:public CWinApp
{
BOOL InitInstance();
};
MyApp a;

MyFrame.h

Code Block

#include
class MyFrame:public CFrameWnd
{
private:
CButton b[4];
public:
MyFrame();
int OnCreate(LPCREATESTRUCT lp);
DECLARE_MESSAGE_MAP()
};

MyApp.cpp

Code Block

#include "MyApp.h"
#include "MyFrame.h"
BOOL MyApp::InitInstance()
{
MyFrame *p;
p=new MyFrame;
m_pMainWnd =p;
p->ShowWindow(3);
return 1;
}

MyFrame.cpp

Code Block

#include "MyFrame.h"
#include "resource.h" // if u are uncluding some resource to your Project Like Menu etc

MyFrame::MyFrame()
{
Create(0,"Helo",WS_VISIBLE|WS_OVERLAPPEDWINDOW,rectDefault,this,MAKEINTRESOURCE(IDR_MENU1));
}

MyFrame::OnCreate(LPCREATESTRUCT lp)
{

//Create Button etc what ever you want
return 1;

}

BEGIN_MESSAGE_MAP(MyFrame,CFrameWnd)
ON_WM_CREATE()
END_MESSAGE_MAP()

Select MFC as a Shared DLL.

Run the project and this will work proper for you.

Thanx






Re: Visual C++ General Can't create windows application

CKeM

I'm using Visual C++ 2005 Express Edition. Version 8.0.50727.762. .NET Framework version 2.0.50727

Thanks everyone for your time.

PS Pintu Shukla I'll have to check and see if that code is compatable with what I'm trying to work towards. Thanks.




Re: Visual C++ General Can't create windows application

Simple Samples

In the New Project page under Visual Studio installed templates you should have one or more additional templates; at least one more. It is that other template that you need, but I can't help you any further figuring out how to fix it except one obvious possibility is to reinstall VS. I say obvious since you don't really need anyone else to suggest it.






Re: Visual C++ General Can't create windows application

CKeM

I found the answer in another forum. What I needed to do was follow the last step here (I didn't have these steps until now, so would have had no idea to do this):

http://msdn2.microsoft.com/en-us/express/aa700755.aspx

I had already installed the Platform SDK I just needed to edit the AppSettings.html file. And that's it.

Thanks everyone for your time. I really appreciate it.

Ckem




Re: Visual C++ General Can't create windows application

Simple Samples

You are using the express edition and you did not say so, correct Did you know that there are separate forums for thses questions

There is a forum for the express edition and they would have been more likely to know what the problem and solution is.

I don't recall any mention that this was the first use of VS after installation. There is a forum for VS setup and they would have been more likely to know what the problem and solution is.

It really helps for you to provide information such as that (express edition and setup problems) so you get answers as quickly as possible and so you get more complete answers and so no one else spends time posting messages that don't help you.