@@ -55,7 +55,7 @@ std::string AdvanceOptions::default_string_length_ = kDefaultStringLength;
5555std::string AdvanceOptions::session_location_;
5656std::string AdvanceOptions::additional_projects_;
5757std::string AdvanceOptions::query_properties_;
58- std::string AdvanceOptions::use_wchar_ ;
58+ std::string AdvanceOptions::use_wvarchar_ ;
5959std::string AdvanceOptions::enable_session_;
6060std::string AdvanceOptions::activation_threshold_checkbox_;
6161std::string AdvanceOptions::allow_large_results_;
@@ -75,7 +75,7 @@ std::string const kSessionLocation = "SessionLocation";
7575std::string const kAdditionalProjects = " AdditionalProjects" ;
7676std::string const kQueryProperties = " QueryProperties" ;
7777std::string const kActivationThreshold = " HTAPI_ActivationThreshold" ;
78- std::string const kUseWChar = " UseWVarChar" ;
78+ std::string const kUseWVarchar = " UseWVarChar" ;
7979std::string const kEnableSession = " EnableSession" ;
8080std::string const kHTAPIActivationThresholdCheck = " AllowHtapiForLargeResults" ;
8181std::string const kAllowLargeResults = " AllowLargeResults" ;
@@ -358,21 +358,20 @@ void AdvanceOptions::CreateAdditionalControls(HFONT h_font) {
358358 SetWindowLongPtr (
359359 h_max_retries_edit, GWL_STYLE ,
360360 GetWindowLongPtr (h_max_retries_edit, GWL_STYLE ) | ES_RIGHT | ES_NUMBER );
361- // TODO(b/497725655): Enable UI feature after public release
362- // HWND h_variables_checkbox = CreateCheckBox(
363- // adv_hwnd, "Use SQL_WVARCHAR instead of SQL_VARCHAR", kXAxis, kYAxis +
364- // 390, kWidth * 7, kHeight, kIdcVariableCheckbox);
365- // CheckDlgButton(adv_hwnd, kIdcVariableCheckbox,
366- // (use_wchar_ == "1") ? BST_CHECKED : BST_UNCHECKED);
367- // SendMessage(h_variables_checkbox, WM_SETFONT, (WPARAM)h_font, TRUE);
368- // SetWindowSubclass(GetDlgItem(adv_hwnd, kIdcVariableCheckbox),
369- // CheckboxSubclassProc, 0, 0);
361+ HWND h_variables_checkbox = CreateCheckBox (
362+ adv_hwnd, " Use SQL_WVARCHAR instead of SQL_VARCHAR" , kXAxis , kYAxis + 415 ,
363+ kWidth * 7 , kHeight , kIdcUseWVarcharCheckbox );
364+ CheckDlgButton (adv_hwnd, kIdcUseWVarcharCheckbox ,
365+ (use_wvarchar_ == " 1" ) ? BST_CHECKED : BST_UNCHECKED );
366+ SendMessage (h_variables_checkbox, WM_SETFONT , (WPARAM )h_font, TRUE );
367+ SetWindowSubclass (GetDlgItem (adv_hwnd, kIdcUseWVarcharCheckbox ),
368+ CheckboxSubclassProc, 0 , 0 );
370369 HWND h_additional_projects_label =
371- CreateLabel (adv_hwnd, " Additional projects:" , kXAxis , kYAxis + 420 ,
370+ CreateLabel (adv_hwnd, " Additional projects:" , kXAxis , kYAxis + 440 ,
372371 kWidth * 5 , kHeight , WS_VISIBLE | SS_LEFT );
373372 SendMessage (h_additional_projects_label, WM_SETFONT , (WPARAM )h_font, TRUE );
374373 HWND h_additional_projects_edit =
375- CreateScrollableEditBox (adv_hwnd, kXAxis , kYAxis + 440 , kWidth + 380 ,
374+ CreateScrollableEditBox (adv_hwnd, kXAxis , kYAxis + 460 , kWidth + 380 ,
376375 kHeight + 32 , kIdcAdditionalProjectsEdit );
377376 SendMessage (h_additional_projects_edit, WM_SETFONT , (WPARAM )h_font, TRUE );
378377
@@ -381,11 +380,11 @@ void AdvanceOptions::CreateAdditionalControls(HFONT h_font) {
381380 InputSubclassProc, 0 , 0 );
382381
383382 HWND h_query_properties_label =
384- CreateLabel (adv_hwnd, " Query properties:" , kXAxis , kYAxis + 500 ,
383+ CreateLabel (adv_hwnd, " Query properties:" , kXAxis , kYAxis + 520 ,
385384 kWidth * 5 , kHeight , WS_VISIBLE | SS_LEFT );
386385 SendMessage (h_query_properties_label, WM_SETFONT , (WPARAM )h_font, TRUE );
387386 HWND h_query_properties_edit =
388- CreateScrollableEditBox (adv_hwnd, kXAxis , kYAxis + 520 , kWidth + 385 ,
387+ CreateScrollableEditBox (adv_hwnd, kXAxis , kYAxis + 540 , kWidth + 385 ,
389388 kHeight + 13 , kIdcQueryPropertiesEdit );
390389 SendMessage (h_query_properties_edit, WM_SETFONT , (WPARAM )h_font, TRUE );
391390
@@ -409,12 +408,12 @@ void AdvanceOptions::CreateAdditionalControls(HFONT h_font) {
409408}
410409
411410void AdvanceOptions::CreateButtons (HFONT h_font) {
412- HWND h_ok_button = CreateButton (adv_hwnd, " OK" , kOkButtonX + 2 , kButtonY + 38 ,
411+ HWND h_ok_button = CreateButton (adv_hwnd, " OK" , kOkButtonX + 2 , kButtonY + 58 ,
413412 kButtonWidth , kButtonHeight , kIdcOKButton );
414413 SendMessage (h_ok_button, WM_SETFONT , (WPARAM )h_font, TRUE );
415414
416415 HWND h_cancel_button =
417- CreateButton (adv_hwnd, " Cancel" , kCancelButtonX , kButtonY + 38 ,
416+ CreateButton (adv_hwnd, " Cancel" , kCancelButtonX , kButtonY + 58 ,
418417 kButtonWidth , kButtonHeight , kIdcCancelButton );
419418 SendMessage (h_cancel_button, WM_SETFONT , (WPARAM )h_font, TRUE );
420419}
@@ -627,11 +626,10 @@ LRESULT CALLBACK AdvanceOptions::AdvanceOptProc(HWND hwnd, UINT u_msg,
627626 GetWindowText (h_activation_threshold, activation_threshold_buffer,
628627 sizeof (activation_threshold_buffer));
629628 activation_threshold_ = activation_threshold_buffer;
630- // TODO(b/497725655): Enable UI feature after public release
631- // use_wchar_ =
632- // (IsDlgButtonChecked(hwnd, kIdcVariableCheckbox) == BST_CHECKED)
633- // ? "1"
634- // : "0";
629+ use_wvarchar_ =
630+ (IsDlgButtonChecked (hwnd, kIdcUseWVarcharCheckbox ) == BST_CHECKED )
631+ ? " 1"
632+ : " 0" ;
635633
636634 enable_session_ =
637635 (IsDlgButtonChecked (hwnd, kIdcEnableSessionCheckbox ) ==
@@ -779,8 +777,7 @@ void AdvanceOptions::SetValues(Section const& attribute_map) {
779777 query_properties_ = GetValueOrDefault (attribute_map, kQueryProperties );
780778 activation_threshold_ =
781779 GetValueOrDefault (attribute_map, kActivationThreshold );
782- // TODO(b/497725655): Enable UI feature after public release
783- // use_wchar_ = GetValueOrDefault(attribute_map, kUseWChar);
780+ use_wvarchar_ = GetValueOrDefault (attribute_map, kUseWVarchar );
784781 enable_session_ = GetValueOrDefault (attribute_map, kSessionLocation );
785782 activation_threshold_checkbox_ =
786783 GetValueOrDefault (attribute_map, kHTAPIActivationThresholdCheck );
@@ -803,7 +800,7 @@ void AdvanceOptions::ResetToDefaults() {
803800 additional_projects_.clear ();
804801 query_properties_.clear ();
805802 activation_threshold_.clear ();
806- // use_wchar_ .clear();
803+ use_wvarchar_ .clear ();
807804 enable_session_.clear ();
808805 activation_threshold_checkbox_.clear ();
809806 allow_large_results_.clear ();
@@ -831,7 +828,7 @@ void AdvanceOptions::Show(HWND hwnd) {
831828 RegisterClass (&wc_adv);
832829
833830 int window_width = 462 ;
834- int window_height = 650 ;
831+ int window_height = 670 ;
835832 int screen_width = GetSystemMetrics (SM_CXSCREEN );
836833 int screen_height = GetSystemMetrics (SM_CYSCREEN );
837834 int x_pos = (screen_width - window_width) / 2 ;
0 commit comments