RTFPAD - 3


{

fWheel =

(BOOL)SendMessage(hwndMSHWheel, uMSH_SUPPORT, 0, 0);

}

if(!fWheel)

{

MessageBox(NULL, "MS Wheel not supported",

"Error message", MB_OK);

}

// MSH_MOUSEWHEEL

uMSH_MOUSEEHEEL = RegisterWindowMessage(MSH_MOUSEWHEEL);

if(!uMSH_MOUSEEHEEL)

{

MessageBox(NULL, "Error: RegisterWindowMessage",

"Error message", MB_OK);

return FALSE;

}

// MSH_SCROLL_LINES

uMSH_SCROLL_LINES =

RegisterWindowMessage(MSH_SCROLL_LINES);

//

if(uMSH_SCROLL_LINES != 0 && hwndMSHWheel != 0)

{

uiScrollLines =

(BOOL)SendMessage(hwndMSHWheel,

uMSH_SCROLL_LINES, 0, 0);

}

}

// Windows NT 4.0

else

{

// Microsoft IntelliPoint

if(!GetSystemMetrics(SM_MOUSEWHEELPRESENT))

{

MessageBox(NULL,

"Microsoft IntelliMouse not found",

"Error message", MB_OK);

}

//

SystemParametersInfo(SPI_GETWHEELSCROLLLINES,

0, &uiScrollLines, 0);

}

hRTFLib = LoadLibrary("RICHED32.DLL");

if(!hRTFLib)

return FALSE;

memset(&wc, 0, sizeof(wc));

wc.cbSize = sizeof(WNDCLASSEX);

wc.hIconSm = LoadImage(hInst,

MAKEINTRESOURCE(IDI_APPICONSM), IMAGE_ICON, 16, 16, 0);

wc.style = 0;

wc.lpfnWndProc = (WNDPROC)WndProc;

wc.cbClsExtra = 0;

wc.cbWndExtra = 0;

wc.hInstance = hInst;

wc.hIcon = LoadImage(hInst,

MAKEINTRESOURCE(IDI_APPICON), IMAGE_ICON, 32, 32, 0);

wc.hCursor = LoadCursor(NULL, IDC_ARROW);

wc.hbrBackground = (HBRUSH) (COLOR_WINDOW + 1);

wc.lpszMenuName = MAKEINTRESOURCE(IDR_APPMENU);

wc.lpszClassName = szAppName;

if(!RegisterClassEx(&wc))