Exemple #1
0
void com_err_load(HINSTANCE hInstance)
{
    (FARPROC)com_err=MakeProcInstance((FARPROC)com_err_export,hInstance);
    (FARPROC)error_message=MakeProcInstance((FARPROC)error_message_export,
					    hInstance);
    (FARPROC)error_table_name=MakeProcInstance((FARPROC)error_table_name_export,
					       hInstance);
}
Exemple #2
0
static void GetNewRegValue( HWND hwnd )
{
    HWND            owner;
    DLGPROC         fp;
    INT_PTR         reg_modified;
    RegModifyData   modify_data;
    const char      *descript;
    unsigned        max_descript;
    mad_type_info   tinfo;
    mad_registers   *regs;

    owner = GetParent( hwnd );
    regs =  RegListGetMadRegisters( owner );
    modify_data.reg_set = RegListGetMadRegSetData( owner );
    owner = GetParent( owner );

    MADRegSetDisplayGetPiece( modify_data.reg_set, regs, GetDlgCtrlID( hwnd ),
        &descript, &max_descript, (const mad_reg_info **) (&( modify_data.curr_info )),
        &( modify_data.th ), &( modify_data.maxv ) );
    MADTypeInfo( modify_data.curr_info->type, &tinfo );
    modify_data.curr_value = alloca( tinfo.b.bits / BITS_PER_BYTE );
    BitGet( modify_data.curr_value, (unsigned char *)regs, modify_data.curr_info->bit_start, modify_data.curr_info->bit_size);
    MADRegSetDisplayModify( modify_data.reg_set, modify_data.curr_info,
        (const mad_modify_list **)( &( modify_data.m_list ) ),
        &(modify_data.num_possible) );

    switch( modify_data.num_possible ) {
    case 2:
        if( memcmp( modify_data.curr_value, modify_data.m_list[0].data, tinfo.b.bits / BITS_PER_BYTE ) == 0 ){
            memcpy( modify_data.curr_value, modify_data.m_list[1].data, tinfo.b.bits / BITS_PER_BYTE );
        }else {
            memcpy( modify_data.curr_value, modify_data.m_list[0].data, tinfo.b.bits / BITS_PER_BYTE );
        }
        reg_modified = 1;
        break;
    case 1:
        fp = (DLGPROC)MakeProcInstance( ChangeRegisterDialog, Instance );
        reg_modified = JDialogBoxParam( Instance, "CHANGE_REG_EDIT", owner, fp, (LPARAM)( &modify_data ) );
        FreeProcInstance( fp );
        break;
    default:
        fp = (DLGPROC)MakeProcInstance( ChangeRegisterDialog, Instance );
        reg_modified = JDialogBoxParam( Instance, "CHANGE_REG_COMBO", owner, fp, (LPARAM)( &modify_data ) );
        FreeProcInstance( fp );
    }
    if( reg_modified == 1 ) {
        MADRegUpdateStart( regs, modify_data.curr_info->flags, modify_data.curr_info->bit_start, modify_data.curr_info->bit_size );
        BitPut( (unsigned char *)regs, modify_data.curr_info->bit_start, modify_data.curr_value, modify_data.curr_info->bit_size );
        MADRegUpdateEnd( regs, modify_data.curr_info->flags, modify_data.curr_info->bit_start, modify_data.curr_info->bit_size );
    }
}
Exemple #3
0
/*
 * WindowProc - handle messages for the main application window
 */
LONG FAR PASCAL WindowProc( HWND window_handle, unsigned msg,
                                     UINT wparam, LONG lparam )
/*************************************************************/
{
    FARPROC             proc;
    HANDLE              inst_handle;
    WORD                cmd;
    /*
     * now process the message
     */
    switch( msg ) {
    case WM_CREATE:
        inst_handle = GET_HINST( window_handle );
        break;
    case WM_CLOSE:
        return( DefWindowProc( window_handle, msg, wparam, lparam ) );
        break;
    case WM_COMMAND:
        cmd = LOWORD( wparam );
        switch( cmd ) {
        case MENU_ABOUT:
            inst_handle = GET_HINST( window_handle );
            proc = MakeProcInstance( about_proc, inst_handle );
            DialogBox( inst_handle,"AboutBx", window_handle, proc );
            FreeProcInstance( proc );
            break;
        case MENU_EXIT:
            SendMessage( window_handle, WM_CLOSE, 0, 0L );
            break;
        case MENU_CALC:
            inst_handle = GET_HINST( window_handle );
            proc = MakeProcInstance( inp_setup_proc, inst_handle );
            DialogBox( inst_handle, "DATABX", window_handle, proc );
            FreeProcInstance( proc );
            SendMessage( window_handle, WM_CLOSE, 0, 0L );
            break;
        }
        return 0;
    case WM_DESTROY:
        PostQuitMessage( 0 );
        break;

    default:
        return( DefWindowProc( window_handle, msg, wparam, lparam ) );
    }
    return( 0L );

} /* WindowProc */
Exemple #4
0
void DisplayAccel( void )
{
    FARPROC     fp;
    char        buf[256];

    fp = MakeProcInstance( (FARPROC)GetAccelNameDlgProc, Instance );
    DialogBox( Instance, "GET_RES_NAME_DLG" , NULL, (DLGPROC)fp );
    FreeProcInstance( fp );
    Accel = LoadAccelerators( Instance, accelName );
    if( Accel == NULL ) {
        sprintf( buf, "Can't Load Accelerator %s", accelName );
        Error( "Accelerator", buf );
        return;
    }
    AccelHwnd = CreateWindow(
        MENU_CLASS,             /* Window class name */
        "Accelerator test window",/* Window caption */
        WS_OVERLAPPEDWINDOW,    /* Window style */
        CW_USEDEFAULT,          /* Initial X position */
        CW_USEDEFAULT,          /* Initial Y position */
        500,                    /* Initial X size */
        200,                    /* Initial Y size */
        NULL,                   /* Parent window handle */
        NULL,                   /* Window menu handle */
        Instance,               /* Program instance handle */
        NULL );                 /* Create parameters */
    if( AccelHwnd == NULL ) return;
    ShowWindow( AccelHwnd, SW_SHOW );
    UpdateWindow( AccelHwnd );
}
Exemple #5
0
Bool WREInitResources( HINSTANCE inst )
{
    WREResInfoBrush = CreateSolidBrush( GetSysColor( COLOR_BTNFACE ) );
    WREAppInst = inst;
    WREResInfoWinProc = (DLGPROC)MakeProcInstance( (FARPROC)WREResInfoProc, inst );
    return( WREInitStaticVars() );
}
WRSelectImageInfo * WRAPI WRSelectImage( HWND parent, WRInfo *rinfo, FARPROC hcb )
{
    DLGPROC             proc;
    HINSTANCE           inst;
    INT_PTR             modified;
    WRSelectImageInfo   *info;

    if( rinfo == NULL ) {
        return( NULL );
    }

    info = (WRSelectImageInfo *)MemAlloc( sizeof( WRSelectImageInfo ) );
    if( info == NULL ) {
        return( NULL );
    }
    memset( info, 0, sizeof( WRSelectImageInfo ) );

    info->hcb = hcb;
    info->info = rinfo;

    inst = WRGetInstance();

    proc = (DLGPROC)MakeProcInstance( (FARPROC)WRSelectImageProc, inst );

    modified = JDialogBoxParam( inst, "WRSelectImage", parent, proc, (LPARAM)info );

    FreeProcInstance( (FARPROC)proc );

    if( modified == -1 || modified == IDCANCEL ) {
        MemFree( info );
        info = NULL;
    }

    return( info );
}
Exemple #7
0
/*
 * ShowStartupDialog - show the startup dialog
 */
void ShowStartupDialog( void )
{
    startDlgProc = MakeProcInstance( (FARPROC) StartupProc, InstanceHandle );
    startDlgWindow = CreateDialog( InstanceHandle, "Startup", (HWND)NULLHANDLE,
                                   (DLGPROC) startDlgProc );

} /* ShowStartupDialog */
Exemple #8
0
DDEbase::DDEbase()
{
    m_idDDE = 0;
    FARPROC lpDdeProc = MakeProcInstance((FARPROC) DDECallback, hInstance);
    DdeInitializeA((LPDWORD) &m_idDDE, (PFNCALLBACK) lpDdeProc,	APPCMD_CLIENTONLY, 0L);
    base = this;
}
Exemple #9
0
Bool WdeSetCurrentCustControl( int which )
{
    int       ret;
    HINSTANCE inst;
    FARPROC   proc;

    if( WdeCustomLibList == NULL ) {
        WdeSetStatusByID( -1, WDE_NOCUSTLOADED );
        return( TRUE );
    }

    if( !WDE_CHECK_WHICH( which ) ) {
        WdeWriteTrail( "WdeSetCurrentCustControl: bad which!" );
        return( FALSE );
    }

    inst = WdeGetAppInstance();
    proc = MakeProcInstance( (FARPROC)WdeSelectCustProc, inst );
    if( proc == NULL ) {
        WdeWriteTrail( "WdeSetCurrentCustomControl: MakeProcInstance failed!" );
        return( FALSE );
    }
    ret = JDialogBoxParam( inst, "WdeSelectCustom", WdeGetMainWindowHandle(),
                           (DLGPROC)proc, (LPARAM)(LPVOID)&which );
    FreeProcInstance( proc );

    /* if the window could not be created return FALSE */
    if( ret == -1 ) {
        WdeWriteTrail( "WdeSetCurrentCustomControl: Could not create selection window!" );
        return( FALSE );
    }

    return( TRUE );
}
Exemple #10
0
bool WREQueryPasteReplace( WResID *name, uint_16 type, bool *replace )
{
    WREPasteData        pdata;
    HWND                dialog_owner;
    DLGPROC             proc_inst;
    HINSTANCE           inst;
    INT_PTR             ret;

    if( name == NULL || type == 0 || replace == NULL ) {
        return( FALSE );
    }

    pdata.ret = 0;
    pdata.type = type;
    pdata.name = name;
    *replace = FALSE;
    dialog_owner  = WREGetMainWindowHandle();
    inst = WREGetAppInstance();
    proc_inst = (DLGPROC)MakeProcInstance( (FARPROC)WREResPasteProc, inst );

    ret = JDialogBoxParam( inst, "WREPaste", dialog_owner, proc_inst, (LPARAM)&pdata );

    FreeProcInstance( (FARPROC)proc_inst );

    if( ret == -1 || ret == IDCANCEL ) {
        return( FALSE );
    }

    if( ret == IDM_PASTE_REPLACE ) {
        *replace = TRUE;
    }

    return( TRUE );
}
Exemple #11
0
// front end
void EngineOutputPopUp()
{
  FARPROC lpProc;
  static int  needInit = TRUE;
  
  CheckMenuItem(GetMenu(hwndMain), IDM_ShowEngineOutput, MF_CHECKED);

  if( engineOutputDialog ) {
    SendMessage( engineOutputDialog, WM_INITDIALOG, 0, 0 );

    if( ! engineOutputDialogUp ) {
        ShowWindow(engineOutputDialog, SW_SHOW);
    }
  }
  else {
    lpProc = MakeProcInstance( (FARPROC) EngineOutputProc, hInst );

    /* Note to self: dialog must have the WS_VISIBLE style set, otherwise it's not shown! */
    CreateDialog( hInst, MAKEINTRESOURCE(DLG_EngineOutput), hwndMain, (DLGPROC)lpProc );

    FreeProcInstance(lpProc);
  }

  // [HGM] displaced to after creation of dialog, to allow initialization of output fields
  if( needInit ) {
      InitializeEngineOutput();
      needInit = FALSE;
  }

  engineOutputDialogUp = TRUE;
}
Exemple #12
0
/***********************************************************************
 *
 *           DIALOG_ProgramAttributes
 */
BOOL DIALOG_ProgramAttributes(LPSTR lpszTitle, LPSTR lpszCmdLine,
			      LPSTR lpszWorkDir, LPSTR lpszIconFile,
			      HICON *lphIcon, INT *lpnIconIndex,
			      INT *lpnHotKey, INT *lpnCmdShow, INT nSize)
{
  CHAR szTmpIconFile[MAX_PATHNAME_LEN];
  DLGPROC lpfnDlg = MakeProcInstance(DIALOG_PROGRAM_DlgProc, Globals.hInstance);
  INT ret;

  ProgramAttributes.nSize = nSize;
  ProgramAttributes.lpszTitle = lpszTitle;
  ProgramAttributes.lpszCmdLine = lpszCmdLine;
  ProgramAttributes.lpszWorkDir = lpszWorkDir;
  ProgramAttributes.lpszIconFile = lpszIconFile;
  ProgramAttributes.lpnCmdShow = lpnCmdShow;
  ProgramAttributes.lpnHotKey = lpnHotKey;
  ProgramAttributes.lphIcon = lphIcon;
  ProgramAttributes.lpnIconIndex = lpnIconIndex;

#if 0
  ProgramAttributes.hTmpIcon = 0;
#else
  ProgramAttributes.hTmpIcon = *lphIcon;
#endif
  ProgramAttributes.nTmpIconIndex = *lpnIconIndex;
  ProgramAttributes.lpszTmpIconFile = szTmpIconFile;
  lstrcpyn(ProgramAttributes.lpszTmpIconFile, lpszIconFile, MAX_PATHNAME_LEN);

  ret = DialogBox(Globals.hInstance,  STRING_PROGRAM,
		  Globals.hMainWnd, lpfnDlg);
  FreeProcInstance(lpfnDlg);

  return(ret == IDOK);
}
Exemple #13
0
int TimedMsgBox(HINSTANCE hInst, HWND hwnd, LPSTR lpText,
				 LPSTR lpCaption, UINT wBoxType, UINT def_resp, UINT timeoutval)
{
	FARPROC lpfnMsgBoxProc;
	HGLOBAL hGlob;
	LPMSGBOXINFO pBoxInfo;
	int retval;

	hGlob = GlobalAlloc(GHND,sizeof(MSG_BOX_INFO));
	if (hGlob == NULL)
	{
		return(-1);
	}
	pBoxInfo = (LPMSGBOXINFO)GlobalLock(hGlob);

	pBoxInfo->lptext = lpText;
	pBoxInfo->lpcaption = lpCaption;
	pBoxInfo->boxtype = wBoxType;
	pBoxInfo->defresp = def_resp;
	pBoxInfo->timeoutval = timeoutval;
	
	GlobalUnlock(hGlob);

	lpfnMsgBoxProc = MakeProcInstance((FARPROC)MsgBoxProc,hInst);
	retval = DialogBoxParam(hInst,"TimedMsgBoxDummy",hwnd,(DLGPROC)lpfnMsgBoxProc,(LPARAM)(void FAR *)hGlob);
	FreeProcInstance(lpfnMsgBoxProc);

	GlobalFree(hGlob);
	return(retval);
}
Exemple #14
0
void FileOpen(HWND hwndOwner)
	{
	OPENFILENAME ofn;


    /* fill in non-variant fields of OPENFILENAME struct. */
    ofn.lStructSize       = sizeof(OPENFILENAME);
    ofn.hwndOwner	  = hwndOwner;
    ofn.lpstrFilter	  = szFilterSpec;
    ofn.lpstrCustomFilter = NULL;
    ofn.nMaxCustFilter	  = 0;
    ofn.nFilterIndex	  = 1;
    ofn.lpstrFile         = szFileName;
    ofn.nMaxFile	  = 120;
    ofn.lpstrInitialDir   = NULL;
    ofn.lpstrFileTitle    = NULL;
    ofn.nMaxFileTitle     = 120;
    ofn.lpstrTitle        = TEXT( "yahoo" );
    ofn.lpstrDefExt       = TEXT( "TXT" );
    ofn.Flags = OFN_ENABLEHOOK;
	 ofn.lpfnHook = MakeProcInstance(OpenHook, hinstApp);
    ofn.lCustData = 0;
    ofn.lpTemplateName = 0;

	fFirst = TRUE;
   GetOpenFileName ((LPOPENFILENAME)&ofn);
	FreeProcInstance(ofn.lpfnHook);
	}
static void PASCAL BuildFaceList (HWND hDlg, char *FaceName)

/* This function initializes the Font list box with fixed fonts matching
   the current charset selection and then selects an item */
{
    SendDlgItemMessage (hDlg, ID_FONTSIZE, WM_SETREDRAW, FALSE, 0L);
    SendDlgItemMessage (hDlg, ID_FONT, LB_RESETCONTENT, 0, 0L);
    {
	HDC     hDC;
	FARPROC ProcInstance;

	hDC = GetDC (hDlg);
	ProcInstance = MakeProcInstance ((FARPROC)EnumFacesProc,
					 hEmacsInstance);
	EnumFonts (hDC, NULL, ProcInstance, LPDATA(&hDlg));
	FreeProcInstance (ProcInstance);
	ReleaseDC (hDlg, hDC);
    }
    SendDlgItemMessage (hDlg, ID_FONT, WM_SETREDRAW, TRUE, 0L);
    InvalidateRect (GetDlgItem (hDlg, ID_FONT), NULL, TRUE);
    /*-select the same facename as before or default to the first item */
    if (SendDlgItemMessage (hDlg, ID_FONT, LB_SELECTSTRING, -1,
                            (DWORD)FaceName) == LB_ERR) {
	SendDlgItemMessage (hDlg, ID_FONT, LB_SETCURSEL, 0, 0L);
    }
    BuildSizeList (hDlg, &Metrics);
} /* BuildFaceList */
Exemple #16
0
bool WdeCreateInfoWindow( HWND main_window, HINSTANCE inst )
{
    if( !WdeInitInfoText() ) {
        return( FALSE );
    }

    WdeInfoWinProc = (DLGPROC)MakeProcInstance ( (FARPROC)WdeInfoWndProc, inst );

    WdeInfoColor = GetSysColor( COLOR_BTNFACE );
    WdeInfoBrush = CreateSolidBrush( WdeInfoColor );

    WdeInfoWindow = JCreateDialog( inst, "WdeInfo", main_window, WdeInfoWinProc );

    /* if the window could not be created return FALSE */
    if ( WdeInfoWindow == NULL ) {
        WdeWriteTrail( "WdeCreateInfoWindow: Could not create info window!" );
        return( FALSE );
    }

    WdeInfoWindowDepth = 0;

    WdeResizeWindows();

    return( TRUE );
}
Exemple #17
0
// creates the eval graph, or unhides it.
VOID EvalGraphPopUp()
{
  FARPROC lpProc;
  
  CheckMenuItem(GetMenu(hwndMain), IDM_ShowEvalGraph, MF_CHECKED);

  if( evalGraphDialog ) {
    SendMessage( evalGraphDialog, WM_INITDIALOG, 0, 0 );

    if( ! evalGraphDialogUp ) {
        ShowWindow(evalGraphDialog, SW_SHOW);
    }
  }
  else {
    crWhite = appData.evalHistColorWhite;
    crBlack = appData.evalHistColorBlack;

    lpProc = MakeProcInstance( (FARPROC) EvalGraphProc, hInst );

    /* Note to self: dialog must have the WS_VISIBLE style set, otherwise it's not shown! */
    CreateDialog( hInst, MAKEINTRESOURCE(DLG_EvalGraph), hwndMain, (DLGPROC)lpProc );

    FreeProcInstance(lpProc);
  }

  evalGraphDialogUp = TRUE;
}
Exemple #18
0
int ViewMarksDialog( HWND hwndParent, WND_DATA *pWndData )
{
  int nResult;
  FARPROC pfnProc;

  bChange = FALSE;
  po = pWndData;
  pLevel = pWndData->pLevelData + pWndData->level_index;
  hParent = hwndParent;
  
  pfnProc = MakeProcInstance( (FARPROC)ViewMarks_DlgProc, hInst );

  nResult = DialogBox( hInst,
                       IDD_VIEW_MARKS,
                       hwndParent,
                       (DLGPROC)pfnProc );

  FreeProcInstance( pfnProc );

  if ( bChange )
  {
    Object_DeleteUndoData( hwndParent, pWndData );
  }
    
  return nResult;
    
} // ViewMarksDialog
Exemple #19
0
/*
 * GetReplaceStringDialog - create dialog settings
 */
bool GetReplaceStringDialog( fancy_find *ff )
{
    DLGPROC     proc;
    bool        rc;

    findData.find = ff->find;
    findData.findlen = ff->findlen;
    findData.replace = ff->replace;
    findData.replacelen = ff->replacelen;
    proc = (DLGPROC) MakeProcInstance( (FARPROC) RepDlgProc, InstanceHandle );
    rc = DialogBox( InstanceHandle, "REPDLG", Root, proc );
    FreeProcInstance( (FARPROC) proc );
    SetWindowCursor();

    if( strlen( findData.find ) == 0 ) {
        // no find string so pretend user cancelled
        rc = FALSE;
    }

    if( rc ) {
        ff->case_ignore = findData.case_ignore;
        ff->use_regexp = findData.use_regexp;
        // ff->search_forward = findData.search_forward;
        ff->search_wrap = findData.search_wrap;
        ff->prompt = findData.prompt;
        // ff->selection = findData.selection;
    }
    return( rc );

} /* GetReplaceStringDialog */
Exemple #20
0
int ViewItemsDialog( HWND hwndParent, WND_DATA *pWndData )
{
  int nResult;
  FARPROC pfnProc;

  bChange = FALSE;

  po = pWndData;
  
  pfnProc = MakeProcInstance( (FARPROC)ViewItems_DlgProc, hInst );

  nResult = DialogBox( hInst,
                       IDD_VIEW_ITEMS,
                       hwndParent,
                       (DLGPROC)pfnProc );

  FreeProcInstance( pfnProc );

  if ( bChange )
  {
    Object_DeleteUndoData( hwndParent, pWndData );
  }
    
  return nResult;
    
} // ViewItemsDialog
Exemple #21
0
// front end
void ChatPopUp(char *icsHandle)
{
  FARPROC lpProc;
  int i, partner = -1;
  char buf[MSG_SIZ];
  static int first = 1;

  CheckMenuItem(GetMenu(hwndMain), IDM_NewChat, MF_CHECKED);
  for(i=0; i<MAX_CHAT; i++) if(chatHandle[i] == NULL) { partner = i; break; }
  if(partner == -1) { DisplayError("You first have to close a Chat Box\nbefore you can open a new one", 0); return; }
  if(icsHandle) { // [HGM] clickbox set handle in advance
    safeStrCpy(chatPartner[partner], icsHandle,
	       sizeof(chatPartner[partner])/sizeof(chatPartner[partner][0]) );
    if(sscanf(icsHandle, "%d", &i) == 1) { // make sure channel is on
	snprintf(buf, MSG_SIZ, "addlist ch %d\n", i);
	SendToICS(buf);
	if(first) first=0, SendToICS(buf); // work-around for weirdness: On public FICS code first attempt on login is completely ignored
    }
  } else chatPartner[partner][0] = NULLCHAR;
  chatCount++;

    lpProc = MakeProcInstance( (FARPROC) ChatProc, hInst );

    /* Note to self: dialog must have the WS_VISIBLE style set, otherwise it's not shown! */
    CreateDialog( hInst, MAKEINTRESOURCE(DLG_Chat), hwndConsole, (DLGPROC)lpProc );

    FreeProcInstance(lpProc);

}
Exemple #22
0
void DisplayMessageTable( void ) {

    DLGPROC     fp;
    DWORD       lang;
    DWORD       id;
    char        buf[256];
    DWORD       ret;

    /* get language id */
    getNumCaption = "Enter the language id for the message in hex";
    fp = (DLGPROC)MakeProcInstance( GetMsgNumDlgProc, Instance );
    DialogBox( Instance, "GET_NUM_DLG" , NULL, fp );
    lang = lastNum;

    /* get msg number */
    getNumCaption = "Enter the message id for the message in hex";
    DialogBox( Instance, "GET_NUM_DLG" , NULL, fp );
    id = lastNum;
    FreeProcInstance( fp );
    ret = FormatMessage(
                FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_FROM_HMODULE,
                GetModuleHandle( NULL ),
                id,
                lang,
                buf,
                sizeof( buf ),
                NULL );
    if( ret == 0 ) {
        sprintf( buf, "Language %08lX, Msg: %08lX not loaded.  err code: %ld",
                 lang, id, GetLastError() );
        MessageBox( NULL, buf, "Message Table Error" , MB_OK );
    } else {
        MessageBox( NULL, buf, "Message from Messagetable", MB_OK );
    }
}
Exemple #23
0
bool WREEditResourceSymbols( WREResInfo *info )
{
    WRHashEntryFlags    flags;
    FARPROC             cb;
    bool                ok;

    cb = NULL;
    ok = (info != NULL && info->symbol_table != NULL);

    if( ok ) {
        cb = MakeProcInstance( (FARPROC)WREHelpRoutine, WREGetAppInstance() );
        ok = (cb != (FARPROC)NULL);
    }

    if( ok ) {
        flags = WR_HASHENTRY_ALL;
        ok = WREditSym( info->info_win, &info->symbol_table, &flags, cb );
    }

    // ***** call routine to update the edit sessions *****

    if( cb != (FARPROC)NULL ) {
        FreeProcInstance( (FARPROC)cb );
    }

    return( ok );
}
Exemple #24
0
WORD FAR PASCAL TMICfgQry (VISMEMHDL mhCfgMem)
{
    DIGCFG FAR *lpDigCfg;    
    FARPROC     lpPrcAdr;
    int         iRetCod;

    /********************************************************************/
    /********************************************************************/
    if (NULL == (lpDigCfg = GloMemLck (mhCfgMem))) {
        return ((WORD) -1);
    }

    /********************************************************************/
    /********************************************************************/
    lpPrcAdr = MakeProcInstance ((FARPROC) CfgEdtBoxPrc, TMIGlo.hLibIns);
    iRetCod = DialogBoxParam (TMIGlo.hLibIns, "SYSCFGBOX", GetParWnd (NULL), 
        (DLGPROC) lpPrcAdr, (DWORD) (LPVOID) &lpDigCfg->tdTMIDef.scSysCfg);
    FreeProcInstance ((FARPROC) lpPrcAdr);

    /********************************************************************/
    /********************************************************************/
    GloMemUnL (mhCfgMem);
    return (iRetCod);
  
}
Exemple #25
0
static ExtendedSort() {

    FARPROC     dialproc;

    dialproc = MakeProcInstance( ExtendedSortProc, Instance );
    JDialogBox( Instance, "EXTEND_SORT", HeapWalkMainWindow, dialproc );
    FreeProcInstance( dialproc );
} /* ExtendedSort */
Exemple #26
0
void WInitEditWindows( HINSTANCE inst )
{
    _wtouch( inst );

    WEditWinColor = GetSysColor( COLOR_BTNFACE );
    WEditWinBrush = CreateSolidBrush( WEditWinColor );
    WMenuEditWinProc = (DLGPROC)MakeProcInstance( (FARPROC)WMenuEditProc, inst );
}
Exemple #27
0
void WInitEditDlg( HINSTANCE inst, HWND parent )
{
    FARPROC     lpProc;

    lpProc = MakeProcInstance( (FARPROC)WTestProc, inst );
    JCreateDialog( inst, "WMenuEditDLG", parent, (DLGPROC)lpProc );
    FreeProcInstance( lpProc );
}
Exemple #28
0
void WdeDisplaySplashScreen( HINSTANCE inst, HWND parent, UINT msecs )
{
    FARPROC     lpProcAbout;

    lpProcAbout = MakeProcInstance( (FARPROC)WdeSplash, hInstWde );
    JDialogBoxParam( inst, "WdeSplashScreen", parent, (DLGPROC)lpProcAbout, (LPARAM)&msecs );
    FreeProcInstance( lpProcAbout );
}
Exemple #29
0
void AnotateLog( HWND hwnd, HANDLE Instance, void (*fn)(char *)  ) {

    FARPROC     fp;

    fp = MakeProcInstance( (FARPROC)NoteLogDlgProc, Instance );
    JDialogBoxParam( Instance, "NOTE_LOG", hwnd, (DLGPROC)fp, (LPARAM)fn );
    FreeProcInstance( fp );
}
Exemple #30
0
static void SubClassMDIBegin (LPOLDGLOBALS lp)
{
 FARPROC  lpfnNewFarProc;
 HANDLE   hInst;
 hInst = GetWindowInstance(GetParent (lp->hWnd));
 lpfnNewFarProc = MakeProcInstance ((FARPROC) CallBack, hInst);
 lp->lpfnOldFarProc = (FARPROC) SetWindowLong (lp->hWnd,GWL_WNDPROC,(long) lpfnNewFarProc);
}