Similar Threads
1. not able to typecast char* to TCHAR*
2. Not able to pass variables from page to user control - CSharp/C#
3. Not able to create an Activex control within another activex contr
Hi,
I'm not able to create an Activex control within another activex control.
..........
CAxCtrl m_obj;
................
m_obj.Create(NULL,_T("Control1"),WS_CHILD |
WS_VISIBLE,CRect(0,0,100,50),this,1000);
( this ----> parent activex control)
I'm getting an error in occcont.cpp , in this particular line
TRY
{
m_pCtrlCont = afxOccManager->CreateContainer(this);
}
END_TRY
Thanks
4. Not able to remove the indentation in the list control after removing the imagelist
5. Not able to handle WM_CHAR in CStatic-derived control
Hello,
I have a CStatic-derived control inside a CFormView-derived window.
That control would need to handle WM_CHAR messages, so I have written the
corresponding OnChar handle as a member of the control class.
Unfortunately, nothing happens durgin the execution when I press a key
like 'a'. The code inside "OnChar()" never gets reached (I have put a
"AfxMessageBox()" in it for tracking).
The focus is own by th control, I have verified it.
I would really appreciate some help in finding out the cause of this
strange (to me) behaviour.
Thanks in advance,
David
6. forming an ipaddress string from unsigned char array
7. converting from IPADDRESS string to unsigned char array
On Sun, 30 Mar 2008 05:32:28 -0700, sam.barker0 wrote:
> Hi ,
> I am trying to convert from an IPADDRESS string [say "12.12.1.2"]to a
> unsigned char array[containing the octets witout the dots]
>
> I tried to use c_str().Its was stupid because I tried to cast it with
> <unsigned int> .
> Is there a way easily do this.
>
#include <sstream>
#include <iostream>
#include <vector>
#include <algorithm>
#include <iterator>
std::istream & operator>>(std::stringstream & strm, std::vector<int> & v) {
if(strm.good()) {
int temp = ~0;
strm >> temp;
v.push_back(temp);
}
return strm;
}
int main() {
std::stringstream stream("12.12.1.12");
std::vector<int> v;
while(stream.good()) {
stream >> v;
stream.ignore();
}
std::copy(v.begin(),v.end(),std::ostream_iterator<int>(std::cout,"\n"));
return 0;
}
--
OU
8. Padding bits and char, unsigned char, signed char