🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.nativeapi
6 messages
6 total messages Started by Diederik Wed, 30 Apr 2003 21:54
Desktop
#16708
Author: Diederik
Date: Wed, 30 Apr 2003 21:54
4 lines
949 bytes
Hi,
Does anybody have a sample of the createDesktop API function?

thanx
Re: Desktop
#16709
Author: Remy Lebeau (TeamB)
Date: Wed, 30 Apr 2003 22:06
26 lines
1833 bytes
"Diederik" <diederik@noos.fr> wrote in message
news:3eb04583$1@newsgroups.borland.com...

> Does anybody have a sample of the createDesktop API function?

It would help if you would provide more details about what exactly you want
to use the new desktop for.  But in general, it is something along the
following basics (need more details to provide deeper examples):

    DWORD dwDesiredAccess = (DESKTOP_CREATEMENU | DESKTOP_CREATEWINDOW |
DESKTOP_ENUMERATE | DESKTOP_SWITCHDESKTOP);

    HDESK hDesktop = CreateDesktop("MyDesktop", NULL, NULL, 0,
dwDesiredAccess, NULL);
    HDESK hPrevious = OpenInputDesktop(0, FALSE, DESKTOP_SWITCHDESKTOP);
    ...
    SwitchDesktop(hDesktop);
    // use desktop as needed
    ...
    SwitchDesktop(hPrevious);
    CloseDesktop(hPrevious);
    CloseDesktop(hDesktop);


Gambit
Re: Desktop
#16712
Author: Diederik
Date: Thu, 01 May 2003 04:22
38 lines
2294 bytes
Thx REmy,
In fact I can switch to my newly created desktop.
The problem is that I have nothing(no windows) on this new desktop.
So what i want is a real and effective new desktop. Am i clear enough.?

Thank you

"Remy Lebeau (TeamB)" <gambit47@yahoo.com> wrote in message
news:3eb048b2$1@newsgroups.borland.com...
>
> "Diederik" <diederik@noos.fr> wrote in message
> news:3eb04583$1@newsgroups.borland.com...
>
> > Does anybody have a sample of the createDesktop API function?
>
> It would help if you would provide more details about what exactly you
want
> to use the new desktop for.  But in general, it is something along the
> following basics (need more details to provide deeper examples):
>
>     DWORD dwDesiredAccess = (DESKTOP_CREATEMENU | DESKTOP_CREATEWINDOW |
> DESKTOP_ENUMERATE | DESKTOP_SWITCHDESKTOP);
>
>     HDESK hDesktop = CreateDesktop("MyDesktop", NULL, NULL, 0,
> dwDesiredAccess, NULL);
>     HDESK hPrevious = OpenInputDesktop(0, FALSE, DESKTOP_SWITCHDESKTOP);
>     ...
>     SwitchDesktop(hDesktop);
>     // use desktop as needed
>     ...
>     SwitchDesktop(hPrevious);
>     CloseDesktop(hPrevious);
>     CloseDesktop(hDesktop);
>
>
> Gambit
>
>
Re: Desktop
#16714
Author: Remy Lebeau (TeamB)
Date: Thu, 01 May 2003 06:04
18 lines
1755 bytes
"Diederik" <diederik@noos.fr> wrote in message
news:3eb0a068$1@newsgroups.borland.com...

> In fact I can switch to my newly created desktop.
> The problem is that I have nothing(no windows)
> on this new desktop.

Nor should you yet.  All you have done so far is create a new empty desktop.
In order to actually display anything on it, you have to create your windows
within its context.  Look at the CreateWindowStation(),
SetProcessWindowStation() and SetThreadDesktop() functions as well.  Once
you have one of your process's threads associated with your new desktop, any
windows that you create in the context of that thread should appear inside
your desktop.


Gambit
Re: Desktop
#16719
Author: dln
Date: Thu, 01 May 2003 11:03
51 lines
2960 bytes
You'll need to start a new instance of Windows Explorer.  The first instance
of explorer on any desktop effectively controls the Windows "shell" - it'll
give you your Start menu and desktop icons.  If you use the CreateProcess
API call to start Explorer on the new desktop, make sure that you specify
the name of the desktop you wish to start Explorer on, in the STARTUPINFO
structure that is passed to CreateProcess.  That should do it for you.

HTH

"Diederik" <diederik@noos.fr> wrote in message
news:3eb0a068$1@newsgroups.borland.com...
> Thx REmy,
> In fact I can switch to my newly created desktop.
> The problem is that I have nothing(no windows) on this new desktop.
> So what i want is a real and effective new desktop. Am i clear enough.?
>
> Thank you
>
> "Remy Lebeau (TeamB)" <gambit47@yahoo.com> wrote in message
> news:3eb048b2$1@newsgroups.borland.com...
> >
> > "Diederik" <diederik@noos.fr> wrote in message
> > news:3eb04583$1@newsgroups.borland.com...
> >
> > > Does anybody have a sample of the createDesktop API function?
> >
> > It would help if you would provide more details about what exactly you
> want
> > to use the new desktop for.  But in general, it is something along the
> > following basics (need more details to provide deeper examples):
> >
> >     DWORD dwDesiredAccess = (DESKTOP_CREATEMENU | DESKTOP_CREATEWINDOW |
> > DESKTOP_ENUMERATE | DESKTOP_SWITCHDESKTOP);
> >
> >     HDESK hDesktop = CreateDesktop("MyDesktop", NULL, NULL, 0,
> > dwDesiredAccess, NULL);
> >     HDESK hPrevious = OpenInputDesktop(0, FALSE, DESKTOP_SWITCHDESKTOP);
> >     ...
> >     SwitchDesktop(hDesktop);
> >     // use desktop as needed
> >     ...
> >     SwitchDesktop(hPrevious);
> >     CloseDesktop(hPrevious);
> >     CloseDesktop(hDesktop);
> >
> >
> > Gambit
> >
> >
>
>
Re: Desktop
#16661
Author: Diederik
Date: Sun, 04 May 2003 12:10
61 lines
3186 bytes
OK Guys thank for your clues.

"dln" <dnadon@nospam.austin.rr.com> wrote in message
news:3eb0fd5b$1@newsgroups.borland.com...
> You'll need to start a new instance of Windows Explorer.  The first
instance
> of explorer on any desktop effectively controls the Windows "shell" -
it'll
> give you your Start menu and desktop icons.  If you use the CreateProcess
> API call to start Explorer on the new desktop, make sure that you specify
> the name of the desktop you wish to start Explorer on, in the STARTUPINFO
> structure that is passed to CreateProcess.  That should do it for you.
>
> HTH
>
> "Diederik" <diederik@noos.fr> wrote in message
> news:3eb0a068$1@newsgroups.borland.com...
> > Thx REmy,
> > In fact I can switch to my newly created desktop.
> > The problem is that I have nothing(no windows) on this new desktop.
> > So what i want is a real and effective new desktop. Am i clear enough.?
> >
> > Thank you
> >
> > "Remy Lebeau (TeamB)" <gambit47@yahoo.com> wrote in message
> > news:3eb048b2$1@newsgroups.borland.com...
> > >
> > > "Diederik" <diederik@noos.fr> wrote in message
> > > news:3eb04583$1@newsgroups.borland.com...
> > >
> > > > Does anybody have a sample of the createDesktop API function?
> > >
> > > It would help if you would provide more details about what exactly you
> > want
> > > to use the new desktop for.  But in general, it is something along the
> > > following basics (need more details to provide deeper examples):
> > >
> > >     DWORD dwDesiredAccess = (DESKTOP_CREATEMENU | DESKTOP_CREATEWINDOW
|
> > > DESKTOP_ENUMERATE | DESKTOP_SWITCHDESKTOP);
> > >
> > >     HDESK hDesktop = CreateDesktop("MyDesktop", NULL, NULL, 0,
> > > dwDesiredAccess, NULL);
> > >     HDESK hPrevious = OpenInputDesktop(0, FALSE,
DESKTOP_SWITCHDESKTOP);
> > >     ...
> > >     SwitchDesktop(hDesktop);
> > >     // use desktop as needed
> > >     ...
> > >     SwitchDesktop(hPrevious);
> > >     CloseDesktop(hPrevious);
> > >     CloseDesktop(hDesktop);
> > >
> > >
> > > Gambit
> > >
> > >
> >
> >
>
>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads