انت هنا الان : شبكة جامعة بابل > موقع الكلية > نظام التعليم الالكتروني > مشاهدة المحاضرة
الكلية كلية تكنولوجيا المعلومات
القسم قسم البرامجيات
المرحلة 4
أستاذ المادة سرى زكي ناجي علوان
08/04/2013 18:19:50
More Keyboard Messages While WM_CHAR is probably the most commonly handled keyboard message, it is not the only one. In fact, WM_CHAR is actually a synthetic message that is constructed by the TranslateMessage( ) function inside your program s message loop. At the lowest level, Windows NT generates two messages each time you press a key. When a key is pressed, a WM_KEYDOWN message is sent. When the key is released, a WM_KEYUP message is posted. If possible, a WM_KEYDOWN message is translated into a WM_CHAR message by TranslateMessage( ). Thus, unless you include TranslateMessage() in your message loop, your program will not receive WM_CHAR messages. To prove this to yourself, try commenting out the call to TranslateMessage() in the preceding program. After doing so, it will no longer respond to your keypresses. The reason you will seldom use WM_KEYDOWN or WM_KEYUP for character input is that the information they contain is in a raw format. For example, the value in wParam contains the virtual key code, not the key s ASCII value. Part of what TranslateMessaage( ) does is transform the virtual key codes into ASCII characters, taking into account the state of the shift key, etc. Also, TranslateMessage( ) also automatically handles auto-repeat.
المادة المعروضة اعلاه هي مدخل الى المحاضرة المرفوعة بواسطة استاذ(ة) المادة . وقد تبدو لك غير متكاملة . حيث يضع استاذ المادة في بعض الاحيان فقط الجزء الاول من المحاضرة من اجل الاطلاع على ما ستقوم بتحميله لاحقا . في نظام التعليم الالكتروني نوفر هذه الخدمة لكي نبقيك على اطلاع حول محتوى الملف الذي ستقوم بتحميله .
|