?
Solved

Hyperthetical Question, about handles...

Posted on 2001-07-12
5
Medium Priority
?
132 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 100 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses
Course of the Month14 days, 7 hours left to enroll

839 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