Some problem make me confused.
After I created a new thread, I need to call
1. RegisterClassEx() to create my own windows class
2. CreateWindow() to create the window of this class
3. RegisterDeviceNotification()
In step 1.
For RegisterClassEx(), I need to provide "Handle to the instance that
contains the window procedure for the class".
Is it the handle of the thread I just created?
Or is it the handle of the application? If yes, where to get it ?
Where can I get the handle of the class icon, cursor,background brush...
How can a console application that start with "main" give such graphic
information?
Shall I create an appliction that start with "WinMain" ?
In step 2,
For CreateWindow(), I also need to set the "handle to application instance".
Where to get it?
Could anyone give me some addvice or example code? Thanks a lot!
"Doron Holan [MS]" wrote:
> speicifically, when calling CreateWindow, do not specify WS_VISIBLE in the
> 3rd parameter (dwStyle). you will have to create your own window class and
> implement your own WndProc.
>
> d
>
> --
> Please do not send e-mail directly to this alias. this alias is for
> newsgroup purposes only.
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
> "Pavel A." <> wrote in message
> news:FE68DE6F-26E2-4979-B041-...
> > "Amanda Lin" wrote:
> > ....
> >> I was suggested to create a hidden window in a separate thread.
> >
> > It is a very good advice, it works. Why not to follow it?
> >
> >> But CreateThread() only return the thread hanle and there is no window
> >> attributes I can set when calling CreateThread().
> >
> > Great, and then call CreateWindow...
> >
> >> Are there any other APIs?
> >
> > May be these events are available thru WMI, but this can be even harder
> > way than a window.
> >
> > Regards,
> > --PA
> >
>
>
>
|