Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hey,

 

I don't know how many of you are familiar with C++ and Win32 programming, but here is what I would like to do in C#.

 

I need to write my own event handler, much like you would write a message loop in C++.

 

Bascially, I want to be able to handle every event fired off myself.

 

For example, this is similar to what it would look like in C++.

 

...
switch(msg)
{
    case WM_RMCLICK:
         ...
         break;
    case WM_MINIMIZE:
         ...
         break;
    case WM_QUIT:
         ...
         break;
    default:
         ...
         break;
}
...

 

Take note that the ellipses are there as place holders for code :)

 

Hopefully what I need to do is possible in C#, and hopefully you understand what I tried to explain.

 

Thanks

  • *Experts*
Posted

The method of handling events is much more robust than this in

C# and other .NET languages. I suggest you read up on

[mshelp=ms-help://MS.MSDNQTR.2003FEB.1033/cpguide/html/cpconevents.htm]events and delegates[/mshelp].

"Being grown up isn't half as fun as growing up

These are the best days of our lives"

-The Ataris, In This Diary

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...