Solved

Hyperthetical Question, about handles...

Posted on 2001-07-12
5
124 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
  • 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

829 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