[wx-dev] Regarding wxThread
Shriram Bhat
shriramnb at gmail.com
Wed Apr 23 22:14:16 PDT 2008
Hi Stefan,
Thanks for your reply. I will try by deriving a class from wxThread.
Regards,
Shriram
On 4/23/08, Stefan.Neis at t-online.de <Stefan.Neis at t-online.de> wrote:
>
> Hi,
>
> > I have a wxWidget application. In that i want to call a function from a
> thread.</div>
> > I went through thread sample code. Here a class is inherited from
> wxThread and it is overriding Entry() method.</div>
> >
> > But in my application, i just want to create a thread and run a function
> inside that
> > thread.</div>
>
> Well, just derive a class from wxThread and have its Entry() function call
> the function that you want to run in the thread.
>
> > div>CWinThread* AfxBeginThread(<br> AFX_THREADPROC
> pfnThreadProc,<br>&nb
> > sp; LPVOID pParam,<br> int nPriority
> =3DTHREAD_PRIORITY_NORMAL,<br>&nb
> > sp; UINT nStackSize =3D 0,<br> DWORD dwCreateFlags =
=3D
> 0,<br> &nb
> > sp;LPSECURITY_ATTRIBUTES lpSecurityAttrs =3D NULL <br>
>
> There's no such idiom in wxWidgets, you really need to create an instance
> of
> a wxThread(-derived class) to represent the thread and then have that run
> the
> function ...
>
> HTH,
> Stefan
>
> P.S.: If you could avoid HTML-only mail, that would improve general
> readability of your mails ...
>
>
> _______________________________________________
> wx-dev mailing list
> wx-dev at lists.wxwidgets.org
> http://lists.wxwidgets.org/mailman/listinfo/wx-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wx-dev/attachments/20080423/c632f=
2ee/attachment.htm
More information about the wx-dev
mailing list