wince±³¹âµ÷½Ú VC´úÂëcÎļþ
// backlightDlg.cpp : implementation file
//
#include "stdafx.h"
#include "backlight.h"
#include "backlightDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CbacklightDlg dialog
CbacklightDlg::CbacklightDlg(CWnd* pParent /*=NULL*/)
: CDialog(CbacklightDlg::IDD, pParent)
{
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}
void CbacklightDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Control(pDX, IDC_SLIDER1, m_slider);
DDX_Control(pDX, IDC_EDIT1, m_edit);
}
BEGIN_MESSAGE_MAP(CbacklightDlg, CDialog)
#if defined(_DEVICE_RESOLUTION_AWARE) && !defined(WIN32_PLATFORM_WFSP)
ON_WM_SIZE()
#endif
//}}AFX_MSG_MAP
ON_WM_HSCROLL()
END_MESSAGE_MAP()
// CbacklightDlg message handlers
BOOL CbacklightDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
// TODO: Add extra initialization here
m_slider.SetRange(0,30,TRUE);
m_slider.SetPos(16);
m_edit.SetWindowTextW(_T("16"));
return TRUE; // return TRUE unless you set the focus to a control
}
#if defined(_DEVICE_RESOLUTION_AWARE) && !defined(WIN32_PLATFORM_WFSP)
void CbacklightDlg::OnSize(UINT /*nType*/, int /*cx*/, int /*cy*/)
{
if (AfxIsDRAEnabled())
{
DRA::RelayoutDialog(
AfxGetResourceHandle(),
this->m_hWnd,
DRA::GetDisplayMode() != DRA::Portrait ?
MAKEINTRESOURCE(IDD_BACKLIGHT_DIALOG_WIDE) :
MAKEINTRESOURCE(IDD_BACKLIGHT_DIALOG));
}
}
#endif
void CbacklightDlg::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
{
// TODO: Add your
Ïà¹ØÎĵµ£º
const£¬c\c++Öзdz£³£ÓõĹؼü×Ö¡£
Ê×ÏÈÎÒÃÇ¿´¿´constÓÐÄÇЩÐÞÊη½·¨¡£
×îÇ°ÃæÎÒÃÇÀ´¿´Ò»¸öÎÊÌâ¡£
char *p = "123";
¿ÉÄÜÓеÄÈ˲»ÖªµÀ£¬ÕâÀïµÄÕâ¸ö"123"ÊÇ´æ´¢ÔÚ³£Á¿ÇøµÄ£¬²»ÈÝÐíÐ޸ĵġ£
Ò²¾ÍÊÇ˵ËüÊǸöconstÀàÐ͵ġ£
±ê×¼µÄд·¨Ó¦¸ÃÊÇ
char const *p = "123";
ÖÁÓÚΪʲô±àÒëÆ÷ÈÝÐíÉÏÃæµÄÄǸö²»±ê×¼µÄд·¨£¬¿ÉÄ ......
http://c.chinaitlab.com/c/basic/200907/789321.html
´Ê·¨ÏÝÚ壺
1 = ²»Í¬ÓÚ£½£½²»ÒªÔÚ³ÌÐòÖн«Á½Õßд´í£¬Ð¡ÐÄ¡£½«±í´ïʽÓë³£Á¿±È½Ïʱ£¬¿É½«³£Á¿·ÅÔÚ×ó±ß¡£
2 &ºÍ| ²»Í¬ÓÚ& ......
The meaning of each is:
MemberMeaningRange
tm_sec
seconds after the minute
0-61*
tm_min
minutes after the hour
0-59
tm_hour
hours since midnight
0-23
tm_mday
day of the month
1-31
tm_mon
months since January
0-11
tm_year
years since 1900
tm_wday
days since Sunday
0-6
tm_yday
d ......
1.ÇóÏÂÃæº¯ÊýµÄ·µ»ØÖµ£¨Î¢Èí£©
int func(x)
{
int countx = 0;
while(x)
{
countx ++;
x = x&(x-1);
&n ......