LONDON — The back room on the ground floor of Lock & Co. Hatters is something of a tiny museum of the company’s 340-year history.

In a glass case is a large ledger listing orders from customers like Oscar Wilde and Winston Churchill, who wore a Lock silk top hat for his wedding in 1908. There is a reproduction of the bicorne worn by Nelson during the Battle of Trafalgar in 1805; the company still has the bill of sale. And there is a thank-you note from Charlie Chaplin, who helped make famous the Lock-designed Coke hat (pronounced “cook”) — known colloquially as the bowler, after Thomas Bowler, the shop’s chief hatter at its creation in 1849.

Framed and hanging on a wall are a number of autographed patterns, one-sixth scale patterns of customers’ heads, including Laurence Olivier, Jacqueline Kennedy and Emperor Akihito of Japan.

“The heritage is incredibly important,” said Sue Simpson, Lock’s director. “But what is really important as well is the quality of product and the service.” Achieving all three has been the business’s cornerstone, along with satisfying customers.

While the Coke hat was part of the unofficial uniform of city bankers in the mid-20th century, today its trilby hats and flat caps are worn by the likes of David Beckham and Johnny Depp. Prince Charles dons Lock top hats for many official events (the company holds royal warrants for both the prince and his father, Prince Philip), and his daughter-in-law, Catherine, Duchess of Cambridge, has worn a number of its ladies’ hats, including a red maple leaf-decorated hat during her 2011 official tour of Canada.

As the British summer social season kicks off, with events ranging from the Chelsea Flower Show to Wimbledon, Lock is at its busiest with custom orders. To celebrate the anniversary, it has introduced a new range of flat caps and panamas for children, and has redesigned its website, which now includes videos on hat maintenance. Later this year, it intends to add a blog.

“They are the ultimate authority on hats in Britain,” said Ailsa Miller, fashion associate with the British society magazine Tatler. “Having a hat from there is not a status symbol, like an ‘It’ bag or a flashy thing. It is more just being in the know and you knew to go to the right place.”

Lock was founded by Robert Davis across the street from its current location at 6 St. James’s St., which the company says is the oldest hat shop in the world. And it still is family owned.

While men’s hats are now made off-site (though ribbon replacements and brim trimming still happen in the shop), the ladies’ hats are all created on the premises, and ready-made hats are available. Sylvia Fletcher, who started designing the Lock women’s collection in 1993, still introduces about 15 new styles each season.

But, the company says, a large number of its female customers prefer bespoke creations, which can take four to five weeks to make.

During an initial consultation, a sales staff member and one of the hatmakers discuss everything from hair color to face shape with the client. (If the hat is being made for an event like Ascot, it will be noted in the order so two women will not end up wearing the same style of hat to the same occasion.)

The customer is then measured, and, if the hat must be dyed to match an outfit, she is asked to either leave a fabric swatch for matching or the entire outfit.

Dyeing, said Ruth Ravenscroft, the company’s creative director, is an art in itself; it can take anywhere from a few hours to several days to get the color right. Depending on the hat’s materials — usually banana plant fiber, felt or silk — the color produced by one vat of dye can look very different.

“We always go the extra mile,” said Ms. Ravenscroft. “If we have a color we are not sure of and we have worked and worked, occasionally we make up two hats so we give the client a choice. We ask them which direction they think looks best in a shot fabric, because if they turn one way you get one color and another way, another color.”

After measurements are taken, the block to shape the hat is taken out, the fabric is cut (the long rolls like banana plant fiber come in varying colors from rich blues to light pinks) and the crown and brim are sewn together.

Variations to the hat are made during this process; for example, if a client wants to add a veil or have a ribbon affixed to the back rather than the front.

“We have kept photos of everything since ladies’ hats was launched,” said Hannah Rigby, the company’s head of marketing and public relations. “So if they like the look of something and we still have the block, we can make it.”

While the heritage and quality of the hats are important, many customers say it is the service that keeps them returning.

The hats “are beautifully made, first-class craftsmanship,” said Deanna Maria Peters, a longtime client who has about 60 of the company’s ladies’ hats. “It is like going home. They are just so helpful; they make you feel so welcome.”