Click here to Skip to main content
15,912,507 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Solution Pin
valikac27-Apr-02 11:08
valikac27-Apr-02 11:08 
GeneralRe: Solution Pin
Tom Archer27-Apr-02 11:15
Tom Archer27-Apr-02 11:15 
GeneralRe: Solution Pin
valikac27-Apr-02 11:47
valikac27-Apr-02 11:47 
GeneralRe: Solution Pin
Tom Archer27-Apr-02 11:53
Tom Archer27-Apr-02 11:53 
GeneralRe: Solution Pin
valikac27-Apr-02 11:54
valikac27-Apr-02 11:54 
GeneralMessages Pin
Wizard_0127-Apr-02 8:12
Wizard_0127-Apr-02 8:12 
GeneralRe: Messages Pin
Michael P Butler27-Apr-02 10:13
Michael P Butler27-Apr-02 10:13 
GeneralRe: Messages Pin
Tom Archer27-Apr-02 11:10
Tom Archer27-Apr-02 11:10 
You need to override the WindowProc function. Here's an example of doing that where I'm not allowing the OK button's normal processing to continue (by returning FALSE from the function).
if (message == WM_COMMAND && LOWORD(wParam) == IDOK)
{
  TRACE("I got this click and I'm not allowing it to process!!");
  return FALSE;
}

If I want the button to handle it's message, then I simply return the return value of the base class' WindowProc function:
return CDialog::WindowProc(message, wParam, lParam);

Also, you can use the hwnd of the control (I used the resource id) by referencing the lParam argument (instead of the low byte of the wParam).

Cheers,
Tom Archer
Author, Inside C#

Please note that the opinions expressed in this correspondence do not necessarily reflect the views of the author.
GeneralAdding own things to the explorer browser Pin
<k>Andreas Hoheisel27-Apr-02 8:10
<k>Andreas Hoheisel27-Apr-02 8:10 
GeneralRe: Adding own things to the explorer browser Pin
Michael Dunn27-Apr-02 8:39
sitebuilderMichael Dunn27-Apr-02 8:39 
GeneralRe: Adding own things to the explorer browser Pin
<k>Andreas Hoheisel28-Apr-02 8:56
<k>Andreas Hoheisel28-Apr-02 8:56 
Generaldrag drop a bitmap Pin
shokisingh27-Apr-02 7:15
shokisingh27-Apr-02 7:15 
GeneralRe: drag drop a bitmap Pin
Tom Archer27-Apr-02 11:13
Tom Archer27-Apr-02 11:13 
GeneralProperties of ActiveX (and control) Pin
Wizard_0127-Apr-02 6:43
Wizard_0127-Apr-02 6:43 
GeneralRight-aligning with WS_EX_RTLREADING Pin
Oz Ben Eliezer27-Apr-02 6:28
Oz Ben Eliezer27-Apr-02 6:28 
GeneralRe: Right-aligning with WS_EX_RTLREADING Pin
Michael Dunn27-Apr-02 7:16
sitebuilderMichael Dunn27-Apr-02 7:16 
GeneralRe: Right-aligning with WS_EX_RTLREADING Pin
Oz Ben Eliezer27-Apr-02 8:13
Oz Ben Eliezer27-Apr-02 8:13 
GeneralConsole Question Pin
Brian Delahunty27-Apr-02 6:25
Brian Delahunty27-Apr-02 6:25 
GeneralRe: Console Question Pin
Nish Nishant27-Apr-02 6:44
sitebuilderNish Nishant27-Apr-02 6:44 
GeneralRe: Console Question Pin
Brian Delahunty27-Apr-02 6:51
Brian Delahunty27-Apr-02 6:51 
GeneralRe: Console Question Pin
markkuk28-Apr-02 20:30
markkuk28-Apr-02 20:30 
GeneralSaving the printer info like WORD Pin
27-Apr-02 6:08
suss27-Apr-02 6:08 
Generalconst & structs & threads Pin
27-Apr-02 5:37
suss27-Apr-02 5:37 
GeneralRe: const & structs & threads Pin
Neville Franks27-Apr-02 12:47
Neville Franks27-Apr-02 12:47 
GeneralRe: const & structs & threads Pin
Joaquín M López Muñoz28-Apr-02 4:51
Joaquín M López Muñoz28-Apr-02 4:51 

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.