PDA

View Full Version : Desktop messages...



M109uk
13-09-2004, 10:36 PM
Hi all,

I am writing an app that renders an OpenGL scene to the desktop, now i have a few problems, although the rendering works great, but when i disable the taskbar and double click the desktop the startmenu appears, is there any way of disableing this, i have tried to use hooks, etc but it doesnt seem to send a WM_LBUTTONDBLCLK message :s i found its name to be #32769 and a current handle of 65556, i cant seem to get anything from what it is, even the FindWindow function cant find it?!

An option i was considering was to just render the scene to a form instead of the desktop, but i still want to disable the taskbar, etc, but this leaves an empty space where the taskbar was, im sure this is where the taskbar was LOCKED, but is there any way of changing this through code?

Thanx for any help

cairnswm
14-09-2004, 04:57 AM
I remember I found a way to disable the start button...



//Enable:
EnableWindow(FindWindowEx(FindWindow
('Shell_TrayWnd', nil), 0,'Button',nil),TRUE) ;
//Disable:
EnableWindow(FindWindowEx(FindWindow
('Shell_TrayWnd', nil), 0,'Button',nil),FALSE) ;


Not sure if that helps though.




[/pascal]

M109uk
14-09-2004, 08:31 PM
Thanx for the reply,

I dont have a problem with the start button, i disable the whole taskbar so its now longer visible and i disable the start menu key.
This works perfectly, i cant get the menu up or anything.

Then i added code to hide the desktop (Icons, etc) then for some reason if you double click anywhere on the desktop, the start menu appears, im not sure why.

Below is the code i use to disable the taskbar and desktop:


procedure TForm1.Button1Click(Sender: TObject);
var
wndTaskbar: HWnd;
OldVal: LongInt;
begin
wndTaskbar := FindWindow('Shell_TrayWnd', Nil);
If wndTaskbar <> 0 Then
Begin
If HideIt Then
Begin
// Hide taskbar and desktop
EnableWindow(wndTaskbar, False); // Disable taskbar
ShowWindow(wndTaskbar, SW_HIDE); // Hide taskbar

// ----< Hooking stuff >----

ShowWindow(FindWindow(Nil, 'Program Manager'), SW_HIDE); // Hide desktop (Icons, etc)

HideIt := False;
End Else
Begin
// Show taskbar and desktop
EnableWindow(wndTaskbar, True); // Enable taskbar
ShowWindow(wndTaskbar, SW_SHOW); // Show taskbar

// ----< Hooking stuff >----

ShowWindow(FindWindow(Nil, 'Program Manager'), SW_SHOW); // Show desktop (Icons, etc)

HideIt := True;
End;
end;


I try to hook the left double click event, but this doesnt message isnt passed :s



Edit:
I have uploaded my sample program to test this, with source:
http://www.biocoders.org/Sample01.zip




Thanx for any help