Para que GiD funcione falta:

Makefile: cambiamos el nombre de las librerias para indicar que solo
          sirven para GiD.

     TKDLL = tk$(VERSION)gid.dll
     TKLIB = tk$(VERSION)gid.lib

--------------------------------------------------------------------------------

tkWinWm.c:

     static void InitWm(void)
     {
       (...)

       /* Cambiar:
          toplevelClass.style = CS_HREDRAW | CS_VREDRAW | CS_CLASSDC;
          por: */
       toplevelClass.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC | CS_SAVEBITS;
       (...)
       /* toplevelClass.hIcon = LoadIcon(Tk_GetHINSTANCE(), "tk"); */
        toplevelClass.hIcon = ( HICON)LoadImage( 0, "bitmaps\\gid.ico", IMAGE_ICON, 0, 0, 
                                LR_DEFAULTCOLOR | LR_DEFAULTSIZE | LR_LOADFROMFILE);
       (...)
     }

     en tk8.3.4 mirar funcion InitWindowClass

--------------------------------------------------------------------------------

tkWinX.c:

     void TkWinXInit(hInstance)
     HINSTANCE hInstance;
     {
       (...)

       /* Cambiar:
          toplevelClass.style = CS_HREDRAW | CS_VREDRAW | CS_CLASSDC;
          por: */
       toplevelClass.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC | CS_SAVEBITS;
  
       (...)
     }

	------------------

en tk8.3.4 no me va

	/* RAMSAN */
	static void GenerateXClientEvent _ANSI_ARGS_((HWND hwnd, UINT message,
			    WPARAM wParam, LPARAM lParam));

       int Tk_TranslateWinEvent(hwnd, message, wParam, lParam, resultPtr)
       {

	 ...

	 default: /* RAMSAN */
           {
	       GenerateXClientEvent(hwnd, message, wParam, lParam);
	       return 1;
           }
        }

    /* RAMSAN */
    static void GenerateXClientEvent(hwnd, message, wParam, lParam)
    	HWND hwnd;
    	UINT message;
    	WPARAM wParam;
    	LPARAM lParam;
    {
    	XEvent event;
    	TkWindow *winPtr = (TkWindow *)Tk_HWNDToWindow(hwnd);
    
    	if (!winPtr || winPtr->window == None) {
    	    return;
    	}
    
    	event.xany.serial = winPtr->display->request++;
    	event.xany.send_event = False;
    	event.xany.display = winPtr->display;
    	event.xany.window = winPtr->window;
    
    	event.type=ClientMessage;
    	event.xclient.message_type =
    	  Tk_InternAtom((Tk_Window) winPtr, "WINDOW_EVENTS");
    	event.xclient.format = 32;
    	event.xclient.data.l[0]=message;
    	event.xclient.data.l[1]=wParam;
    	event.xclient.data.l[2]=lParam;
    	    
    	Tk_QueueWindowEvent(&event, TCL_QUEUE_TAIL);
    }

--------------------------------------------------------------------------------

Tk.rc:

     //
     // Icons
     //
     tk                      ICON    DISCARDABLE     "tk.ico"
     gid                     ICON    DISCARDABLE     "GiD.ico"

en tk8.3.4 es el fichero tk_base.rc


Y añadir el archivo 'GiD.ico' en el directorio 'Tk8.0/Win/rc'

--------------------------------------------------------------------------------

tkWinWindow.c    (A partir de la version 8.0.5 ya no hace falta)

	Tk_Window Tk_HWNDToWindow(hwnd)
		HWND hwnd;
		{
		  /* RAMSAN adding. This condition was not controlled */
		  if(!initialized) return NULL;
		}

--------------------------------------------------------------------------------

tkWinCursor.c

Cambiar la funcion TkGetCursorByName a:

TkCursor *
TkGetCursorByName(interp, tkwin, string)
    Tcl_Interp *interp;		/* Interpreter to use for error reporting. */
    Tk_Window tkwin;		/* Window in which cursor will be used. */
    Tk_Uid string;		/* Description of cursor.  See manual entry
				 * for details on legal syntax. */
{
    struct CursorName *namePtr;
    TkWinCursor *cursorPtr;

    /*
     * Check for the cursor in the system cursor set.
     */

    for (namePtr = cursorNames; namePtr->name != NULL; namePtr++) {
	if (strcmp(namePtr->name, string) == 0) {
	    break;
	}
    }

    cursorPtr = (TkWinCursor *) ckalloc(sizeof(TkWinCursor));
    cursorPtr->info.cursor = (Tk_Cursor) cursorPtr;
    cursorPtr->winCursor = NULL;
    if (namePtr->name != NULL) {
	cursorPtr->winCursor = LoadCursor(NULL, namePtr->id);
	cursorPtr->system = 1;
    }
    if (cursorPtr->winCursor == NULL) {
	cursorPtr->winCursor = LoadCursor(Tk_GetHINSTANCE(), string);
	cursorPtr->system = 0;
    }
    /* RAMSAN adding */
    if (string[0] == '@') {
      int argc;
      char **argv = NULL;
      Tcl_DString bufferPtr;
      char* filename;
      if (Tcl_SplitList(interp, &string[1], &argc, &argv) != TCL_OK) {
	return NULL;
      }
      if (argc != 1) {
	ckfree((char *)cursorPtr);
	Tcl_Free((char *) argv);
	Tcl_AppendResult(interp, "bad cursor spec \"", string, "\"",
			 (char *) NULL);
	return NULL;
      }
      if (Tcl_IsSafe(interp)) {
	Tcl_AppendResult(interp, "can't get cursor from a file in",
			 " a safe interpreter", (char *) NULL);
	ckfree((char *)cursorPtr);
	Tcl_Free((char *) argv);
	return NULL;
      }
      filename=Tcl_TranslateFileName(interp,argv[0], &bufferPtr);
      if(!filename){
	ckfree((char *)cursorPtr);
	Tcl_Free((char *) argv);
	return NULL;
      }
      cursorPtr->winCursor = LoadCursorFromFile(filename);
      cursorPtr->system = 0;
      Tcl_DStringFree(&bufferPtr) ;
      Tcl_Free((char *) argv);
    }
    /* end RAMSAN adding */
    if (cursorPtr->winCursor == NULL) {
	ckfree((char *)cursorPtr);
	Tcl_AppendResult(interp, "bad cursor spec \"", string, "\"",
		(char *) NULL);
	return NULL;
    } else {
	return (TkCursor *) cursorPtr;
    }
}

-----------------------------------------------------------------------

tkWinButton.c

en la función TkpComputeButtonGeometry añadir:

TkpComputeButtonGeometry(butPtr)
    register TkButton *butPtr;	/* Button whose geometry may have changed. */
{
/*   RAMSAN change */
  int quitar = 0;

   .....

  if (butPtr->type != TYPE_LABEL) {
	    butPtr->inset += 3;
	    quitar = 3;
  }   

   .....

Tk_GeometryRequest(butPtr->tkwin, (int) (width + butPtr->indicatorSpace
	    + 2*butPtr->inset), (int) (height + 2*butPtr->inset - quitar));

----------------------------------------------------------------------

tkWinMain.c --- para quitar los espacios en blanco a la izquierda 
                de las entradas de menu ( no es mas que espacio reservado
                para los checckbutton)

en la funcion TkWinHandleMenuEvent 
(l 1049)
cambiar   itemPtr->itemWidth += 2 - indicatorDimensions[1];
por 	  itemPtr->itemWidth += 2 - indicatorDimensions[1] / 2;

en la funcion GetMenuIndicatorGeometry
(l 1301)
cambiar toda la rutina por:

  /* miguel 26.3.2003: if there is no checkbox, do not compute the space */
  if ((mePtr->type == CHECK_BUTTON_ENTRY)
      || (mePtr->type == RADIO_BUTTON_ENTRY)) {

    if (mePtr->hideMargin || !mePtr->indicatorOn) {
      int borderWidth;
      
      Tk_GetPixelsFromObj(menuPtr->interp, menuPtr->tkwin,
			  menuPtr->borderWidthPtr, &borderWidth);
      *heightPtr = 0;
      *widthPtr = borderWidth;
    } else {
      int borderWidth;
      
      Tk_GetPixelsFromObj(menuPtr->interp, menuPtr->tkwin,
			  menuPtr->borderWidthPtr, &borderWidth);
      *heightPtr = indicatorDimensions[0];
      *widthPtr = indicatorDimensions[1] - borderWidth;
    }
  } else {
    int borderWidth;
    
    Tk_GetPixelsFromObj(menuPtr->interp, menuPtr->tkwin,
			menuPtr->borderWidthPtr, &borderWidth);
    *heightPtr = 0;
    *widthPtr = borderWidth;
  }
  /* end miguel */



----------------------------------------------------------------------
