|
|
Microsoft OS/2 SDK PM 08-08-1988
/* -----------------------------------------------------------------*\ /* File Browser Demo Headers /* Version 1.0 /* Created by Microsoft Corp. 1988 /* -----------------------------------------------------------------*/ #define WINDOW hVPS /* ------------------------------------ */ /* forward declarations */ /* ------------------------------------ */ /* -- top-level */ SHORT Initialize(int argc, char *argv[]); SHORT ReadFile( void ); /* -- line-level */ SHORT StoreLine( char * ); SHORT RetrieveLine( char ** , USHORT ); /* -- screen */ void DisplayScreen( USHORT , BOOL ); void ClearScreen( void ); void VidRefresh ( USHORT LineFrom, USHORT NumLines, USHORT VidRowStart); void ScrollDown(int Nlines); void ScrollUp(int Nlines); /* -- user input */ VOID ExecuteAction( CHAR ch , USHORT usSliderPos ); UCHAR GetScanCode( void ); CHAR GetKbdInput( void ); /* ------------------------------------ */ /* constant definitions */ /* ------------------------------------ */ #define NUM_DATA_LINES 4096 #define SLIDER_RANGE 1000 #define HIGHEST_HSCROLL 128 #define HSCROLL_PAGESIZE 8 /* -- action codes */ #define EXIT 10 #define LINE_UP 11 #define LINE_DOWN 12 #define PAGE_UP 13 #define PAGE_DOWN 14 #define CHAR_RIGHT 15 #define CHAR_LEFT 16 #define PAGE_RIGHT 17 #define PAGE_LEFT 18 #define GOTO_TOP 19 #define GOTO_BOTTOM 20 #define GOTO_LINE 21 #define GOTO_HSCROLL 22 #define GOTO_LINE_TRACK 23 #define GOTO_HSCROLL_TRACK 24 #define MAX_START_LINE (USHORT)(HighestLine-Vid_Rows+1) #define CATTRBYTES 1 #define VIO_PS_ROWS 50 #define VIO_PS_COLUMNS 255 /**********************************************************************\ * following are includes for PM Skeleton * * \**********************************************************************/ /**********************************************************************\ * Color definitions for background fill \**********************************************************************/ #define LT_BLUE 0x0000007FL #define WHITE 0x00FFFFFFL /**********************************************************************\ * Size of maximum string size allocated \**********************************************************************/ #define CCHMAXSTRING 50 /**********************************************************************\ * Resource Ids \**********************************************************************/ #define ID_SKEL 1 #define IDD_ABOUT 2 #define IDD_SKEL 3 /**********************************************************************\ * IDD - ID for Dialog item * IDM - ID for Menu commands * IDS - ID for String table * IDT - ID for Timers \**********************************************************************/ #define IDNULL -1 #define IDMOPTIONS 10 #define IDMFLASH 11 #define IDMABOUT 12 #define IDMCOMMANDS 20 #define IDMCOLOR 21 #define IDMBLACK 22 #define IDMDIALOG 23 #define IDMSTART 24 #define IDMEND 25 #define IDSCONTENT 10 #define IDSCLOSE 11 #define IDSOKCLOSE 12 #define IDSSAVE 13 #define IDSOKSAVE 14 #define IDSASYNC 15 #define IDSOKASYNC 16 #define IDSABOUT 18 #define IDSTITLE 19 #define IDSDEFAULT 20 #define IDTASYNC 18 #define IDTFLASH 19 /********************\ * The main procedure * \********************/ SHORT cdecl main( int, char *[]); /********************************************************************\ * These procedures must be declared FAR because they are exported * and called by OS/2 Windows Presentation Manager. \********************************************************************/ ULONG FAR PASCAL SkelAboutDlg( HWND, USHORT, MPARAM, MPARAM ); ULONG FAR PASCAL SkelWndProc ( HWND, USHORT, MPARAM, MPARAM ); BOOL FAR PASCAL SkelInitApp ( VOID ); /********************************************************************\ * These procedures are declared here to get type and parameter * checking for calls between modules. The compiler switches -AS and * -AM for SMALL and MIDDLE model will make them NEAR and FAR * respectively, so there is no explicit declaration as NEAR or FAR. \********************************************************************/ VOID SkelCharInput ( HWND, SHORT, SHORT, SHORT ); VOID SkelCommand ( HWND, SHORT, SHORT, BOOL ); VOID SkelCreate ( HWND, LONG ); VOID SkelEndSession( HWND, BOOL ); VOID SkelSetFocus ( HWND ); VOID SkelHorzScroll( HWND, SHORT, SHORT ); VOID SkelPaint ( HWND, HPS ); VOID SkelQueryQuit ( HWND ); VOID SkelTimer ( HWND, USHORT ); VOID SkelVertScroll( HWND, SHORT, USHORT ); VOID SetScrollPosVert( SHORT, SHORT ); VOID SetScrollPosHorz( SHORT, SHORT ); VOID GetWinCharSize( VOID ); VOID InvisoCursor( VOID );
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.