Q&A

  • 액티브데스크탑 맘대로 주므르기???
샬롬~



닐리리, 정재홍이라고 합니다.



다름아니라 데스크탑을 액티브데스크탑으로 설정하여 원하는 html을 지정하는 방법이

필요해서..



방법을 알고 계시다면 답변부탁드립니다.



그럼...행복한 일만 가득한 하루 되시길 바랍니다.



안녕히...

3  COMMENTS
  • Profile
    nilriri 2000.11.11 18:29
    샬롬! (샬롬은 평안을 비는 히브리어 성경의 언어입니다.)

    지승용님의 도움으로 해결하였습니다.

    감사합니다.



    unit activedesktop;



    interface



    uses

    Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,

    StdCtrls,

    shlobj, //<- 이것과 (iactivedesktop이 정의되어있습니다.)

    comobj; //<- 이것을 선언해 주셔야합니다. (CreateComObject이 정의되어있습니다.)



    type

    TForm1 = class(TForm)

    Button1: TButton;

    procedure Button1Click(Sender: TObject);

    private

    { Private declarations }

    public

    { Public declarations }

    end;



    var

    Form1: TForm1;



    implementation



    {$R *.DFM}



    procedure ActiveDesktop_Destroy;

    var

    ActiveDesktop: IActiveDesktop;

    Active_COMPONENTSOPT : _tagCOMPONENTSOPT;

    WallPaper_String : String;

    WallPaper_Wide : PWideChar;

    begin

    ActiveDesktop := CreateComObject(CLSID_ActiveDesktop) as IActiveDesktop;



    WallPaper_Wide := AllocMem(MAX_PATH*2);

    ActiveDesktop.GetWallpaper(WallPaper_Wide, MAX_PATH*2, 0);

    WallPaper_String := WallPaper_Wide;

    FreeMem(WallPaper_Wide);



    // if WallPaper_String <> (ExtractFilePath(Application.ExeName) + 'pa2.bmp') then

    // begin

    WallPaper_Wide := AllocMem(MAX_PATH*2); //메모리할당

    // StringToWideChar(ExtractFilePath(Application.ExeName) + 'pa2.bmp', WallPaper_Wide, MAX_PATH*2);

    StringToWideChar('C:My Documentsdesktop.html', WallPaper_Wide, MAX_PATH*2); //그림또는 html파일명지정



    ActiveDesktop.SetWallpaper(WallPaper_Wide, 0); //화면중앙표시, 확대표시 ,바둑판식표시지정...

    ActiveDesktop.ApplyChanges(AD_APPLY_ALL or AD_APPLY_FORCE);



    FreeMem(WallPaper_Wide); //메모리해제

    // end;



    Active_COMPONENTSOPT.dwSize := SizeOf(_tagCOMPONENTSOPT);

    ActiveDesktop.GetDesktopItemOptions(Active_COMPONENTSOPT, 0);



    // 여그는 엑티브데스크탑항목을 사용중인지 엑티브데스크탑으로 되어있는지를 검사합니다.

    // if (Active_COMPONENTSOPT.fEnableComponents = TRUE) or (Active_COMPONENTSOPT.fActiveDesktop = TRUE) then

    // begin

    Active_COMPONENTSOPT.fEnableComponents := TRUE; //엑티브데스크탑항목을 사용하도록설정

    Active_COMPONENTSOPT.fActiveDesktop := TRUE; //엑티브데스크탑으로 설정..

    ActiveDesktop.SetDesktopItemOptions(Active_COMPONENTSOPT,0); //요건 파악을 못했습니다.

    ActiveDesktop.ApplyChanges(AD_APPLY_ALL or AD_APPLY_FORCE); //변경사항을 적용시킵니다.



    {

    위에서 bmp파일을 지정하고 이곳을 실행시키면 일반 바탕화면이 표시됩니다.

    Active_COMPONENTSOPT.fEnableComponents := FALSE;

    Active_COMPONENTSOPT.fActiveDesktop := FALSE;

    ActiveDesktop.SetDesktopItemOptions(Active_COMPONENTSOPT,0);

    ActiveDesktop.ApplyChanges(AD_APPLY_ALL or AD_APPLY_FORCE);

    }

    // end;

    end;



    procedure TForm1.Button1Click(Sender: TObject);

    begin

    ActiveDesktop_Destroy;

    end;





    {





    ////////////////////////////////////

    // 배경화면 그림을 바꾸어주는 방법

    ////////////////////////////////////

    Reg := TRegIniFile.Create('Control Panel');

    BMP_String := Reg.ReadString('desktop', 'Wallpaper', '');



    Reg.WriteString('desktop', 'Wallpaper', ExtractFilePath(Application.ExeName) + 'pa2.bmp');

    Reg.WriteString('desktop', 'TileWallpaper', '0');

    Reg.Free;



    // desktop의 wallpaper를 set하고 다은 window에 알린다

    SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, nil, SPIF_SENDWININICHANGE);



    }





    end.

  • Profile
    nilriri 2000.11.10 19:40
    http://msdn.microsoft.com/library/psdk/shellcc/shell/activedesktop.htm





    Using the Active Desktop Object

    --------------------------------------------------------------------------------



    This article contains information on the ActiveDesktop object that is part of the Microsoft?Windows?Shell API. This object, through its IActiveDesktop interface, allows you to add, remove, and change items on the desktop.



    Overview of the Active Desktop Interface

    The Active Desktop is a feature of Microsoft Internet Explorer 4.0 that allows you to include HTML documents and items (such as ActiveX?Controls and Java applets) directly to your desktop. The IActiveDesktop interface, which is part of the Windows Shell API, is used to programmatically add, remove, and modify the items on the desktop. Active Desktop items can also be added using a Channel Definition Format (CDF) file.



    Accessing the Active Desktop

    To access the Active Desktop, a client application would need to create an instance of the ActiveDesktop object (CLSID_ActiveDesktop) with the CoCreateInstance function and get a pointer to the object's IActiveDesktop interface.



    The following sample shows how to get a pointer to the IActiveDesktop interface.



    HRESULT hr;

    IActiveDesktop *pActiveDesktop;



    //Create an instance of the Active Desktop

    hr = CoCreateInstance(CLSID_ActiveDesktop, NULL, CLSCTX_INPROC_SERVER,

    IID_IActiveDesktop, (void**)&pActiveDesktop);



    //Insert code to call the IActiveDesktop methods



    // Call the Release method

    pActiveDesktop->Release();





    Adding a Desktop Item

    There are three methods that can be used to add a desktop item: IActiveDesktop::AddDesktopItem, IActiveDesktop::AddDesktopItemWithUI, and IActiveDesktop::AddUrl. Each desktop item added to the Active Desktop must have a different source URL.



    The IActiveDesktop::AddDesktopItemWithUI and IActiveDesktop::AddUrl both provide the option to display the various user interfaces that can be displayed before adding a desktop item to the Active Desktop. The interfaces will verify if the user really wants to add the desktop item to their Active Desktop, notify the user of any security risks that are warranted by the URL security zone settings, and ask the user if the user would like to create a subscription for this desktop item. Both methods also provide a way of suppressing the user interfaces. The IActiveDesktop::AddDesktopItem method requires a call to IActiveDesktop::ApplyChanges in order to update the registry. For the IActiveDesktop::AddDesktopItemWithUI, the client application must immediately release the IActiveDesktop interface and then use the CoCreateInstance function to get an interface to an instance of the ActiveDesktop object that includes the newly added desktop item.



    The IActiveDesktop::AddDesktopItem method will add the specified desktop item to the Active Desktop without any user interface, unless the URL security zone settings prevent it. If the URL security zone settings do not allow the desktop item to be added without prompting the user, the method will fail. IActiveDesktop::AddDesktopItem also requires a call to IActiveDesktop::ApplyChanges in order to update the registry.



    The following sample demonstrates how to add a desktop item with the IActiveDesktop::AddDesktopItem method.



    HRESULT hr;

    IActiveDesktop *pActiveDesktop;

    COMPONENT compDesktopItem;



    //Create an instance of the Active Desktop

    hr = CoCreateInstance(CLSID_ActiveDesktop, NULL, CLSCTX_INPROC_SERVER,

    IID_IActiveDesktop, (void**)&pActiveDesktop);



    // Initialize the COMPONENT structure

    compDesktopItem.dwSize = sizeof(COMPONENT);



    // Insert code that adds the information about the desktop item to the COMPONENT structure



    // Add the desktop item

    pActiveDesktop->AddDesktopItem(&compDesktopItem,0);



    // Save the changes to the registry

    pActiveDesktop->ApplyChanges(AD_APPLY_ALL);



    Enumerating the Desktop Items

    To enumerate the desktop items currently installed on the Active Desktop, the client application needs to get the total number of desktop items installed using the IActiveDesktop::GetDesktopItemCount method and then creating a loop that retrieves the COMPONENT structure for each desktop item by calling the IActiveDesktop::GetDesktopItem method using the desktop item index.



    The following sample demonstrates one way to enumerate the desktop items.



    HRESULT hr;

    IActiveDesktop *pActiveDesktop;

    COMPONENT compDesktopItem;

    int intCount;

    int intIndex = 0;



    //Create an instance of the Active Desktop

    hr = CoCreateInstance(CLSID_ActiveDesktop, NULL, CLSCTX_INPROC_SERVER,

    IID_IActiveDesktop, (void**)&pActiveDesktop);



    pActiveDesktop->GetDesktopItemCount(&intCount,0);



    compDesktopItem.dwSize = sizeof(COMPONENT);



    while(intIndex<=(intCount-1))

    {

    //get the COMPONENT structure for the current desktop item

    pActiveDesktop->GetDesktopItem(intIndex, &compDesktopItem,0);



    //Insert code that processes the structure



    //Increment the index

    intIndex++;



    //Insert code to clean-up structure for next component

    }



    // Call the Release method

    pActiveDesktop->Release();



    Built on Monday, August 07, 2000Send feedback to the Platform SDK.



    ?2000 Microsoft Corporation. All rights reserved. Terms of use.



  • Profile
    nilriri 2000.11.10 08:14
    여기까지는 찾았는데....에궁..

    망막해라...욜심히 해야징....

    그럼 해결하면 또 올리쥬~~

    http://msdn.microsoft.com/library/psdk/shellcc/shell/IFaces/IActiveDesktop/IActiveDesktop.htm



    nilriri wrote:

    > 샬롬~

    >

    > 닐리리, 정재홍이라고 합니다.

    >

    > 다름아니라 데스크탑을 액티브데스크탑으로 설정하여 원하는 html을 지정하는 방법이

    > 필요해서..

    >

    > 방법을 알고 계시다면 답변부탁드립니다.

    >

    > 그럼...행복한 일만 가득한 하루 되시길 바랍니다.

    >

    > 안녕히...

    • 3107
    • 2000.11.10 22:04
    • 2 COMMENTS
    • /
    • 0 LIKES
    • 한하눌
      2000.11.10 23:36
      3107 wrote: > rxlib를 다운 받아서 install했는데요... delphi콤포넌트에 추가 하려면 어떻게 해야 하지...
    • 초보초보
      2000.12.09 03:47
      한하눌 wrote: > 3107 wrote: > > rxlib를 다운 받아서 install했는데요... delphi콤포넌트에 추가 하려...
    • 똘똘이
      2000.11.11 00:29
      제가 아는 공짜로 팩스보내는 방법은 3가지 있는거 같아요 첫째는 varian 사이트에가서 Async32콤포넌트...
    • 컴맹
      2000.11.10 21:27
      혹시 버튼이 비트맵 버튼이 아닌가여..? 그러면 .. 그렇게 될수도 있는뎅.. 만약에 제말이 맞다면은 . ...
    • 까마귀
      2000.11.10 20:46
      won wrote: > 버튼에 포커스만 주고싶습니다. > 클릭발생안되게.. 좀 > > > procedure TForm1.Curre...
    • 박진수
      2000.11.11 04:01
      with dm.qryTEST do begin Close; //->두번째 실행하면 에러 발생.. ...
    • cyber57
      2000.11.10 20:51
      제가 작성한 아래의 코드들 참조하면 되실겁니다. 도움이 되셨으면 합니다 1. 먼저 애플리케이션을 열...
    • 비바
    • 2000.11.10 19:10
    • 2 COMMENTS
    • /
    • 0 LIKES
    • 아이언
      2000.11.10 19:36
      1. 굳이 스피드 버튼을 사용하셔야 한다면.. Color프로퍼티 brush, canvas등이 없으니까.. 제 생각에...
    • 방경주
      2000.11.11 02:08
      제가 알기론 기본적으로 델파이에서 지원하는 버튼으론 눌려졌을때 표면의 색을 바꿀수가 없는 걸루 알구 ...
    • 김진영
    • 2000.11.10 18:48
    • 2 COMMENTS
    • /
    • 0 LIKES
    • mafioso
      2000.11.10 18:54
      sql.text 에서 문자열을 표현할때는 "(double quotation)을 쓰세요. 김진영 wrote: > close; > sql.Cl...
    • 김진영
      2000.11.10 21:37
      죄송합니다... 문제는 (")이 아니라 + ' else '' end' 이 + ' else '''' end' 이더군여..^^ mafioso w...
    • 2000.11.10 18:14
    • 0 COMMENTS
    • /
    • 0 LIKES
    • 한상훈
    • 2000.11.10 18:01
    • 2 COMMENTS
    • /
    • 0 LIKES
    • cyber57
      2000.11.10 20:57
      >cyber57 wrote: 일차원 배열과 마찬가로 하면 되요 >A: Array of Array of Integer; >SetLength(A,5, 5...
    • 까마귀
      2000.11.10 20:54
      한상훈 wrote: > 초보여요.. > > 가변배열선언시 다음과 같잖아여..? > A:array of integer; > SetLe...
    • 아이언
    • 2000.11.10 17:43
    • 1 COMMENTS
    • /
    • 0 LIKES
    • 타락천사
      2000.11.10 22:50
      안녕하세여..타락임다..^^ 조은거 하시네여..^^ 외부 프로그램을 실행시켜서 MDI 폼의 Child 폼으로 ...
    • 한상훈
    • 2000.11.10 11:04
    • 2 COMMENTS
    • /
    • 0 LIKES
    • 타락천사
      2000.11.10 21:14
      안녕하세여.. 타락임다..^^ 조은 질문입니다..^^ 전 개인적으로 코딩을 창조작업 이라고 보기 땜시.....
    • Black}{ole
      2000.11.10 17:38
      ..
    • coolling
      2000.11.10 18:04
      결론은 안됩니다.... 도움말에 보면은 AVERABE,COUNT,MAX,MIN,SUM,ALL,UNIQUE 함수... CAST, EXT...
    • parkisu
    • 2000.11.10 08:19
    • 0 COMMENTS
    • /
    • 0 LIKES
    • nilriri
    • 2000.11.10 08:05
    • 3 COMMENTS
    • /
    • 0 LIKES
    • nilriri
      2000.11.11 18:29
      샬롬! (샬롬은 평안을 비는 히브리어 성경의 언어입니다.) 지승용님의 도움으로 해결하였습니다. 감사합...
    • nilriri
      2000.11.10 19:40
      http://msdn.microsoft.com/library/psdk/shellcc/shell/activedesktop.htm Using the Active Deskto...
    • nilriri
      2000.11.10 08:14
      여기까지는 찾았는데....에궁.. 망막해라...욜심히 해야징.... 그럼 해결하면 또 올리쥬~~ http://msdn....
    • soriso
      2000.11.10 18:40
      왕초보 wrote: > 제목대로 Oracle의 StoredProcedure의 > in parameter와 out parameter를 > 어떻게 받...
    • 한상훈
    • 2000.11.10 06:30
    • 1 COMMENTS
    • /
    • 0 LIKES
    • 까마귀
      2000.11.10 06:53
      한상훈 wrote: > 초보여요.. > > caption을 가지는 menu나 tabcontrol같은 경우 &문자로 단축키(Alt+)...