<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Vdiscussion &#187; Visual Programming</title>
	<atom:link href="http://vdiscussion.com/tag/visual-programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://vdiscussion.com</link>
	<description>Vinoth Kumar&#039;s Discussion</description>
	<lastBuildDate>Wed, 09 Dec 2009 15:34:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>What is Dead-Character Messages in Visual Programming</title>
		<link>http://vdiscussion.com/what-is-dead-character-messages-in-visual-programming/</link>
		<comments>http://vdiscussion.com/what-is-dead-character-messages-in-visual-programming/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 14:21:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Theory Subjects]]></category>
		<category><![CDATA[Visual Programming]]></category>
		<category><![CDATA[ANSI]]></category>
		<category><![CDATA[ASCII]]></category>
		<category><![CDATA[Dead-Character Messages]]></category>
		<category><![CDATA[WM_CHAR]]></category>
		<category><![CDATA[WM_DEADCHAR]]></category>
		<category><![CDATA[WM_SYSDEADCHAR]]></category>
		<category><![CDATA[wParam]]></category>

		<guid isPermaLink="false">http://vdiscussion.com/?p=59</guid>
		<description><![CDATA[Windows programs can usually ignore WM_DEADCHAR and WM_SYSDEADCHAR messages, but you should definitely know what dead characters are and how they work. On some non-U.S. English keyboards, certain keys are defined to add a diacritic to a letter. These are called &#8220;dead keys&#8221; because they don&#8217;t generate characters by themselves. For instance, when a German [...]]]></description>
			<content:encoded><![CDATA[<p>Windows programs can usually ignore <strong>WM_DEADCHAR</strong> and <strong>WM_SYSDEADCHAR</strong> messages,  but you should definitely know what dead characters are and how they work.</p>
<p>On some non-U.S. English keyboards, certain keys are defined to add a  diacritic to a letter. These are called &#8220;dead keys&#8221; because they don&#8217;t generate  characters by themselves. For instance, when a German keyboard is installed, the  key that is in the same position as the +/= key on a U.S. keyboard is a dead key  for the grave accent (`) when shifted and the acute accent (´) when unshifted.</p>
<p>When a user presses this dead key, your window procedure receives a  <strong>WM_DEADCHAR</strong> message with <strong><em>wParam</em></strong> equal to ASCII or Unicode code for the  diacritic by itself. When the user then presses a letter key that can be written  with this diacritic (for instance, the A key), the window procedure receives a  <strong>WM_CHAR</strong> message where <em>wParam</em> is the ANSI code for the letter `a&#8217; with the  diacritic.</p>
<p>Thus, your program does not have to process the <strong>WM_DEADCHAR</strong> message because  the <strong>WM_CHAR</strong> message gives the program all the information it needs. The Windows  logic even has built-in error handling: If the dead key is followed by a letter  that can&#8217;t take a diacritic (such as `s&#8217;), the window procedure receives two <strong> WM_CHAR</strong> messages in a row—the first with <em>wParam</em> equal to the <strong>ASCII</strong> code  for the diacritic by itself (the same <em>wParam</em> value delivered with the  WM_DEADCHAR message) and the second with <em>wParam</em> equal to the <strong>ASCII</strong> code  for the letter `s&#8217;.</p>
<p>Of course, the best way to get a feel for this is to see it in action. You  need to load a foreign keyboard that uses dead keys, such as the German keyboard  that I described earlier. You do this in the Control Panel by selecting Keyboard  and then the Language tab. Then you need an application that shows you the  details of every keyboard message a program can receive.</p>
]]></content:encoded>
			<wfw:commentRss>http://vdiscussion.com/what-is-dead-character-messages-in-visual-programming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Can Any one tell exactly what is Visual C++ ?</title>
		<link>http://vdiscussion.com/can-any-one-tell-exactly-what-is-visual-c/</link>
		<comments>http://vdiscussion.com/can-any-one-tell-exactly-what-is-visual-c/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 15:12:11 +0000</pubDate>
		<dc:creator>ma.vinothkumar</dc:creator>
				<category><![CDATA[Request]]></category>
		<category><![CDATA[Visual C++]]></category>
		<category><![CDATA[Visual Programming]]></category>

		<guid isPermaLink="false">http://vdiscussion.com/?p=39</guid>
		<description><![CDATA[Can any one please tell me what exactly the Visual C++ is.]]></description>
			<content:encoded><![CDATA[<p>Can any one please tell me what exactly the Visual C++ is.</p>
]]></content:encoded>
			<wfw:commentRss>http://vdiscussion.com/can-any-one-tell-exactly-what-is-visual-c/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Scroll Bar Messages:Visual Programming</title>
		<link>http://vdiscussion.com/scroll-bar-messages-visual-programming/</link>
		<comments>http://vdiscussion.com/scroll-bar-messages-visual-programming/#comments</comments>
		<pubDate>Sun, 25 Oct 2009 02:42:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Theory Subjects]]></category>
		<category><![CDATA[Visual Programming]]></category>
		<category><![CDATA[SB_THUMBPOSITION]]></category>
		<category><![CDATA[SB_THUMBTRACK]]></category>
		<category><![CDATA[Scroll Bar Messages]]></category>
		<category><![CDATA[WINUSER.H]]></category>
		<category><![CDATA[WM_HSCROLL]]></category>
		<category><![CDATA[WM_VSCROLL]]></category>
		<category><![CDATA[wParam]]></category>

		<guid isPermaLink="false">http://vdiscussion.com/?p=19</guid>
		<description><![CDATA[Windows sends the window procedure WM_VSCROLL (vertical scroll) and WM_HSCROLL (horizontal scroll) messages when the scroll bar is clicked with the mouse or the thumb is dragged. Each mouse action on the scroll bar generates at least two messages, one when the mouse button is pressed and another when it is released. WM_VSCROLL and WM_HSCROLL [...]]]></description>
			<content:encoded><![CDATA[<p>Windows sends the window procedure WM_VSCROLL (vertical scroll) and WM_HSCROLL  (horizontal scroll) messages when the scroll bar is clicked with the mouse or  the thumb is dragged. Each mouse action on the scroll bar generates at least two  messages, one when the mouse button is pressed and another when it is released.</p>
<p>WM_VSCROLL and WM_HSCROLL are accompanied by the <em>wParam</em> and <em>lParam</em> message parameters. For messages from scroll bars created as part of your  window, you can ignore <em>lParam</em>; that&#8217;s used only for scroll bars created  as child windows, usually within dialog boxes.</p>
<p>The <em>wParam</em> message parameter is divided into a <strong>low word and a high  word</strong>. The low word of <em>wParam</em> is a number that indicates what the mouse is  doing to the scroll bar. This number is referred to as a &#8220;notification code.&#8221;  Notification codes have values defined by identifiers that begin with SB, which  stands for &#8220;scroll bar.&#8221; Here&#8217;s how the notification codes are defined in  WINUSER.H:</p>
<blockquote><p>#define SB_LINEUP           0<br />
#define SB_LINELEFT         0<br />
#define SB_LINEDOWN         1<br />
#define SB_LINERIGHT        1<br />
#define SB_PAGEUP           2<br />
#define SB_PAGELEFT         2<br />
#define SB_PAGEDOWN         3<br />
#define SB_PAGERIGHT        3<br />
#define SB_THUMBPOSITION    4<br />
#define SB_THUMBTRACK       5<br />
#define SB_TOP              6<br />
#define SB_LEFT             6<br />
#define SB_BOTTOM           7<br />
#define SB_RIGHT            7<br />
#define SB_ENDSCROLL        8</p></blockquote>
<p><img class="alignnone size-full wp-image-20" title="Scroll Bar Messages" src="http://vdiscussion.com/wp-content/uploads/2009/10/Scroll-Bar-Messages.jpg" alt="Scroll Bar Messages" width="600" height="450" /></p>
<p>If you hold down the mouse button on the various parts of the scroll bar, your  program can receive multiple scroll bar messages. When the mouse button is  released, you&#8217;ll get a message with a notification code of SB_ENDSCROLL. You can  generally ignore messages with the SB_ENDSCROLL notification code. Windows will  not change the position of the scroll bar thumb. Your application does that by  calling <em>SetScrollPos</em>.</p>
<p>When you position the mouse cursor over the scroll bar thumb and press the mouse  button, you can move the thumb. This generates scroll bar messages with  notification codes of SB_THUMBTRACK and SB_THUMBPOSITION. When the low word of  <em>wParam</em> is SB_THUMBTRACK, the high word of <em>wParam</em> is the current  position of the scroll bar thumb as the user is dragging it. This position is  within the minimum and maximum values of the scroll bar range. When the low word  of <em>wParam</em> is SB_THUMBPOSITION, the high word of <em>wParam</em> is the  final position of the scroll bar thumb when the user released the mouse button.  For other scroll bar actions, the high word of <em>wParam</em> should be ignored.</p>
<p>To provide feedback to the user, Windows will move the scroll bar thumb when  you drag it with the mouse as your program is receiving SB_THUMBTRACK messages.  However, unless you process SB_THUMBTRACK or SB_THUMBPOSITION messages by  calling <em>SetScrollPos</em>, the thumb will snap back to its original position  when the user releases the mouse button.</p>
<p>A program can process either the SB_THUMBTRACK or SB_THUMBPOSITION messages, but  doesn&#8217;t usually process both. If you process SB_THUMBTRACK messages, you&#8217;ll move  the contents of your client area as the user is dragging the thumb. If instead  you process SB_THUMBPOSITION messages, you&#8217;ll move the contents of the client  area only when the user <em>stops</em> dragging the thumb.</p>
<p>The WINUSER.H header files includes notification codes of SB_TOP, SB_BOTTOM,  SB_LEFT, and SB_RIGHT, indicating that the scroll bar has been moved to its  minimum or maximum position. However, you will never receive these notification  codes for a scroll bar created as part of your application window.</p>
<p>Although it&#8217;s not common, using 32-bit values for the scroll bar range is  perfectly valid. However, the high word of <em>wParam</em>, which is only a 16-bit  value, cannot properly indicate the position for SB_THUMBTRACK and  SB_THUMBPOSITION actions. In this case, you need to use the function  <em>GetScrollInfo</em></p>
]]></content:encoded>
			<wfw:commentRss>http://vdiscussion.com/scroll-bar-messages-visual-programming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scroll Bar Range and Position</title>
		<link>http://vdiscussion.com/scroll-bar-range-and-position/</link>
		<comments>http://vdiscussion.com/scroll-bar-range-and-position/#comments</comments>
		<pubDate>Sun, 25 Oct 2009 01:47:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Theory Subjects]]></category>
		<category><![CDATA[Visual Programming]]></category>
		<category><![CDATA[Scroll Bar Position]]></category>
		<category><![CDATA[Scroll Bar Range]]></category>

		<guid isPermaLink="false">http://vdiscussion.com/?p=14</guid>
		<description><![CDATA[Scroll Bar Range and Position]]></description>
			<content:encoded><![CDATA[<p>Every scroll bar has an associated &#8220;range&#8221; and &#8220;position.&#8221; The scroll bar range is a pair of integers representing a minimum and maximum value associated with the scroll bar. The position is the location of the thumb within the range. When the thumb is at the top (or left) of the scroll bar, the position of the thumb is the minimum value of the range. At the bottom (or right) of the scroll bar, the thumb position is the maximum value of the range.</p>
<p>By default, the range of a scroll bar is 0 (top or left) through 100 (bottom or right), but it&#8217;s easy to change the range to something that is more convenient for the program:</p>
<blockquote><p>SetScrollRange (hwnd, iBar, iMin, iMax, bRedraw) ;</p></blockquote>
<p><em>iBar</em> argument is either SB_VERT or SB_HORZ.</p>
<p><em>iMin</em> and <em>iMax</em> are the new minimum and maximum positions of the  range.</p>
<p><em>bRedraw</em> to TRUE if you want Windows to redraw the scroll bar based on the  new range. (If you will be calling other functions that affect the appearance of  the scroll bar after you call <em>SetScrollRange</em>, you&#8217;ll probably want to set  <em>bRedraw</em> to FALSE to avoid excessive redrawing.)</p>
<p><em>hwnd</em> parameter to the window procedure is the handle of the window  changing in size. (Remember that one window procedure could be handling messages  for multiple windows that were created based on the same window class. The  <em>hwnd</em> parameter lets the window procedure know which window is receiving  the message.) The <em>message</em> parameter is WM_SIZE. The <em>wParam</em> parameter for a WM_SIZE message is the value SIZE_RESTORED, SIZE_MINIMIZED,  SIZE_MAXIMIZED, SIZE_MAXSHOW, or SIZE_MAXHIDE (defined in the WINUSER.H header  file as the numbers 0 through 4). That is, the <em>wParam</em> parameter indicates  whether the window is being changed to a nonminimized or nonmaximized size,  being minimized, being maximized, or being hidden.</p>
<p>The thumb position is always a discrete integral value. For instance, a scroll  bar with a range of 0 through 4 has five thumb positions<br />
<img class="alignnone size-full wp-image-15" title="scrollbar" src="http://vdiscussion.com/wp-content/uploads/2009/10/scrollbar.jpg" alt="Scroll Bar Range and Position" width="423" height="298" /></p>
<p><strong>How to set the Thumb Position of the window</strong></p>
<blockquote><p>SetScrollPos (hwnd, iBar, iPos, bRedraw);</p></blockquote>
<p><em>SetScrollPos</em> to set a new thumb position within the scroll bar range.</p>
<p>iPos argument is the new position and must be within the range of iMin and iMax. Windows provides similar functions (GetScrollRange and GetScrollPos) to obtain the current range and position of a scroll bar.</p>
<p><strong>Windows&#8217; responsibilities for scroll bars:</strong></p>
<ul>
<li>Handle all processing of mouse messages to the scroll bar.</li>
<li>Provide a reverse-video &#8220;flash&#8221; when the user clicks the scroll bar.</li>
<li>Move the thumb as the user drags the thumb within the scroll bar.</li>
<li>Send scroll bar messages to the window procedure of the window containing  the scroll bar.</li>
</ul>
<p><strong>Responsibilities of your program:</strong></p>
<ul>
<li>Initialize the range and position of the scroll bar.</li>
<li>Process the scroll bar messages to the window procedure.</li>
<li>Update the position of the scroll bar thumb.</li>
<li>Change the contents of the client area in response to a change in the scroll  bar.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://vdiscussion.com/scroll-bar-range-and-position/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scroll Bars &#8211; Visual Programming</title>
		<link>http://vdiscussion.com/scroll-bars-visual-programming/</link>
		<comments>http://vdiscussion.com/scroll-bars-visual-programming/#comments</comments>
		<pubDate>Sat, 24 Oct 2009 17:15:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Theory Subjects]]></category>
		<category><![CDATA[Visual Programming]]></category>
		<category><![CDATA[Scroll Bars]]></category>
		<category><![CDATA[VP]]></category>

		<guid isPermaLink="false">http://vdiscussion.com/?p=11</guid>
		<description><![CDATA[Scroll Bars, Visual Programming]]></description>
			<content:encoded><![CDATA[<p>Scroll bars are one of the best features of a graphical user interface. They are easy to use and provide excellent visual feedback. You can use scroll bars whenever you need to display anything—text, graphics, a spreadsheet, database records, pictures, Web pages—that requires more space than is available in the window&#8217;s client area.</p>
<p>Scroll bars are positioned either vertically (for up and down movement) or horizontally (for left and right movement). You can click with the mouse the arrows at each end of a scroll bar or the area between the arrows. A &#8220;scroll box&#8221; (or &#8220;thumb&#8221;) travels the length of the scroll bar to indicate the approximate location of the material shown on the display in relation to the entire document. You can also drag the thumb with the mouse to move to a particular location.</p>
<p><img class="alignnone size-medium wp-image-12" title="Scroll Bars - Visual Programming" src="http://vdiscussion.com/wp-content/uploads/2009/10/Scroll-Bars-Visual-Programming-300x201.jpg" alt="Scroll Bars - Visual Programming" width="300" height="201" /></p>
<p>Programmers sometimes have problems with scrolling terminology because their perspective is different from the user&#8217;s. A user who scrolls down wants to bring a lower part of the document into view; however, the program actually moves the document up in relation to the display window. The Window documentation and the header file identifiers are based on the user&#8217;s perspective: scroll up means moving toward the beginning of the document; scroll down means moving toward the end.</p>
<p>It is easy to include a horizontal or vertical scroll bar in your application window. All you need do is include the window style (WS) identifier WS_VSCROLL (vertical scroll) or WS_HSCROLL (horizontal scroll) or both in the third argument to CreateWindow. The scroll bars specified in the CreateWindow function are always placed against the right side or bottom of the window and extend the full length or width of the client area. The client area does not include the space occupied by the scroll bar. The width of the vertical scroll bar and the height of the horizontal scroll bar are constant for a particular video driver and display resolution. If you need these values, you can obtain them (as you may have observed) from the GetSystemMetrics calls.</p>
<p>Windows takes care of processing all mouse messages to the scroll bars. However, scroll bars do not have an automatic keyboard interface. If you want the cursor keys to duplicate some of the functionality of the scroll bars, you must explicitly provide logic for that (as we&#8217;ll do when we make another version of the SYSMETS program in the next chapter).</p>
]]></content:encoded>
			<wfw:commentRss>http://vdiscussion.com/scroll-bars-visual-programming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
