⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 slide015.html

📁 《Big C++ 》Third Edition电子书和代码全集-Part1
💻 HTML
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<meta content="blendTrans(Duration=2)" http-equiv="Page-Enter">
	<title>Big C++: Chptr. 27 -- Graphical User Interfaces</title>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="Copyright" content="2005 John Wiley & Sons">
  <meta name="Author" content="Kurt Schmidt">
</head>


<body>
<div onclick="document.location='slide016.html'">
<h2><font color='#009999'>27.5 Event Handling (cont.)</font></h2>
<ul>
  <li><font size="+1">We create an event table out of macros that automatically 
    produce correct code.</font></li>
  <li><font size="+1">The generic form of the event table is: 
    <blockquote> 
      <pre>BEGIN_EVENT_TABLE(<i>ClassName</i>, <i>BaseClassName</i>)
   EVT_TYPE(<i>parameters</i>, <i>function</i>)
   . . .
END_EVENT_TABLE()</pre>
    </blockquote>
    </font></li>
  <li><font size="+1">There are several different event types; here we use the 
    <tt>MENU</tt> event type that requires a menu ID as a parameter. 
    <blockquote> 
      <pre>BEGIN_EVENT_TABLE(EventFrame, wxFrame)
   EVT_MENU(IS_SAY_HELLO, EVentFrame::OnSayHello)
END_EVENT_TABLE()</pre>
    </blockquote>
    </font></li>
	
  <li><font size="+1">We need to insert another macro into the definition of each 
    class that has an event table. 
    <blockquote>
      <pre>class EventFrame : public wxFrame
{
   . . . 
private:
   wxTextCtrl* text;
   DECLARE_EVENT_TABLE()
};</pre>
    </blockquote></font>
</ul>
<hr>
<center><small>
	<a href='slide014.html'>prev</a>
	|<a href='slide001.html'>top</a>
	|<a href='slide016.html'>next</a>
</small></center>
</div>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -