We report the use of a new technique to measure the X-ray detection efficiency of a charge-coupled device (CCD) with subpixel resolution. The new technique makes use of a parallel X-ray beam and metal mesh placed just in front, of the CCD. The CCD camera we used is a conventional system using the TC213 (Texas Instrument Japan (TIJ)) whose pixel size is 12 mu m x 12 mu m with one million pixels. The mesh has 4 mu m diameter holes spaced at 12 mu m intervals, We produced an efficiency map within a typical pixel showing the gale structure in detail: a virtual gate, a clack gate and an antiblooming gate. The gate structure we measured is consistent with the manufacturer's design value. By selecting single pixel events, We detected a pixel boundary additional plans for application will also be discussed.