HTTPS connection using Winhttp library (C++)

I have used WinHTTP library to establish a HTTP connection with my application to the server.(C++)

Now my next task is to make a HTTPS connection with the server. MSDN specifies how to do a http connection but when it comes to https there are additional flags that need to be sit.

Is there any document on how to do a HTTPS connection?

Thank you.