Solved

Hyperthetical Question, about handles...

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

Suggested Solutions

Title # Comments Views Activity
Delphi inherited method 6 88
DBCtrlGrid, Delphi, Scroll 8 85
Get weeknumber and year from date 4 56
Error when I try to post by IdHttp, error 500 - Help 2 22
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

734 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