当前位置:首页 » 软件开发
开发技术指南» 文章正文
    引言: 本人写的一些日期时间转换函数: // ===========
 

 

    摘要: 很久没有使用mfc了,以至于都忘记mfc框架复杂的窗口、文档、视的创建过程了。 下面我们跟踪一个mfc mdi的应用程序,来温习或学习一下。 使用appwizard创建一个mdi应用程序,我创建的应用程序叫mditest,这样mfc生成了如下的类: 类名......
    摘要: _variant_t recordsaffected; string szsql = (string)"p_ks_adduser " + m_szname+ "," + m_szpasswd +";"; try { _commandptr ptrcmd; ptrcmd.createinstance(__uuidof(command)); ptrcmd->activeconnection ......


【编程】代码片段 - 日期时间
本人写的一些日期时间转换函数:

//  文件名称:     timeutil.hpp 【程序编程相关:VC++中以追加方式向文本文件写入数据

// ============================================================================= 【推荐阅读:ListView Custom Draw

//  【扩展信息:用VC实现自定义LISTBOX控件

//  内容说明:    

//  编写人:         iyft

//  e-mail:           iyft@163.com

// 

//  创建日期:     2004年07月01日10:52:54

//  修改日期:     2004年09月13日15:08:35

// -----------------------------------------------------------------------------

// 

//  修改记录:

//  -

//  -

// 

// ============================================================================+

 

// =============================================================================

//  保证源文件只会被编译一次

// -----------------------------------------------------------------------------

#if _msc_ver >= 1000

// 使源文件只会被编译一次

#pragma once

#endif // _msc_ver >= 1000

 

#ifndef __hpp_timeutil_hpp__

#define __hpp_timeutil_hpp__

// =============================================================================

 

#define dtm_date_length                    10

#define dtm_datetime_length           20

 

// 返回当前本地时区(单位为秒,因为有些时区是小数)

// 北京时区为    +08:00 = +8*60*60         = +28800

// 德黑兰时区为       +03:30 = +3*60*60 + 30*60 = +12600

// 夏威夷时区为       -10:00 = -10*60*60        = -36000

static long dtm_gettimezone(out time_zone_information **ppzt = null)

{

    static time_zone_information tz;

    static dword nresult = 0;

    static bool  binited = false;

 

    if(binited == false)

       {

        switch(::gettimezoneinformation(&tz))

              {

            case  time_zone_id_invalid:

                nresult = 0;


...   下一页
 ·bmp位图操作(象素操作)    »显示摘要«
    摘要: 下面一段代码对bmp的象素操作非常有用:void cbmptryview::ondraw(cdc* pdc){ cbmptrydoc* pdoc = getdocument(); assert_valid(pdoc); // todo: add draw code for native data here cdc memdcx,memdcy; memdcx.createcompatibled......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE