Solved

Hyperthetical Question, about handles...

Posted on 2001-07-12
5
120 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

763 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now