Click here to Skip to main content
16,007,126 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: RTTI...? and MFC...? Pin
alex.barylski7-Aug-02 11:37
alex.barylski7-Aug-02 11:37 
GeneralRe: RTTI...? and MFC...? Pin
Neville Franks11-Aug-02 11:36
Neville Franks11-Aug-02 11:36 
QuestionHow I write a wizard that have 4 window ? Pin
storein6-Aug-02 17:09
storein6-Aug-02 17:09 
AnswerRe: How I write a wizard that have 4 window ? Pin
Michael Dunn6-Aug-02 18:29
sitebuilderMichael Dunn6-Aug-02 18:29 
GeneralRe: How I write a wizard that have 4 window ? Pin
storein6-Aug-02 21:02
storein6-Aug-02 21:02 
GeneralC++.net question Pin
Zenix26-Aug-02 16:05
Zenix26-Aug-02 16:05 
Generalsendmessage help Pin
imran_rafique6-Aug-02 16:02
imran_rafique6-Aug-02 16:02 
GeneralRe: sendmessage help Pin
Peter Occil6-Aug-02 17:00
Peter Occil6-Aug-02 17:00 
To reiterate a reply I made here:

The SendMessage function sends a message to the window procedure of a window. It doesn't return until the window fully processes the message. You should never send messages to windows of other applications because it is possible that the application may be hung and SendMessage will never return.

This is the prototype of SendMessage.


LRESULT SendMessage(
    HWND hWnd,	// handle of destination window
    UINT Msg,	// message to send
    WPARAM wParam,	// first message parameter
    LPARAM lParam 	// second message parameter
);



The hwnd parameter, as you know, is the handle to a window to which to send a message. The Msg parameter identifies what type of message to send, and the wParam and lParam parameters specify additional information about the message.

The system and applications communicate to windows via messages. Besides SendMessage, there is the PostMessage function, which sends a message to a window and returns immediately, making it ideal for communicating with windows in other applications.

To answer the second question, to programmatically simulate a button click, make the following call:

SendMessage(hwndBtn,BM_CLICK,0,0);


Peter O.
Generalshortcut access to base class function/variable Pin
oRion6-Aug-02 16:00
oRion6-Aug-02 16:00 
GeneralRe: shortcut access to base class function/variable Pin
Anonymous6-Aug-02 23:24
Anonymous6-Aug-02 23:24 
GeneralRe: shortcut access to base class function/variable Pin
oRion7-Aug-02 2:43
oRion7-Aug-02 2:43 
GeneralFile copy (Backup/Restore) utility.Read it n u'll cum 2 know Pin
tushar bhatnagar6-Aug-02 13:18
tushar bhatnagar6-Aug-02 13:18 
GeneralRe: File copy (Backup/Restore) utility.Read it n u'll cum 2 know Pin
Anonymous6-Aug-02 23:30
Anonymous6-Aug-02 23:30 
Generaldynamic button ... Pin
AlinRO6-Aug-02 13:17
AlinRO6-Aug-02 13:17 
GeneralRe: dynamic button ... Pin
Hydralisk6-Aug-02 14:59
Hydralisk6-Aug-02 14:59 
GeneralControl Redraw broken Pin
CaesarCZ6-Aug-02 13:05
CaesarCZ6-Aug-02 13:05 
GeneralVS 6 & XP Home & NTDLL.DLL Pin
Eldon Zacek6-Aug-02 12:20
Eldon Zacek6-Aug-02 12:20 
GeneralRe: VS 6 & XP Home & NTDLL.DLL Pin
Wolfram Steinke6-Aug-02 18:22
Wolfram Steinke6-Aug-02 18:22 
GeneralRich Text Edit Boxes Pin
Ken Mazaika6-Aug-02 12:05
Ken Mazaika6-Aug-02 12:05 
GeneralRe: Rich Text Edit Boxes Pin
Ken Mazaika6-Aug-02 12:29
Ken Mazaika6-Aug-02 12:29 
Questionhow to preallocate memory? Pin
francg6-Aug-02 11:46
francg6-Aug-02 11:46 
AnswerRe: how to preallocate memory? Pin
Tomasz Sowinski6-Aug-02 12:02
Tomasz Sowinski6-Aug-02 12:02 
AnswerRe: how to preallocate memory? Pin
alex.barylski6-Aug-02 14:54
alex.barylski6-Aug-02 14:54 
AnswerRe: how to preallocate memory? Pin
Daniel Lohmann7-Aug-02 1:21
Daniel Lohmann7-Aug-02 1:21 
QuestionHow to use CTreeCtrl::SetCheck correctly? Pin
Pachoo6-Aug-02 11:27
Pachoo6-Aug-02 11:27 

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.