Update of /cvsroot/smartwin/SmartWin/tests/SmartSOAPGoogleAPITester
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv11669
Modified Files:
MainWindow.h
Log Message:
Unicode conversion
Index: MainWindow.h
===================================================================
RCS file: /cvsroot/smartwin/SmartWin/tests/SmartSOAPGoogleAPITester/MainWindow.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- MainWindow.h 3 Sep 2006 15:25:24 -0000 1.11
+++ MainWindow.h 10 Jun 2007 04:01:51 -0000 1.12
@@ -121,7 +121,7 @@
GoogleSerializer serializer;
SmartSOAP::SoapRequest< GoogleSerializer, SendObject, ReturnObject > request(
- "api.google.com", // Which host is our WebService located at
+ _T("api.google.com"), // Which host is our WebService located at
_T( "/search/beta2" ), // What is the PATH to our WebService
_T( "SOAPAction: \"urn:GoogleSearchAction\"" ), // What is the SOAPAction or basically the NAMESPACE of our WebService + the name of the function we're calling
80, // Which TCP/IP port is the WebService listening on
@@ -167,6 +167,7 @@
box->setText( _T( "Type your search phrase here!" ) );
box->setFocus();
box->setSelection();
+ //return true;
}
return false;
}
@@ -200,6 +201,7 @@
// Then creating the search textbox
WidgetTextBox::Seed seed;
+ seed.style |= ES_MULTILINE | ES_WANTRETURN;
seed.font = sw::createFont( _T( "Verdana" ), 15, 8 );
seed.caption = _T( "Type your search phrase here!" );
seed.location = sw::Rectangle( 5, cr.pos.y, cr.size.x - 10, 20 );
@@ -243,5 +245,27 @@
cr.size.y -= 10;
rawResponse->setBounds( cr );
updateWidget();
+ onSized( &MainWindow::isResized );
+ }
+
+ void isResized( const SmartWin::WidgetSizedEventResult & sz )
+ {
+ layout(); // to reflect the change in window size by the user.
+ updateWidget();
+ }
+
+ void layout()
+ {
+ SmartWin::Rectangle r, cr( getClientAreaSize() );
+
+ cr.size.y += 28;
+
+ // Then creating the search textbox
+ r= search->getBounds(); r.size.x= cr.size.x; search->setBounds( r );
+ r= license->getBounds(); r.size.x= cr.size.x; license->setBounds( r );
+ r= info->getBounds(); r.size.x= cr.size.x; info->setBounds( r );
+ r= datagrid->getBounds(); r.size.x= cr.size.x; datagrid->setBounds( r );
+ r= rawResponse->getBounds();r.size.x= cr.size.x; rawResponse->setBounds( r );
}
+
};
|