上一页 1 ··· 58 59 60 61 62 63 64 65 66 ··· 76 下一页
摘要: <html><DIV style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid; SCROLLBAR-SHADOW-COLOR: #3d5054; SCROLLBAR-3DLIGHT-COLOR: #3d5054; SCROLLBAR-ARROW-COLOR: #ffd6da;SCROLLBAR-DARKSHADOW-COLOR: #85989c; SCROLLBAR-F 阅读全文
posted @ 2011-09-16 16:32 海乐学习 阅读(7519) 评论(0) 推荐(0)
摘要: php 动态生成多选按钮<?phpfunction generate_checkboxes($name,$options, $default=array()) { if (!is_array($default)){ $default = array(); } foreach($options as $value => $label) { $html .= "<input type=checkbox "; if (in_array($value, $default)){ $html .= "checked "; } $html .= &q 阅读全文
posted @ 2011-09-16 16:09 海乐学习 阅读(1764) 评论(0) 推荐(0)
摘要: 1. 在“运行”中输入CMD2.在启动的窗口中输入netstat -ano,就可以看到所有端口占用的情况,记下占用80端口的程序的PID3.打开“任务管理器”,点击菜单栏的“查看”,再点击“选择列”,选上“PID(进程标识符)”4.在进程中找个相应的PID值,结束进程即可 阅读全文
posted @ 2011-08-19 14:28 海乐学习 阅读(1435) 评论(0) 推荐(0)
摘要: 一.添加数据 m_listbox.AddString("fadsfasdfsdaf");二.计算数据条数 m_listbox.GetCount();三.清空列表框 m_listbox.ResetContent();四、修改背景颜色及字体颜色① 先创建一个基于对话框的工程,命名为test,然后在对话框上加入一个ListBox控件。② 在testDlg.h中加入一个成员变量:HBRUSH m_hbrush;③ 在OnInitDialog()中,加入m_hbrush=CreateSolidBrush(RGB(0,0,0);此处设置的RGB值可以改变ListBox的背景色。 为了观 阅读全文
posted @ 2011-08-08 20:43 海乐学习 阅读(7233) 评论(1) 推荐(0)
摘要: privatevoidfrmCtiState_FormClosing(objectsender,FormClosingEventArgse){if(e.CloseReason==CloseReason.ApplicationExitCall)return;DialogResultresult=MessageBox.Show("是否退出系统?","消息",MessageBoxButtons.YesNo,MessageBoxIcon.Question);if(result==DialogResult.No){e.Cancel=true;return;}els 阅读全文
posted @ 2011-08-04 14:41 海乐学习 阅读(851) 评论(0) 推荐(0)
摘要: class CAgent {public:CAgent();virtual ~CAgent();};注:CAgent不可继承MFC类*.h文件中#include <map>#include <string>using namespace std;#include "Agent.h"*.cpp 文件中map<string,CAgent> AgentList;string s="1001";CAgentagent1;AgentList.insert(make_pair(s,agent1)); 阅读全文
posted @ 2011-07-22 10:49 海乐学习 阅读(7386) 评论(0) 推荐(0)
摘要: 什么时候我们需要用到SetTimer函数呢?当你需要每个一段时间执行一件事的的时候就需要使用SetTimer函数了。让我们先来看看SetTimer函数的原型: UINT SetTimer(UINT nIDEvent,UINT nElapse,void(CALLBACK EXPORT *lpfnTimer)(HWND,UINT ,YINT ,DWORD)) 当使用SetTimer函数的时候,就会生成一个计时器。函数中nIDEvent指的是计时器的标识,也就是名字。nElapse指的是时间间隔,也就是每隔多长时间触发一次事件。第三个参数是一个回调函数,在这个函数里,放入你想要做的事情的代码,你可以 阅读全文
posted @ 2011-07-10 21:44 海乐学习 阅读(9064) 评论(0) 推荐(0)
摘要: CString str;str.Format("Great game! You have $ %.2f left.", m_Amt_Remaining);),上VC6中上述代码没有问题,但在Visual stdio 2008中编译中有错误:错误提示:error C2664: “void ATL::CStringT<BaseType,StringTraits>::Format(const wchar_t *,...)”: 不能将参数 1 从“const char [10]”转换为“const wchar_t *”VS2008默认是UNICODE环境所以把你所有字符 阅读全文
posted @ 2011-07-07 12:57 海乐学习 阅读(5072) 评论(0) 推荐(0)
摘要: Vc6.0直接可以在CView类添加消息响应;右键点CView类添加事件。在Vc2008中没找到这种功能,但可以用下面两种方式实现。方案一:自动右击CTextView类,选属性。在属性视图的工具栏中,有“事件”和“消息”,还有“重写”。事件就是命令事件,消息就是控件消息,重写就是重载虚函数。点击消息就可选择**消息响应-->添加 即可自动生成。方案二:手动以添加OnLButtonDown()消息为例,添加过程如下1.右键点击CView选Add Function。 设置函数原型为Void OnLButtonDown(UINT nFlags,CPoint point);2 在CView头文件 阅读全文
posted @ 2011-06-28 20:33 海乐学习 阅读(3361) 评论(0) 推荐(0)
摘要: 刚开始学习C++,写个学习笔记。mvc中的timer应用,基于对话框的程序CmyClockDlg.h 头文件CmyClockDlg.cpp 类文件BOOL CmyClockDlg::OnInitDialog(){ //设置定时器 SetTimer(100, 50,NULL); //SetTimer( 100, 50, TimerProc );//如果第三个参数中指定一个函数名称,则定时器不会触发WM_TIMER消息,而是调用指定函数} 阅读全文
posted @ 2011-06-28 16:12 海乐学习 阅读(692) 评论(0) 推荐(0)
上一页 1 ··· 58 59 60 61 62 63 64 65 66 ··· 76 下一页