It was really a good time to do things at night. The last time I got an IP address for half a day, I did not succeed. I sorted out my ideas this time, I carefully read the wxWidgets document. The English waste continues to be nipped in the E document ....) one-time success. The premise for obtaining the IP address of the Local Computer today is to get the name of the local computer. 650) this. width = 650; "onclick = 'window. open ("http://blog.51cto.com/viewpic.php? Refimg = "+ this. src) 'alt = "" src = "http://www.bkjia.com/uploads/allimg/131228/1ZU5IS-0.jpg" border = "0"/> directly paste the main code snippet, do memo 650) this. width = 650; "onclick = 'window. open ("http://blog.51cto.com/viewpic.php? Refimg = "+ this. src) 'src =" http://www.bkjia.com/uploads/allimg/131228/1ZU5I26-1.gif "align =" top "/> void ttFrame: showtxt (wxMouseEvent & event)
650) this. width = 650; "onclick = 'window. open (" http://blog.51cto.com/viewpic.php? Refimg = "+ this. src) 'src =" http://www.bkjia.com/uploads/allimg/131228/1ZU5I26-1.gif "align =" top "/> {
650) this. width = 650; "onclick = 'window. open (" http://blog.51cto.com/viewpic.php? Refimg = "+ this. src) 'src =" http://www.bkjia.com/uploads/allimg/131228/1ZU5I26-1.gif "align =" top "/>
650) this. width = 650; "onclick = 'window. open (" http://blog.51cto.com/viewpic.php? Refimg = "+ this. src) 'src =" http://www.bkjia.com/uploads/allimg/131228/1ZU5I26-1.gif "align =" top "/> // create wx4244address object
650) this. width = 650; "onclick = 'window. open (" http://blog.51cto.com/viewpic.php? Refimg = "+ this. src) 'src =" http://www.bkjia.com/uploads/allimg/131228/1ZU5I26-1.gif "align =" top "/> wx4244address addr;
650) this. width = 650; "onclick = 'window. open (" http://blog.51cto.com/viewpic.php? Refimg = "+ this. src) 'src =" http://www.bkjia.com/uploads/allimg/131228/1ZU5I26-1.gif "align =" top "/> // get the local computer name
650) this. width = 650; "onclick = 'window. open (" http://blog.51cto.com/viewpic.php? Refimg = "+ this. src) 'src =" http://www.bkjia.com/uploads/allimg/131228/1ZU5I26-1.gif "align =" top "/> wxString computerName =: wxGetFullHostName ();
650) this. width = 650; "onclick = 'window. open (" http://blog.51cto.com/viewpic.php? Refimg = "+ this. src) 'src =" http://www.bkjia.com/uploads/allimg/131228/1ZU5I26-1.gif "align =" top "/> // get the current user name
650) this. width = 650; "onclick = 'window. open (" http://blog.51cto.com/viewpic.php? Refimg = "+ this. src) 'src =" http://www.bkjia.com/uploads/allimg/131228/1ZU5I26-1.gif "align =" top "/> wxString username =: wxGetUserId ();
650) this. width = 650; "onclick = 'window. open (" http://blog.51cto.com/viewpic.php? Refimg = "+ this. src) 'src =" http://www.bkjia.com/uploads/allimg/131228/1ZU5I26-1.gif "align =" top "/> // assign a value to the hostname attribute of wx00004address (" computer name ")
650) this. width = 650; "onclick = 'window. open (" http://blog.51cto.com/viewpic.php? Refimg = "+ this. src)" src = "http://www.bkjia.com/uploads/allimg/131228/1ZU5I26-1.gif" align = "top"/> addr. Hostname (computerName );
650) this. width = 650; "onclick = 'window. open (" http://blog.51cto.com/viewpic.php? Refimg = "+ this. src) 'src =" http://www.bkjia.com/uploads/allimg/131228/1ZU5I26-1.gif "align =" top "/> // get the IP address
650) this. width = 650; "onclick = 'window. open (" http://blog.51cto.com/viewpic.php? Refimg = "+ this. src) 'src =" http://www.bkjia.com/uploads/allimg/131228/1ZU5I26-1.gif "align =" top "/> wxString ipaddr = addr. IPAddress ();
650) this. width = 650; "onclick = 'window. open (" http://blog.51cto.com/viewpic.php? Refimg = "+ this. src) 'src =" http://www.bkjia.com/uploads/allimg/131228/1ZU5I26-1.gif "align =" top "/>
650) this. width = 650; "onclick = 'window. open (" http://blog.51cto.com/viewpic.php? Refimg = "+ this. src) 'src =" http://www.bkjia.com/uploads/allimg/131228/1ZU5I26-1.gif "align =" top "/> // output data to the text box
650) this. width = 650; "onclick = 'window. open (" http://blog.51cto.com/viewpic.php? Refimg = "+ this. src) 'src =" http://www.bkjia.com/uploads/allimg/131228/1ZU5I26-1.gif "align =" top "/> txt_ip-> AppendText (ipaddr );
650) this. width = 650; "onclick = 'window. open (" http://blog.51cto.com/viewpic.php? Refimg = "+ this. src) 'src =" http://www.bkjia.com/uploads/allimg/131228/1ZU5I26-1.gif "align =" top "/>
650) this. width = 650; "onclick = 'window. open (" http://blog.51cto.com/viewpic.php? Refimg = "+ this. src) 'src =" http://www.bkjia.com/uploads/allimg/131228/1ZU5I26-1.gif "align =" top "/> txt_cmpname-> AppendText (computerName );
650) this. width = 650; "onclick = 'window. open (" http://blog.51cto.com/viewpic.php? Refimg = "+ this. src) 'src =" http://www.bkjia.com/uploads/allimg/131228/1ZU5I26-1.gif "align =" top "/>
650) this. width = 650; "onclick = 'window. open (" http://blog.51cto.com/viewpic.php? Refimg = "+ this. src) 'src =" http://www.bkjia.com/uploads/allimg/131228/1ZU5I26-1.gif "align =" top "/> txt_username-> AppendText (username );
650) this. width = 650; "onclick = 'window. open (" http://blog.51cto.com/viewpic.php? Refimg = "+ this. src) 'src =" http://www.bkjia.com/uploads/allimg/131228/1ZU5I26-1.gif "align =" top "/>
650) this. width = 650; "onclick = 'window. open (" http://blog.51cto.com/viewpic.php? Refimg = "+ this. src) 'src =" http://www.bkjia.com/uploads/allimg/131228/1ZU5I26-1.gif "align =" top "/>}
This article is from the "Jiu Li tribe" blog, please be sure to keep this source http://axiii.blog.51cto.com/396236/107886