Click here to Skip to main content
15,898,222 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Query builder component Pin
l a u r e n1-Aug-01 0:39
l a u r e n1-Aug-01 0:39 
Question^!^ help-- how to synchronize session between multi server.?? Pin
aff31-Jul-01 19:09
aff31-Jul-01 19:09 
AnswerRe: ^!^ help-- how to synchronize session between multi server.?? Pin
Tomasz Sowinski1-Aug-01 2:43
Tomasz Sowinski1-Aug-01 2:43 
GeneralRe: ^!^ help-- how to synchronize session between multi server.?? Pin
aff1-Aug-01 20:26
aff1-Aug-01 20:26 
QuestionHow to use ACROBAT PDF ActiveX component in a Dialog.exe application? Pin
31-Jul-01 18:50
suss31-Jul-01 18:50 
AnswerRe: How to use ACROBAT PDF ActiveX component in a Dialog.exe application? Pin
Christian Graus2-Aug-01 18:19
protectorChristian Graus2-Aug-01 18:19 
GeneralWTL - dynamically creating buttons etc. Pin
Christian Graus31-Jul-01 18:03
protectorChristian Graus31-Jul-01 18:03 
GeneralRe: WTL - dynamically creating buttons etc. Pin
Christian Graus31-Jul-01 18:22
protectorChristian Graus31-Jul-01 18:22 
OK - got that working like this:

RECT rc = {10, 10, 50, 50};
m_btn.Create(m_hWnd, rc, "", WS_CHILD | WS_VISIBLE);
m_btn.ShowWindow(SW_SHOW);


I actually didn't notice that I was creating a button on screen in the corner - why isn't WS_CHILD a default value ?

Anyhow, now I need to know how to get messages from the button in my dialog. From memory it's subclass window, is that right ?

I'm editing this message now - it's not SubclassWindow, which allows me to attach a variable to a control on the dialog. I want to create a CButton and capture it's being pressed ( actually I want to be able to do that to lots of them ). Can anyone suggest how this is done ?\

Editing yet again. I discovered if I overrode WM_COMMAND I could catch the button press, with lParam equalling the hWnd of the button. I've used this prototype:

LRESULT OnCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& /*bHandled*/)

and found that wParam is always 0 and uMsg is 0x0111 ( WM_COMMAND ). Surely WM_COMMAND will be called for things other than buttons ? How can I tell how I got there so I can respond intelligently to the event ?

Thanks

Christian

#include "std_disclaimer.h"

The careful application of terror is also a form of communication.

Eagles may soar, but weasels don't get sucked into jet engines.
GeneralRe: WTL - dynamically creating buttons etc. Pin
Tommy H D Svensson2-Aug-01 9:35
Tommy H D Svensson2-Aug-01 9:35 
GeneralRe: WTL - dynamically creating buttons etc. Pin
Christian Graus2-Aug-01 11:35
protectorChristian Graus2-Aug-01 11:35 
GeneralRe: WTL - dynamically creating buttons etc. Pin
Michael Dunn31-Jul-01 20:06
sitebuilderMichael Dunn31-Jul-01 20:06 
GeneralRe: WTL - dynamically creating buttons etc. Pin
Christian Graus1-Aug-01 2:59
protectorChristian Graus1-Aug-01 2:59 
GeneralRe: WTL - dynamically creating buttons etc. Pin
Michael Dunn1-Aug-01 13:06
sitebuilderMichael Dunn1-Aug-01 13:06 
GeneralRe: WTL - dynamically creating buttons etc. Pin
Christian Graus1-Aug-01 13:09
protectorChristian Graus1-Aug-01 13:09 
GeneralCreate a Setup File Pin
sankar31-Jul-01 16:10
sankar31-Jul-01 16:10 
Generaldynamic_cast and void * Pin
31-Jul-01 11:22
suss31-Jul-01 11:22 
GeneralRe: dynamic_cast and void * Pin
Ben Burnett31-Jul-01 14:07
Ben Burnett31-Jul-01 14:07 
GeneralRe: dynamic_cast and void * Pin
Asif Ahmad31-Jul-01 19:57
Asif Ahmad31-Jul-01 19:57 
GeneralRe: dynamic_cast and void * Pin
Malcolm McMahon31-Jul-01 22:59
Malcolm McMahon31-Jul-01 22:59 
GeneralCCtrlView does not show my items Pin
Wim Jans31-Jul-01 11:05
Wim Jans31-Jul-01 11:05 
GeneralRe: CCtrlView does not show my items Pin
Ben Burnett31-Jul-01 14:24
Ben Burnett31-Jul-01 14:24 
GeneralRe: CCtrlView does not show my items Pin
Wim Jans1-Aug-01 2:12
Wim Jans1-Aug-01 2:12 
GeneralExtracting features from a BMP Pin
Russel Hawkins31-Jul-01 10:57
Russel Hawkins31-Jul-01 10:57 
GeneralRe: Extracting features from a BMP Pin
Chris Losinger31-Jul-01 11:18
professionalChris Losinger31-Jul-01 11:18 
GeneralRe: Extracting features from a BMP Pin
Russel Hawkins31-Jul-01 21:36
Russel Hawkins31-Jul-01 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.