首页    新闻    小组    威客    人才    下载    博客    代码贴    在线编程    论坛
代码贴wp231957的代码贴全部
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类。 
......................
阅读全部 | 2013年1月8日 12:23
#include <stdio.h>
#include <afx.h>
#include <windows.h>



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


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

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


/****************************************************************************** 
  下面为阴历计算所需的数据,为节省存储空间,所以采用下面比较变态的存储方法. 
    
*******************************************************************************/ 
......................
阅读全部 | 2013年1月5日 22:06
/****************************************************************************** 
  下面为阴历计算所需的数据,为节省存储空间,所以采用下面比较变态的存储方法. 
    
*******************************************************************************/ 
//数组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 
......................
阅读全部 | 2013年1月5日 21:18
#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];
......................
阅读全部 | 2013年1月5日 20:25
#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;}
......................
阅读全部 | 2013年1月4日 22:27
#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;}
......................
阅读全部 | 2013年1月2日 11:14
char* ltrim(char* source)
{
    char* p=source;
    char* p2=source;
    while(*p!='\0')
    {
        if(*p!=0x20) break;
        p++;
    }
    while(*p!='\0')
    {
        *source=*p;
......................
阅读全部 | 2013年1月2日 10:33
#include <stdio.h>
#include "func.cpp"
int  main()
{
    FILE* fp;
    fp=fopen("d:\\b.txt","r");
    char flag=0xA;
    int lines=0;
    char tline[256]={'\0'};
    char* cp=tline;
    char tmp;
    while(!feof(fp))
......................
阅读全部 | 2013年1月1日 23:04
#include <stdio.h>
#include <windows.h>
#include <string.h>

//在控制台程序下模拟跑马灯
//挺好玩的,虽然本程序段实用价值不大
//由于程序有意陷入一个死循环,故只能通过CTRL+C来结束程序运行
int main()
{
    int i,j,len,k,m;
    printf("\n\n");
    char* test="This is a small program to imitate Marquee";
......................
阅读全部 | 2013年1月1日 14:48
上一页 6 7 8 9 10 11 12 13 14 15 下一页
wp231957