the error is:error C2664:'_itow':cannot convert parameter 2 from 'const unsigned short *'
how can i convert the parameter?(i do want to use the CString type not the char as showed in MSDN). so how to do it?
so it will be a pointer to a multibyte or unicode string depending on the project settings; if you choose "Use Unicode Character Set" on the General Tab of your project properties, then LPCSTR is a pointer to an unicode string.
I got an annoying anomaly with GDI+ i just can't understand. I created a 32 bit bitmap in memory, did some drawing on it and used it to display a layered window. This all works well except for one thing. I use Gdipluss::Graphics::DrawString to render some text onto this bitmap which seems to erase the alpha channel on the bitmap everywhere where letters of the text are drawn. Here's the simplified code i use:
Gdiplus::SolidBrush GxTextBrush(Gdiplus::Color(0, 0, 0));
Gdiplus::Font GxFont(MemDC, &LFont); //LFont is a LOGFONT and it is initialized to the default GUI font.
//... init textrect to the correct position...
//... set GxFormat to the needed values...
Gx.DrawString(text, textlength, &GxFont, TextRect, &GxFormat, &GxTextBrush);
Changing the GxTextBrush's color by adding an alpha component of 254 "fixes" the problem, but adding 255 produces the holes again, also making the font bold (LFont.lfWeight = FW_BOLD) seems to fix the problem also... so could someone please tell me what's the logic behind this? For now i set the alpha to 254 and go on with it...
Thanks for any light-sheding attempts in advance.
> The problem with computers is that they do what you tell them to do and not what you want them to do. < > Sometimes you just have to hate coding to do it well. <
I want to send a request to another system to run a URL.I tried with following code. Its showing error like URL is invalid. But im able to open that URL from my machine.But not able to open that URL using this code.
1. '/' is not an escape character so your url should be "http://126.96.36.199/..." not http:////...
2. Depending on what that the script at that url does, what you're trying to do might or might not work. Read about the HTTP protocolhere
in very simple terms, when using a http connection, you're making a request (that might contain some parameters - see GET/POST methods) and you receive a response - the html code that you see in your browser