| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Wm_Char |
I am having a problem with the WM_CHAR message. Maruzzi and Petzold
document message crackers for the WM_CHAR message. When I try to use
them under Borland C++ 1.01 for OS/2, the code generates an access
violation. The normal SHORT1FROMMP() macro works as a drop in
replacement.
What am I doing wrong (if anything)
// This code bombs...
case WM_CHAR:
if ( CHARMSG( mp1 )->fs & KC_CHAR & ~KC_KEYUP )
{
cp->PutChar( CHARMSG( mp2 )->chr ) ;
}
break ;
// This code works fine...
case WM_CHAR:
if ( SHORT1FROMMP( mp1 ) & KC_CHAR & ~KC_KEYUP )
{
char ch = SHORT1FROMMP( mp2 ) ;
cp->PutChar(&ch) ;
}
break ;
--- Maximus/2 2.01wb
* Origin: * MacSavvy * Dallas * Mac * OS/2 * (214)250-4479 * (1:124/1208)SEEN-BY: 12/2442 54/54 620/243 624/50 632/348 640/820 690/660 711/409 410 413 SEEN-BY: 711/430 807 808 809 934 942 712/353 623 713/888 800/1 @PATH: 124/1208 1111 1 396/1 3615/50 229/2 12/2442 711/409 54/54 711/808 809 @PATH: 711/934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.