@@ -56,7 +56,7 @@ std::string AdvanceOptions::default_string_length_ = kDefaultStringLength;
5656std::string AdvanceOptions::session_location_;
5757std::string AdvanceOptions::additional_projects_;
5858std::string AdvanceOptions::query_properties_;
59- std::string AdvanceOptions::use_wchar_ ;
59+ std::string AdvanceOptions::use_wvarchar_ ;
6060std::string AdvanceOptions::enable_session_;
6161std::string AdvanceOptions::activation_threshold_checkbox_;
6262std::string AdvanceOptions::allow_large_results_;
@@ -76,7 +76,7 @@ std::string const kSessionLocation = "SessionLocation";
7676std::string const kAdditionalProjects = " AdditionalProjects" ;
7777std::string const kQueryProperties = " QueryProperties" ;
7878std::string const kActivationThreshold = " HTAPI_ActivationThreshold" ;
79- std::string const kUseWChar = " UseWVarChar" ;
79+ std::string const kUseWVarchar = " UseWVarChar" ;
8080std::string const kEnableSession = " EnableSession" ;
8181std::string const kHTAPIActivationThresholdCheck = " AllowHtapiForLargeResults" ;
8282std::string const kAllowLargeResults = " AllowLargeResults" ;
@@ -359,21 +359,20 @@ void AdvanceOptions::CreateAdditionalControls(HFONT h_font) {
359359 SetWindowLongPtr (
360360 h_max_retries_edit, GWL_STYLE ,
361361 GetWindowLongPtr (h_max_retries_edit, GWL_STYLE ) | ES_RIGHT | ES_NUMBER );
362- // TODO(b/497725655): Enable UI feature after public release
363- // HWND h_variables_checkbox = CreateCheckBox(
364- // adv_hwnd, "Use SQL_WVARCHAR instead of SQL_VARCHAR", kXAxis, kYAxis +
365- // 390, kWidth * 7, kHeight, kIdcVariableCheckbox);
366- // CheckDlgButton(adv_hwnd, kIdcVariableCheckbox,
367- // (use_wchar_ == "1") ? BST_CHECKED : BST_UNCHECKED);
368- // SendMessage(h_variables_checkbox, WM_SETFONT, (WPARAM)h_font, TRUE);
369- // SetWindowSubclass(GetDlgItem(adv_hwnd, kIdcVariableCheckbox),
370- // CheckboxSubclassProc, 0, 0);
362+ HWND h_variables_checkbox = CreateCheckBox (
363+ adv_hwnd, " Use SQL_WVARCHAR instead of SQL_VARCHAR" , kXAxis , kYAxis + 415 ,
364+ kWidth * 7 , kHeight , kIdcUseWVarcharCheckbox );
365+ CheckDlgButton (adv_hwnd, kIdcUseWVarcharCheckbox ,
366+ (use_wvarchar_ == " 1" ) ? BST_CHECKED : BST_UNCHECKED );
367+ SendMessage (h_variables_checkbox, WM_SETFONT , (WPARAM )h_font, TRUE );
368+ SetWindowSubclass (GetDlgItem (adv_hwnd, kIdcUseWVarcharCheckbox ),
369+ CheckboxSubclassProc, 0 , 0 );
371370 HWND h_additional_projects_label =
372- CreateLabel (adv_hwnd, " Additional projects:" , kXAxis , kYAxis + 420 ,
371+ CreateLabel (adv_hwnd, " Additional projects:" , kXAxis , kYAxis + 440 ,
373372 kWidth * 5 , kHeight , WS_VISIBLE | SS_LEFT );
374373 SendMessage (h_additional_projects_label, WM_SETFONT , (WPARAM )h_font, TRUE );
375374 HWND h_additional_projects_edit =
376- CreateScrollableEditBox (adv_hwnd, kXAxis , kYAxis + 440 , kWidth + 380 ,
375+ CreateScrollableEditBox (adv_hwnd, kXAxis , kYAxis + 460 , kWidth + 380 ,
377376 kHeight + 32 , kIdcAdditionalProjectsEdit );
378377 SendMessage (h_additional_projects_edit, WM_SETFONT , (WPARAM )h_font, TRUE );
379378
@@ -382,11 +381,11 @@ void AdvanceOptions::CreateAdditionalControls(HFONT h_font) {
382381 InputSubclassProc, 0 , 0 );
383382
384383 HWND h_query_properties_label =
385- CreateLabel (adv_hwnd, " Query properties:" , kXAxis , kYAxis + 500 ,
384+ CreateLabel (adv_hwnd, " Query properties:" , kXAxis , kYAxis + 520 ,
386385 kWidth * 5 , kHeight , WS_VISIBLE | SS_LEFT );
387386 SendMessage (h_query_properties_label, WM_SETFONT , (WPARAM )h_font, TRUE );
388387 HWND h_query_properties_edit =
389- CreateScrollableEditBox (adv_hwnd, kXAxis , kYAxis + 520 , kWidth + 385 ,
388+ CreateScrollableEditBox (adv_hwnd, kXAxis , kYAxis + 540 , kWidth + 385 ,
390389 kHeight + 13 , kIdcQueryPropertiesEdit );
391390 SendMessage (h_query_properties_edit, WM_SETFONT , (WPARAM )h_font, TRUE );
392391
@@ -410,12 +409,12 @@ void AdvanceOptions::CreateAdditionalControls(HFONT h_font) {
410409}
411410
412411void AdvanceOptions::CreateButtons (HFONT h_font) {
413- HWND h_ok_button = CreateButton (adv_hwnd, " OK" , kOkButtonX + 2 , kButtonY + 38 ,
412+ HWND h_ok_button = CreateButton (adv_hwnd, " OK" , kOkButtonX + 2 , kButtonY + 58 ,
414413 kButtonWidth , kButtonHeight , kIdcOKButton );
415414 SendMessage (h_ok_button, WM_SETFONT , (WPARAM )h_font, TRUE );
416415
417416 HWND h_cancel_button =
418- CreateButton (adv_hwnd, " Cancel" , kCancelButtonX , kButtonY + 38 ,
417+ CreateButton (adv_hwnd, " Cancel" , kCancelButtonX , kButtonY + 58 ,
419418 kButtonWidth , kButtonHeight , kIdcCancelButton );
420419 SendMessage (h_cancel_button, WM_SETFONT , (WPARAM )h_font, TRUE );
421420}
@@ -628,11 +627,10 @@ LRESULT CALLBACK AdvanceOptions::AdvanceOptProc(HWND hwnd, UINT u_msg,
628627 GetWindowText (h_activation_threshold, activation_threshold_buffer,
629628 sizeof (activation_threshold_buffer));
630629 activation_threshold_ = activation_threshold_buffer;
631- // TODO(b/497725655): Enable UI feature after public release
632- // use_wchar_ =
633- // (IsDlgButtonChecked(hwnd, kIdcVariableCheckbox) == BST_CHECKED)
634- // ? "1"
635- // : "0";
630+ use_wvarchar_ =
631+ (IsDlgButtonChecked (hwnd, kIdcUseWVarcharCheckbox ) == BST_CHECKED )
632+ ? " 1"
633+ : " 0" ;
636634
637635 enable_session_ =
638636 (IsDlgButtonChecked (hwnd, kIdcEnableSessionCheckbox ) ==
@@ -784,8 +782,7 @@ void AdvanceOptions::SetValues(Section const& attribute_map) {
784782 query_properties_ = GetValueOrDefault (attribute_map, kQueryProperties );
785783 activation_threshold_ =
786784 GetValueOrDefault (attribute_map, kActivationThreshold );
787- // TODO(b/497725655): Enable UI feature after public release
788- // use_wchar_ = GetValueOrDefault(attribute_map, kUseWChar);
785+ use_wvarchar_ = GetValueOrDefault (attribute_map, kUseWVarchar );
789786 enable_session_ = GetValueOrDefault (attribute_map, kSessionLocation );
790787 activation_threshold_checkbox_ =
791788 GetValueOrDefault (attribute_map, kHTAPIActivationThresholdCheck );
@@ -808,7 +805,7 @@ void AdvanceOptions::ResetToDefaults() {
808805 additional_projects_.clear ();
809806 query_properties_.clear ();
810807 activation_threshold_.clear ();
811- // use_wchar_ .clear();
808+ use_wvarchar_ .clear ();
812809 enable_session_.clear ();
813810 activation_threshold_checkbox_.clear ();
814811 allow_large_results_.clear ();
@@ -836,7 +833,7 @@ void AdvanceOptions::Show(HWND hwnd) {
836833 RegisterClass (&wc_adv);
837834
838835 int window_width = 462 ;
839- int window_height = 650 ;
836+ int window_height = 670 ;
840837 int screen_width = GetSystemMetrics (SM_CXSCREEN );
841838 int screen_height = GetSystemMetrics (SM_CYSCREEN );
842839 int x_pos = (screen_width - window_width) / 2 ;
0 commit comments