Solved

Hyperthetical Question, about handles...

Posted on 2001-07-12
5
127 Views
Last Modified: 2011-10-03
after a discusion in the office, and none of us can be arsed to try but we wanted to know.

Is it possible to paste controls by using windows handles ETC directly onto the desk top ?

Kris
0
Comment
Question by:Kristian
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 11

Expert Comment

by:robert_marquardt
ID: 6277214
Interesting question.
Theoretically yes.
There is the desktop window which should have a registered window class as any normal window.

So subclassing of the desktop window and adding child windows should be possible.

If it really works and not crash Windows is another question.
0
 
LVL 11

Expert Comment

by:robert_marquardt
ID: 6277222
An alternative could be to activate Active Desktop and handle it with a HTML document.
0
 
LVL 9

Accepted Solution

by:
ITugay earned 25 total points
ID: 6277225
Hi Kristian,

i think it should be somethink like this

var
  H: Integer;
  E: TStringGrid;
begin
  H := GetDesktopWindow;
  E := TStringGrid.Create(nil);
  InsertControl(E);
  windows.SetParent(E.Handle, H);
end;
0
 
LVL 1

Author Comment

by:Kristian
ID: 6277294
Wicked, thats sooo cool, i can definately use that.
ITugay once again you come through cheers....

for an extra 5 bonus points ( woooo i hear you cry ) how do i remove the taskbar bit ( the program name ) as it did have a blank dud one there, would it be the same as when you do it for forms ETC or is there a quicker way.

Kris.
0
 
LVL 9

Expert Comment

by:ITugay
ID: 6277971
Hi,

it should be something like this:-)

var
  G: TStringGrid;
  H: Integer;
  L: Integer;
begin
  H := GetDesktopWindow;
  G := TStringGrid.Create(nil);
  InsertControl(G);

  // remove empty item from taskbar
  SetWindowLong(G.Handle, GWL_EXSTYLE, WS_EX_TOOLWINDOW);

  windows.SetParent(G.Handle, H);
end;

------
Igor.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question