Click here to Skip to main content
15,917,795 members
Home / Discussions / C#
   

C#

 
QuestionProblem in facebook app using C# sdk Pin
rahul_galgali29-Sep-11 19:05
rahul_galgali29-Sep-11 19:05 
AnswerRe: Problem in facebook app using C# sdk Pin
killabyte29-Sep-11 20:14
killabyte29-Sep-11 20:14 
GeneralRe: Problem in facebook app using C# sdk Pin
rahul_galgali29-Sep-11 20:58
rahul_galgali29-Sep-11 20:58 
AnswerRe: Problem in facebook app using C# sdk Pin
Richard MacCutchan29-Sep-11 22:18
mveRichard MacCutchan29-Sep-11 22:18 
AnswerRe: Problem in facebook app using C# sdk Pin
Eddy Vluggen30-Sep-11 6:51
professionalEddy Vluggen30-Sep-11 6:51 
QuestionBeginner C# developer question Pin
SFORavi29-Sep-11 9:44
SFORavi29-Sep-11 9:44 
AnswerRe: Beginner C# developer question Pin
DaveyM6929-Sep-11 9:53
professionalDaveyM6929-Sep-11 9:53 
GeneralRe: Beginner C# developer question Pin
SFORavi29-Sep-11 10:08
SFORavi29-Sep-11 10:08 
GeneralMessage Removed Pin
29-Sep-11 10:14
professionalN_tro_P29-Sep-11 10:14 
GeneralRe: Beginner C# developer question Pin
SFORavi29-Sep-11 11:42
SFORavi29-Sep-11 11:42 
AnswerRe: Beginner C# developer question Pin
Perić Željko6-Oct-11 9:06
professionalPerić Željko6-Oct-11 9:06 
QuestionHow to set IPv6 address to the adapter using C# Pin
Member 760066229-Sep-11 7:20
Member 760066229-Sep-11 7:20 
QuestionLinq to Sql Pin
siva45529-Sep-11 4:01
siva45529-Sep-11 4:01 
AnswerRe: Linq to Sql Pin
Rob Philpott29-Sep-11 6:33
Rob Philpott29-Sep-11 6:33 
GeneralRe: Linq to Sql Pin
siva45529-Sep-11 16:13
siva45529-Sep-11 16:13 
AnswerRe: Linq to Sql Pin
killabyte29-Sep-11 17:30
killabyte29-Sep-11 17:30 
GeneralRe: Linq to Sql Pin
siva45529-Sep-11 17:55
siva45529-Sep-11 17:55 
GeneralRe: Linq to Sql Pin
killabyte29-Sep-11 20:08
killabyte29-Sep-11 20:08 
GeneralRe: Linq to Sql Pin
siva45530-Sep-11 18:42
siva45530-Sep-11 18:42 
QuestionI don't understand the wndProc, PreProcessMessage and how to use it's inparameter message Pin
fiaolle28-Sep-11 21:15
fiaolle28-Sep-11 21:15 
AnswerRe: I don't understand the wndProc, PreProcessMessage and how to use it's inparameter message Pin
Richard MacCutchan28-Sep-11 22:39
mveRichard MacCutchan28-Sep-11 22:39 
GeneralRe: I don't understand the wndProc, PreProcessMessage and how to use it's inparameter message Pin
fiaolle28-Sep-11 23:57
fiaolle28-Sep-11 23:57 
GeneralRe: I don't understand the wndProc, PreProcessMessage and how to use it's inparameter message Pin
Richard MacCutchan29-Sep-11 0:14
mveRichard MacCutchan29-Sep-11 0:14 
GeneralRe: I don't understand the wndProc, PreProcessMessage and how to use it's inparameter message Pin
fiaolle29-Sep-11 10:09
fiaolle29-Sep-11 10:09 
Hi
Thanks again for your answers, but I have till trouble to understand to use m.Result=IntPtr(0) or what to put in IntPtr.
I have two examples I have googled:

In this example it stops users to paste anything to a textbox.

C#
protected override void WndProc(ref Message m)
        {

           if (m.Msg != WM_PASTE )
           {
               base.WndProc(ref m);
           }

        }


In this example users can just paste in numbers in a textbox.
C#
protected override void WndProc(ref Message m)
       {
           if (m.Msg == WM_PASTE  )
           {
               IDataObject obj = Clipboard.GetDataObject();
               string input = (string)obj.GetData(typeof(string));
               foreach (char c in input)
               {
                   if (!char.IsDigit(c))
                   {
                       m.Result = (IntPtr)0;
                          return;
                   }
               }
           }
           base.WndProc(ref m);
       }


Why do we have to assign to m.Result the InPtr 0? What is IntPtr and how do I know which int (amount) I should return?

Many thanks

Fia
GeneralRe: I don't understand the wndProc, PreProcessMessage and how to use it's inparameter message Pin
Richard MacCutchan29-Sep-11 21:36
mveRichard MacCutchan29-Sep-11 21:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.