Chào các bạn! Vì nhiều lý do từ nay Truyen2U chính thức đổi tên là Truyen247.Pro. Mong các bạn tiếp tục ủng hộ truy cập tên miền mới này nhé! Mãi yêu... ♥

iconcursor

/* Vi?t chuong trình s? d?ng tài nguyên IDR_MENU1, IDI_ICON1, IDC_CURSOR1 */

#define IDI_ICON                      101

#define IDC_CURSOR                      102

#define _APS_NEXT_RESOURCE_VALUE        103

#define _APS_NEXT_COMMAND_VALUE         40001

#define _APS_NEXT_CONTROL_VALUE         1000

#define _APS_NEXT_SYMED_VALUE           101

#include "resource.h"

IDI_ICON        ICON    DISCARDABLE        "icon1.ico"

IDC_CURSOR    CURSOR    DISCARDABLE            "cursor1.cur"

#include<afxwin.h>

#include"resource.h"

class CMyApp:public CWinApp

{

public:

    BOOL InitInstance();

};

CMyApp theApp;

//khai bao lop cua so

class CMyWin:public CFrameWnd

{

    public:

        CMyWin();

};

//xay dung ham tao cua lop cua so

CMyWin::CMyWin()

{

    //tao ra cua so

    HICON        a=theApp.LoadIcon(IDI_ICON);

    HCURSOR        b=theApp.LoadCursor(IDC_CURSOR);

    HBRUSH        c=(HBRUSH)GetStockObject(GRAY_BRUSH);

    LPCSTR        d=AfxRegisterWndClass(NULL, b, c, a);

    Create(d,"Nguyen Dai Duong");

}

//xay dung ham khoi tao ung dung

BOOL CMyApp::InitInstance()

{

    m_pMainWnd=new CMyWin();//tao ra 1 cua so

    m_pMainWnd->ShowWindow(2);//dat che do hien thi

    m_pMainWnd->UpdateWindow();//ve cua so ra

    return TRUE;

}

Bạn đang đọc truyện trên: Truyen247.Pro

Tags: