1. Why I couldn't use this function?
Hello all:
I create a single document,and a modelless dialog is called by menu,look:
void CSampleView::OnTest()
if(!D11.m_hWnd)
{
D11.Create(IDD_D11,this);
D11.ShowWindow(SW_SHOW);
}
and now I want to get the printer of dialog,look:
void CSampleView::OnLButtonDown(UINT nFlags, CPoint point)
{
CD11 *p=(CD11*)this->GetDlgItem(IDD_D11);
if(p) MessageBox("you");
else MessageBox("null");
}
but it always display "null",
I know I can use the variable "D11" to get the dialog's function and
member,but I want to know why I couldn't use this function GetDlgItem?
(Maybe I want to get the pointer in class CMainFrame or other class,should I
do)
Thank you very much.
hello all: My OS is XP,and I use VC6, First I create a raw socket,then set IP_HDRINCL,look: m_skicmp=socket(AF_INET,SOCK_RAW,IPPROTO_ICMP); BOOL bopt=TRUE; setsockopt(m_skicmp,IPPROTO_IP,IP_HDRINCL,(char*)&bopt,sizeof(bopt)); then I fill data in IP and ICMP packet,but in the IP packet the resourse IP isn't my local IP,I fill another IP,but when I send the data: sendto(m_skicmp,buf,sizeof(buf),0,(struct sockaddr*)&addrto,sizeof(struct sockaddr)); it displya error,the error number is 10004, I want to know what I do if I replace the resource IP with another IP in IP packet?
5. Why does ListView.Sorting call RecreateHandle?
I'm impleneting a custom ListView with column sorting support and am deciding whether to reuse the Sorting property to indicate direction or create a new property. The only drawback I see is that Sorting calls RecreateHandle. Why does it do this just to support sorting? Would it be faster to do a SendMessage to tell the Win32 control to sort the same way Sort() does? Thanks, Sam
6. Question about ListView - resizing the last column: why does this work - CSharp/C#
7. couldn't load certificate from trusted people store on XP
Hi there,
I am writing a program which need to see the certificate in trusted
people store for security purpose. when I run the program, it says
"couldn't find the certificate in trusted people store ". I am using
VS2005 on XP sp2. I have imported a X509 certificate (c.pfx) into the
store on local machine account.
I wrote a small piece of code to see if the program can load cer from
the store but it returns 0. here under is the code:
System.Security.Cryptography.X509Certificates.X509Store theStore = new
System.Security.Cryptography.X509Certificates.X509Store("Trusted
People Store",StoreLocation.LocalMachine);
theStore .Open(OpenFlags.ReadOnly);
int count= theStore .Certificates.Count;
string qq = string.Empty;
System.Security.Cryptography.X509Certificates.X509Certificate2Collection
ff = (X509Certificate2Collection)theStore .Certificates;
foreach (X509Certificate2 rr in ff)
{
qq = rr.GetName();
}
x.Close();
Any idea?
Thanks!
Ron
8. Reg:Couldn't generate a report using Crystal Reports in .Net - CSharp/C#