how to use NVAPI to open custom resolution in nviadia control panel?

how can I open custom resolution in nviadia control panel?
if I open custom resolution, I can write code change resolution.
but I close custom resolution, I can’t write code change resolution.

How can I write code to open custom resolution in nviadia control panel?