Try something like this,
LONG IF gGWorld& <>_false
gPixMap& = FN GETGWORLDPIXMAP(gGworld&)
LONG IF gPixMap& <> _false
LONG IF FN LOCKPIXELS(gPixMap&)
CALL GETGWORLD(OldPort&, OldDev&)
CALL SETGWORLD(gGWorld&, 0)
BaseAddress& = FN GETPIXBASEADDR (gPixMap&)
RowBytes& = PEEK WORD ([gPixMap&]+_rowBytes) AND &H3FFF
PixelAddr& = BaseAddress& + gPixelV% * RowBytes& + (gPixelH% << 2)
PixValue& = FN COLOR2INDEX(gNewPixRGB)
POKE LONG PixelAddr&, PixValue&
CALL SETGWORLD(OldPort&, OldDev&)
CALL UNLOCKPIXELS (gPixMap&)
END IF
END IF
END IF
NOTES!
gPixelV%, is the Vertical position in the window of the pixel you want to change.
gPixelH%, is the Horizontal position in the window of the pixel you want to change.
gNewPixRGB, is the 6 byte variable you are using to store the new settings for the pixel, ie DIM gNewPixRGB.6