Monday, 4 April 2016

Lab: 8 Write a Visual Basic C++ Program to create & load simple menu in a window

#include<afxwin.h>
#include"resource.h"

class myframe:public CFrameWnd
{
public:
myframe()
{
Create(NULL,"Menu Program",WS_OVERLAPPEDWINDOW,rectDefault,0,MAKEINTRESOURCE(IDR_MENU1));
}
};

class myapp:public CWinApp
{
public:
BOOL InitInstance()
{
myframe *bwnd;
bwnd=new myframe();
bwnd->ShowWindow(1);
m_pMainWnd=bwnd;
return 1;
}
};
myapp a; 

No comments:

Post a Comment