Купите дёшево саженцы малины в питомнике. |       

RTFPAD - 2


#include "rtfpad.h"

// MSH_MOUSEEHEEL

UINT uMSH_MOUSEEHEEL = 0;

// MSH_SUPPORT

UINT uMSH_SUPPORT = 0;

// MSH_SCROLL_LINES

UINT uMSH_SCROLL_LINES = 0;

//

// MSWheel

HWND hwndMSHWheel = NULL;

// Microsoft IntelliMouse

BOOL fWheel = FALSE;

//

UINT uiScrollLines = 3;

//

//

OSVERSIONINFO osv;

HINSTANCE hInst;

char szAppName[] = "RtfEditApp";

char szAppTitle[] = "Rich Text Editor RtfPad";

HWND hwndEdit;

HINSTANCE hRTFLib;

// -----------------------------------------------------

// WinMain

// -----------------------------------------------------

int APIENTRY

WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,

LPSTR lpCmdLine, int nCmdShow)

{

WNDCLASSEX wc;

HWND hWnd;

MSG msg;

hInst = hInstance;

hWnd = FindWindow(szAppName, NULL);

if(hWnd)

{

if(IsIconic(hWnd))

ShowWindow(hWnd, SW_RESTORE);

SetForegroundWindow(hWnd);

return FALSE;

}

//

memset(&osv, 0, sizeof(OSVERSIONINFO));

osv.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);

GetVersionEx(&osv);

// Windows 95 Windows NT 3.51

//

if( (osv.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS)

((osv.dwPlatformId == VER_PLATFORM_WIN32_NT) &&

(osv.dwMajorVersion < 4)))

{

// MSH_WHEELSUPPORT

uMSH_SUPPORT =

RegisterWindowMessage(MSH_WHEELSUPPORT);

// Microsoft IntelliMouse

hwndMSHWheel =

FindWindow(MSH_WHEELMODULE_CLASS,

MSH_WHEELMODULE_TITLE);

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