윈도우 스토어

RAD 스튜디오 10.3 리오에 추가된 TWindowsStore 컴포넌트를 통해 윈도우 스토어에 등록한 응용 프로그램에서 사용 가능한 추가 기능(Add-on) 목록, 구입한 목록, 트라이얼 모드 처리 등의 기능을 개발할 수 있습니다.

 

TWindowsStore 컴포넌트는 윈도우 플랫폼만 지원하며, VCL과 FireMonkey 프레임워크를 모두 지원합니다.

 

다음 간단한 샘플코드로 기능을 확인해 보세요.

 

사용자가 소유한 응용 프로그램과 애드온 확인

procedure TStoreForm.lbInfoClick(Sender: TObject);
var
  LMsg: string;
const
  //These consts mirrors the name of the Add-Ons ad defined
  //in the MS Windows Store. Using this approach you can “Ask” to the
  //store what the current user has bought.
  //The current user is indentified automatically because the
  //app has been downloaded from the store.
  HENRYFORDQUOTES = 'henryfordquotes';
  SAVETOFILE = 'savetofile';
  SAVEASFAVOURITE = 'saveasfavourite';
begin
  LMsg := '**You current situation**' + sLineBreak;
  LMsg := LMsg + 'You ' + IfThen(WindowsStore1.UserHasBought(HENRYFORDQUOTES),
    'have bought', 'don''t have bought') +
    ' the great Henry Ford aphorisms archive.' + sLineBreak;
  LMsg := LMsg + 'You ' + IfThen(WindowsStore1.UserHasBought(SAVETOFILE),
    'have bought', 'don''t have bought') +
    ' the ability to save aphorisms to file.' + sLineBreak;
  LMsg := LMsg + 'You ' + IfThen(WindowsStore1.UserHasBought(SAVEASFAVOURITE),
    'have bought', 'don''t have bought') +
    ' the ability to save aphorisms as favourite.' + sLineBreak;
  ShowMessage(LMsg);
end;

사용 가능한 추가 기능 확인

procedure TStoreForm.UpdateAvailableProducts;
var
  LProdsCount: Integer;
  I: Integer;
  LRow: TStrings;
begin
  LProdsCount := WindowsStore1.AppProducts.Count;
  for I := 0 to LProdsCount - 1 do
  begin
    LRow := sgAvailableProducts.Rows[I + 1];
    LRow.Add(WindowsStore1.AppProducts[I].StoreId.ToString);
    LRow.Add(WindowsStore1.AppProducts[I].Title.ToString);
    LRow.Add(WindowsStore1.AppProducts[I].Price.FormattedBasePrice.ToString);
    LRow.Add(WindowsStore1.AppProducts[I].ProductKind.ToString);
    LRow.Add(
      WindowsStore1.AppProducts[I].Price.IsOnSale.ToString(TUseBoolStrs.True)
    );    
    LRow.Add(
      WindowsStore1.AppProducts[I].IsInUserCollection
       .ToString(TUseBoolStrs.True)
    );
  end;
end;

트라이얼 모드 제어

procedure TStoreForm.lbTrialInformationClick(Sender: TObject);
var
  LRemainingTrialDays: Integer;
begin
  if WindowsStore1.AppLicense.IsActive then
  begin
    if WindowsStore1.AppLicense.IsTrial then
    begin
      LRemainingTrialDays := WindowsStore1.AppLicense.TrialTimeRemaining.Days;
      ShowMessage(
        Format('You can use this app for %d more days before the trial period ends.',
        [LRemainingTrialDays]));
    end
    else
    begin
      ShowMessage('You have a full license. The trial time is not meaningful.');
    end;

  end
  else
  begin
    ShowMessage('You don''t have a license. The trial time can''t be determined.');
  end;
end;

관련글


윈도우 API, WinRT API 업데이트

윈도우 API 업데이트

최신 윈도우 기능을 추가하기 위한 윈도우 API가 대폭 추가되었습니다.

 

다음 목록은 High DPI 지원을 위해 추가된 새로운 윈도우 API입니다.

AdjustWindowRectExForDpi

AreDpiAwarenessContextsEqual

EnableNonClientDpiScaling

GetAwarenessFromDpiAwarenessContext

GetDpiForMonitor

GetDpiForSystem

GetDpiForWindow

GetProcessDpiAwareness

GetSystemMetricsForDpi

GetThreadDpiAwarenessContext

GetWindowDpiAwarenessContext

IsValidDpiAwarenessContext

LogicalToPhysicalPointForPerMonitorDPI

PhysicalToLogicalPointForPerMonitorDPI

SetProcessDpiAwareness

SetThreadDpiAwarenessContext

SystemParametersInfoForDpi

SetProcessDpiAwarenessContext

SetDialogDpiChangeBehavior

GetDialogDpiChangeBehavior

SetDialogControlDpiChangeBehavior

GetDialogControlDpiChangeBehavior

OpenThemeDataForDpi

GetSystemDpiForProcess

GetDpiFromDpiAwarenessContext

SetThreadDpiHostingBehavior

GetThreadDpiHostingBehavior

GetWindowDpiHostingBehavior

 

그 외에 "펜 입력" 지원을 위해 WM_POINTER_XXX 메시지 관련 API 및 데이터 구조가 업데이트 되었습니다.

 

WinRT 업데이트

RAD 스튜디오 10.3 리오는 WinRT API Object Pascal 해더 선언에 대한 업데이트되었으며 윈도우 10 출시 후 추가된 많은 API에 대한 지원이 포함되었습니다. 해당 API는 RAD 스튜디오 10 시애틀과 동일한 방식으로 아래 파일들에 선언되었습니다.

WinAPI.ApplicationModel.Background.pas Winapi.ApplicationModel.Contacts.pas WinAPI.ApplicationModel.Core.pas WinAPI.ApplicationModel.DataTransfer.pas WinAPI.ApplicationModel.pas Winapi.CommonNames.pas WinAPI.CommonTypes.pas WinAPI.DataRT.pas Winapi.Devices.AllJoyn.pas Winapi.Devices.Bluetooth.Advertisement.pas WinAPI.Devices.Bluetooth.pas WinAPI.Devices.Enumeration.pas Winapi.Devices.Geolocation.pas Winapi.Devices.Midi.pas WinAPI.Devices.pas Winapi.Devices.PointOfService.pas Winapi.Devices.Scanners.pas Winapi.Devices.Sensors.pas Winapi.Devices.Sms.pas WinAPI.Foundation.Collections.pas WinAPI.Foundation.pas WinAPI.Foundation.Types.pas WinAPI.Gaming.pas WinAPI.Globalization.pas WinAPI.GraphicsRT.pas WinAPI.Management.pas Winapi.Media.Devices.pas Winapi.Media.MediaProperties.pas WinAPI.Media.pas WinAPI.Networking.Connectivity.pas WinAPI.Networking.NetworkOperators.pas WinAPI.Networking.pas WinAPI.Networking.Proximity.pas Winapi.Networking.PushNotifications.pas WinAPI.Networking.Sockets.pas WinAPI.Networking.Vpn.pas Winapi.Perception.pas WinAPI.Security.Credentials.pas WinAPI.Security.Cryptography.pas WinAPI.Security.pas Winapi.ServicesRT.pas Winapi.ServicesRT.Store.pas WinAPI.Storage.pas WinAPI.Storage.Streams.pas WinAPI.SystemRT.pas WinAPI.UI.Composition.pas WinAPI.UI.Core.pas WinAPI.UI.Input.Inking.pas WinAPI.UI.Input.pas WinAPI.UI.Notifications.pas WinAPI.UI.pas WinAPI.UI.Text.pas WinAPI.UI.ViewManagement.pas WinAPI.UI.WebUI.pas WinAPI.UI.Xaml.pas WinAPI.WebRT.pas

 

VCL High DPI "Per Monitor V2" 지원

VCL은 이제 "Per Monitor V2"를 지원합니다.

 

Per Monitor V2는 해상도가 다른 여러개의 모니터에서 윈도우 디스플레이 배율을 다르게 설정한 경우 각 모니터 해상도 및 배율에 맞게 화면 및 컨트롤을 표시하는 기술입니다.

 

이 기술은 윈도우 10 크리에이터 업데이트 부터 제공된 윈도우 기술로 RAD 스튜디오가 발빠르게 지원하고 있습니다.

만약, 사용자 환경이 윈도우 10 크리에이터 업데이트하지 않았다면 표준 동작의 API가 호출되도록 호환성을 보장합니다.

 

Per Monitor V2 지원은 IDE의  Project > Options > Application > Manifest 메뉴의 DPI Awareness 항목 중 "Per Monitor V2"(기본 값) 선택 해 설정할 수 있습니다.

manifest_dpiawareness.png

 

 

 

10.3 리오의 업데이트 버전들

 

번호 제목 글쓴이 날짜 조회 수
공지 [DelphiCon 요약] 코드사이트 로깅 실전 활용 기법 (Real-world CodeSite Logging Techniques) 관리자 2021.01.19 14533
공지 [UX Summit 요약] 오른쪽 클릭은 옳다 (Right Click is Right) 관리자 2020.11.16 13175
공지 [10.4 시드니] What's NEW! 신기능 자세히 보기 관리자 2020.05.27 15679
공지 RAD스튜디오(델파이,C++빌더) - 고객 사례 목록 관리자 2018.10.23 21198
공지 [데브기어 컨설팅] 모바일 앱 & 업그레이드 마이그레이션 [1] 관리자 2017.02.06 22466
공지 [전체 목록] 이 달의 기술자료 & 기술레터 관리자 2017.02.06 18092
공지 RAD스튜디오(델파이, C++빌더) - 시작하기 [1] 관리자 2015.06.30 38367
공지 RAD스튜디오(델파이,C++빌더) - 모바일 앱 개발 사례 (2020년 11월 업데이트 됨) 험프리 2014.01.16 173871
503 [시애틀] 블루투스 LE를 지원하는 디바이스에서 비콘 광고데이터를 발생할 수 있습니다. file Humphery 2015.10.06 687
502 애플 개발자 프로그램 구독하지 않고 XCode8을 설정해 iOS앱을 배포하는 방법 험프리 2017.05.15 686
501 [10.4 시드니][패치] RAD스튜디오 10.4 '세 번째 패치(Patch 3)': VCL그리드, C++Win64 디버깅, C++ 안드로이드 예외처리 핸들링 및 리소스 등 관리자 2020.07.29 681
500 [고객사례-유틸리티, 델파이] 녹음기 앱 - Voice Recorder 관리자 2019.12.10 680
499 [고객 사례- 3D, 시뮬레이션, 델파이] 3D Train Studio 관리자 2017.03.02 678
498 [베를린 U1] 윈도우 태스크바 알림의 뱃지를 제어할 수 있습니다. 험프리 2016.09.20 677
497 [커뮤니티 에디션] 사용 자격 기준 정리 관리자 2018.11.29 677
496 [도서/PDF/소스코드] 시작하는 사람들을 위한 델파이 프로그래밍-모듈 17. 1차원 정적 배열 관리자 2019.03.29 675
495 [10.4 시드니 신기능] iOS와 맥OS 지원 강화 관리자 2020.06.04 674
494 n [도서/PDF/소스코드] 시작하는 사람들을 위한 델파이 프로그래밍-모듈 7. 중접된 If...Then...Else 문. 작업 해결 실습하기 관리자 2019.03.29 674
493 [업데이트][핫픽스][10.1 베를린] 갤럭시 S7 Edge(안드로이드 6.0.1) 디버깅이 되지않는 이슈 패치 험프리 2016.05.27 672
492 [도서/PDF/소스코드] 시작하는 사람들을 위한 델파이 프로그래밍-모듈 23. 타이머 관리자 2019.03.29 671
491 [델파이 샘플 코드] 안드로이드, iOS, OSX, 윈도우, 리눅스, HTML5 관리자 2019.11.13 670
490 [고객 사례- 의료, 델파이+임베디드DB] Siemens Healthcare 의 체외진단기기 (IVD, In Vitro Diagnostics) file 관리자 2016.11.03 670
489 [도서/PDF/소스코드] 델파이 Begin...End - 14장. 분산처리(DataSnap) 관리자 2019.08.20 668
488 [엠바카데로 Feature Friday] RAD스튜디오와 함께사용하면 더욱 강력하게 활용할 수 있는 컴포넌트들 관리자 2018.09.14 666
487 Class에서 Interface 두 개 구현할 때, 이 둘이 동일한 이름의 메소드(Method)를 가지고 있다면? file 험프리 2019.12.11 665
486 [10.4 시드니 신기능] 언어 서버 프로토콜 (LSP, Language Server Protocol) 관리자 2020.06.04 664
485 가장 강력한 ‘데이터베이스 연동’ 기능을 자체적으로 제공하는 프레임워크는? (델파이 VS. WPF VS. ELECTRON) 관리자 2021.03.04 661
484 델파이 25주년 기념 무료 크로스 플랫폼 샘플 앱 25개 선정(델파이/C++ 샘플 150여종) 험프리 2020.03.02 659