首页    新闻    小组    威客    人才    下载    博客    代码贴    在线编程    论坛
代码贴随便看看C语言
VS2010/MFC编程入门之二十九(常用控件:列表视图控件List Control 下)
来自:鸡啄米   |  时间:2012-07-04 20:35:57 

原文链接: http://www.jizhuomi.com/software/197.html 

相关主题: 11090039 11010015 

       上一节是关于 列表视图控件List Control的上半部分 ,简单介绍了列表视图控件,其通知消息的处理和有关结构体的定义。本节继续讲解下半部分,包括列表视图控件的创建、CListCtrl类的主要成员函数和CListCtrl类应用实例。 

       列表视图控件的创建 

        MFC 同样为列表视图控件的操作提供了CListCtrl类。 
......................
阅读全部 | wp231957 贴于 2013年1月8日 12:23     hide bbsi
#include <stdio.h>
#include <afx.h>
#include <windows.h>



const WORD START_YEAR =1901; 
const WORD END_YEAR   =2050; 


/****************************************************************************** 
  下面为阴历计算所需的数据,为节省存储空间,所以采用下面比较变态的存储方法. 
......................
阅读全部 | wp231957 贴于 2013年1月6日 23:31     hide bbsi
#include <stdio.h>
#include <afx.h>
#include <windows.h>

const WORD START_YEAR =1901; 
const WORD END_YEAR   =2050; 


/****************************************************************************** 
  下面为阴历计算所需的数据,为节省存储空间,所以采用下面比较变态的存储方法. 
    
*******************************************************************************/ 
......................
阅读全部 | wp231957 贴于 2013年1月5日 22:06     hide bbsi
/****************************************************************************** 
  下面为阴历计算所需的数据,为节省存储空间,所以采用下面比较变态的存储方法. 
    
*******************************************************************************/ 
//数组gLunarDay存入阴历1901年到2100年每年中的月天数信息, 
//阴历每月只能是29或30天,一年用12(或13)个二进制位表示,对应位为1表30天,否则为29天 
WORD gLunarMonthDay[]= 

        //测试数据只有1901.1.1 --2050.12.31 
  0X4ae0, 0Xa570, 0X5268, 0Xd260, 0Xd950, 0X6aa8, 0X56a0, 0X9ad0, 0X4ae8, 0X4ae0,   //1910 
  0Xa4d8, 0Xa4d0, 0Xd250, 0Xd548, 0Xb550, 0X56a0, 0X96d0, 0X95b0, 0X49b8, 0X49b0,   //1920 
  0Xa4b0, 0Xb258, 0X6a50, 0X6d40, 0Xada8, 0X2b60, 0X9570, 0X4978, 0X4970, 0X64b0,   //1930 
......................
阅读全部 | wp231957 贴于 2013年1月5日 21:18     hide bbsi
#include<stdio.h>
#define init_year 1977
int year_sumday(int year,int month,int day)
{
    int sum=0;
    int rui[12]={31,29,31,30,31,30,31,31,30,31,30,31};
    int ping[12]={31,28,31,30,31,30,31,31,30,31,30,31};
    int ruiflag=0;
    if((year%4==0 &&year%100!=0) || year%400==0) ruiflag=1;
    for(int index=0;index<month-1;index++)
    {
        if(ruiflag==1) sum+=rui[index];else sum+=ping[index];
......................
阅读全部 | wp231957 贴于 2013年1月5日 20:25     hide bbsi
#include <stdio.h>

int  main()
{
    struct Count
    {
        int c;
        int count;
    };
    struct Count counter[256];
    int i=0;
    for(i=0;i<256;i++) {counter[i].c=i;counter[i].count=0;}
......................
阅读全部 | wp231957 贴于 2013年1月4日 22:27     hide bbsi
function main(m,k)
global G yitaT r f CdA If Iw1  g
n=600:10:4000;
Tq=-19.313+295.27*(n/1000)-165.44*(n/1000).^2+40.874*(n/1000).^3-3.8445*(n/1000).^4;
g=9.8;G=m*g;yitaT=0.85;r=0.367;f=0.013;
CdA=2.77;If=0.218;Iw1=1.798;global Iw2Iw2=3.598;global L
L=3.2;global a
a=1.947;global hg
hg=0.9;
global  ig
ig=[6.09 3.09 1.71 1.00];
global Ff
......................
阅读全部 | weiyanfei 贴于 2013年1月4日 21:45     hide bbsi
function main(m,k)
global G yitaT r f CdA If Iw1  g
n=600:10:4000;
Tq=-19.313+295.27*(n/1000)-165.44*(n/1000).^2+40.874*(n/1000).^3-3.8445*(n/1000).^4;
g=9.8;G=m*g;yitaT=0.85;r=0.367;f=0.013;
CdA=2.77;If=0.218;Iw1=1.798;global Iw2Iw2=3.598;global L
L=3.2;global a
a=1.947;global hg
hg=0.9;
global  ig
ig=[6.09 3.09 1.71 1.00];
global Ff
......................
阅读全部 | weiyanfei 贴于 2013年1月4日 21:45     hide bbsi
#include <stdio.h>

int  main()
{
    struct Count
    {
        int c;
        int count;
    };
    struct Count counter[256];
    int i=0;
    for(i=0;i<256;i++) {counter[i].c=i;counter[i].count=0;}
......................
阅读全部 | wp231957 贴于 2013年1月2日 11:14     hide bbsi
char* ltrim(char* source)
{
    char* p=source;
    char* p2=source;
    while(*p!='\0')
    {
        if(*p!=0x20) break;
        p++;
    }
    while(*p!='\0')
    {
        *source=*p;
......................
阅读全部 | wp231957 贴于 2013年1月2日 10:33     hide bbsi
上一页 147 148 149 150 151 152 153 154 155 156 下一页