Hey Thanks for response.
Well I have a function which takes the list of Strings as input. Now I need to supply this list into another function which does not take this list directly. As the 2nd function takes the input in form of LPWSTR*, hence I have to convert it. In below code itemWChar is defined as ATL::CComBSTR and _itemWChar is the string which is going to have the value of each ItemId in every iteration of loop. I think I am clear now....????
//itemIds is List<string^>^. (I am writing the managed code here)
for(DWORD i = 0; i < itemIds->Count; i++)
itemWChar = ::GetAtlBstr(itemIds[i]);
memset(_itemWChar, 0, sizeof(_itemWChar) / sizeof(_itemWChar));
memcpy(_itemWChar, static_cast(itemWChar), itemWChar.ByteLength());
items[i] = _itemWChar;
If you are using managed code, then you should ask your question in the managed C++ forum. This forum is for C++ only.
Anyway, the link I gave you could still be very usefull to understand the different strings.
i thought ON_EN_CHANGE can only used for CEdit control because MicroSoft defined the ON_EN_CHANGE:
// Edit Control Notification Codes#define ON_EN_CHANGE(id, memberFxn) \
ON_CONTROL(EN_CHANGE, id, memberFxn)
* Edit Control Notification Codes
*/#define EN_CHANGE 0x0300
and in MSDN:
Edit Control Handlers
ON_EN_CHANGE( <id>, <memberfxn> ) afx_msg void memberFxn( );
all of these defined in CEdit, so why i can used in IPCtrl? thank u very much.
Because the IP Address control is made up of four edit controls, so IP address control must be forwarding this message to it's parent window.
the IP Address control is made up of four edit controls? but we know:
class CIPAddressCtrl : public CWnd
class CEdit : public CWnd
so it seems like no this relation between CIPAddressCtrl and CEdit?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
Well, of course if you want to have a valid bmp image in the file, you should follow the .bmp file format. You can't just write a bunch of bytes into a file and expects that it will be interpreted as a bitmap. See here[^] for more information.
For me, "binary data of an image" means the data part of the image (so, excluding the header). I think he has an array that he filled in some way with the values of the pixels of the image. Of course, this is just my opinion because he wasn't really clear.