Click here to Skip to main content
15,895,142 members
Home / Discussions / C#
   

C#

 
GeneralRe: problem with Textboxes Pin
Heath Stewart17-Feb-04 12:23
protectorHeath Stewart17-Feb-04 12:23 
Generalwriting a struct to a binary file Pin
DennisMetz17-Feb-04 4:19
DennisMetz17-Feb-04 4:19 
GeneralRe: writing a struct to a binary file Pin
Heath Stewart17-Feb-04 4:44
protectorHeath Stewart17-Feb-04 4:44 
GeneralRe: writing a struct to a binary file Pin
DennisMetz17-Feb-04 5:06
DennisMetz17-Feb-04 5:06 
GeneralRe: writing a struct to a binary file Pin
Heath Stewart17-Feb-04 6:19
protectorHeath Stewart17-Feb-04 6:19 
Generalcatch tabpage change Pin
troels_sorensen17-Feb-04 3:41
troels_sorensen17-Feb-04 3:41 
GeneralRe: catch tabpage change Pin
Heath Stewart17-Feb-04 4:07
protectorHeath Stewart17-Feb-04 4:07 
GeneralRe: catch tabpage change Pin
Anonymous17-Feb-04 8:44
Anonymous17-Feb-04 8:44 
Confused | :confused: Forgive me, but I'm a little confused.

Heath Stewart wrote:
private const int TCN_SELCHANGING = -552;

I'm assuming that's from CommCtrl.h :

#define TCN_FIRST               (0U-550U)       // tab control
...
#define TCN_SELCHANGING         (TCN_FIRST - 2)


But the MSDN library has the following definition for WindowProc:

LRESULT CALLBACK WindowProc(          HWND hwnd,
    UINT uMsg,
    WPARAM wParam,
    LPARAM lParam
);

Which leads me to believe that uMsg will never be -552.

To test it, I derived a control from TabControl and overrode WndProc as such:
protected override void WndProc(ref Message m) {
   Console.WriteLine(m.Msg);
   base.WndProc (ref m);
}

I added my tab control to a form, gave it a few tabpages and ran it. Sure enough, every value printed as I clicked and poked and prodded was a positive integer.

I started programming with .NET, so I don't have any prior experience with windows messages and I'm obviously missing something, but I can't figure it out. I've been searching the documentation for the last hour trying to make sense of it, with no luck.
GeneralRe: catch tabpage change Pin
Heath Stewart17-Feb-04 9:21
protectorHeath Stewart17-Feb-04 9:21 
GeneralRe: catch tabpage change Pin
Anonymous17-Feb-04 10:56
Anonymous17-Feb-04 10:56 
GeneralRe: catch tabpage change Pin
Heath Stewart17-Feb-04 12:14
protectorHeath Stewart17-Feb-04 12:14 
GeneralRe: catch tabpage change Pin
Anonymous17-Feb-04 12:59
Anonymous17-Feb-04 12:59 
GeneralRe: catch tabpage change Pin
troels_sorensen18-Feb-04 21:15
troels_sorensen18-Feb-04 21:15 
GeneralRe: catch tabpage change Pin
Heath Stewart19-Feb-04 3:30
protectorHeath Stewart19-Feb-04 3:30 
Generalpictures in a datagrid Pin
troels_sorensen17-Feb-04 3:38
troels_sorensen17-Feb-04 3:38 
GeneralRe: pictures in a datagrid Pin
Heath Stewart17-Feb-04 4:21
protectorHeath Stewart17-Feb-04 4:21 
Questionneed sql query? Pin
murali_utr17-Feb-04 3:19
murali_utr17-Feb-04 3:19 
AnswerRe: need sql query? Pin
Heath Stewart17-Feb-04 4:33
protectorHeath Stewart17-Feb-04 4:33 
Questionwhats wrong? Pin
ASGill17-Feb-04 2:16
ASGill17-Feb-04 2:16 
AnswerRe: whats wrong? Pin
Uwe Keim17-Feb-04 3:01
sitebuilderUwe Keim17-Feb-04 3:01 
AnswerRe: whats wrong? Pin
Heath Stewart17-Feb-04 3:15
protectorHeath Stewart17-Feb-04 3:15 
GeneralCustom ListBox.Items Pin
Simon Wren17-Feb-04 2:11
professionalSimon Wren17-Feb-04 2:11 
GeneralRe: Custom ListBox.Items Pin
Heath Stewart17-Feb-04 4:52
protectorHeath Stewart17-Feb-04 4:52 
GeneralWinForms: SuspendLayout on Application Pin
troels_sorensen17-Feb-04 2:06
troels_sorensen17-Feb-04 2:06 
GeneralRe: WinForms: SuspendLayout on Application Pin
Heath Stewart17-Feb-04 4:54
protectorHeath Stewart17-Feb-04 4:54 

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.