⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ltweight.h

📁 Window Wrapper for WinCE Win32 "Hello World" a
💻 H
字号:
//***************************************************************************
//  LtWeight.h
//***************************************************************************

#if !defined(AFX_LTWEIGHT_H__FA718A27_5CF0_495F_AA73_647E2A616636__INCLUDED_)
#define AFX_LTWEIGHT_H__FA718A27_5CF0_495F_AA73_647E2A616636__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "resource.h"

#define MENU_HEIGHT 26

// Getting and Setting WindowLong: default is GWL_USERDATA
template <class T>
inline T WinGetLong( HWND hwnd, int which = GWL_USERDATA )
{
   return reinterpret_cast<T> ( ::GetWindowLong( hwnd, which ) );
}


class CBaseWindow
{
public:
   CBaseWindow(){hInst=0;}
   ~CBaseWindow(){}

   HWND              hWnd;                // The main window handle
   BOOL              DlgFlag;             // True if object is a dialog window

   static LRESULT CALLBACK BaseWndProc( HWND hwnd, UINT msg,
                                        WPARAM wParam, LPARAM lParam );

protected:

   HINSTANCE         hInst;               // The current instance
   HWND              hwndCB;              // The command bar handle

   HINSTANCE         GetInstance () const { return hInst; }
   virtual LRESULT   WndProc( HWND hwnd, UINT msg,
                              WPARAM wParam, LPARAM lParam,
                              PBOOL pbProcessed ){*pbProcessed = FALSE; return NULL;}
};


class CMainWindow : public CBaseWindow
{
public:
   CMainWindow(){}
   ~CMainWindow(){}

   BOOL InitInstance( HINSTANCE hInstance, int nCmdShow );

protected:
   HWND              CreateRpCommandBar( HWND );
   ATOM              MyRegisterClass( HINSTANCE, LPTSTR );

   virtual LRESULT   WndProc( HWND hwnd, UINT msg,
                              WPARAM wParam, LPARAM lParam,
                              PBOOL pbProcessed );
};


class CAboutWindow : public CBaseWindow
{
public:
   CAboutWindow(){}
   ~CAboutWindow(){}

protected:
   virtual LRESULT   WndProc( HWND hwnd, UINT msg,
                              WPARAM wParam, LPARAM lParam,
                              PBOOL pbProcessed );
};

#endif // !defined(AFX_LTWEIGHT_H__FA718A27_5CF0_495F_AA73_647E2A616636__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -