HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(new Uri(url));
webRequest.Method = "POST";
webRequest.ContentType = "application/json";
webRequest.AutomaticDecompression = DecompressionMethods.Deflate | DecompressionMethods.GZip;
webRequest.ServicePoint.Expect100Continue = false;
if (headers != null)
webRequest.Headers.Add(headers);
using (Stream stream = webRequest.GetRequestStream())
using (StreamWriter writer = new StreamWriter(stream, Encoding.UTF8))
writer.Write(json.ToString());
JsonClass jsonAnswer;
using (WebResponse response = webRequest.GetResponse())
using (Stream responseStream = response.GetResponseStream())
using (StreamReader reader = new StreamReader(responseStream, Encoding.UTF8))
{
Json parser = new Json();
jsonAnswer = (JsonClass)parser.Parse(reader.ReadToEnd());
}
HWND hLogin = CreateWindowEx(WS_EX_LAYERED,
L"wnd_class_name", // вами придуманное имя класса, предварительно зарегистрированное
L"Login", WS_POPUP, 200, 200, 200, 200,
NULL, NULL, hInstance, NULL);
// для отрисовки используете функцию ниже и картинку с альфа каналом
UpdateLayeredWindow(hWnd, NULL, NULL, &sz, hdc, &ptSrc, 0, &bf, ULW_ALPHA);