Click here to Skip to main content
15,921,113 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to work with controls in MFC? Pin
Lord Kixdemp9-Oct-06 10:16
Lord Kixdemp9-Oct-06 10:16 
QuestionChange cursor image(Win 32 Application -Helloworld) Pin
TranQuangNhat7-Oct-06 19:01
TranQuangNhat7-Oct-06 19:01 
AnswerRe: Change cursor image(Win 32 Application -Helloworld) Pin
Hamid_RT7-Oct-06 19:30
Hamid_RT7-Oct-06 19:30 
GeneralRe: Change cursor image(Win 32 Application -Helloworld) Pin
TranQuangNhat8-Oct-06 1:20
TranQuangNhat8-Oct-06 1:20 
GeneralRe: Change cursor image(Win 32 Application -Helloworld) Pin
Hamid_RT8-Oct-06 2:13
Hamid_RT8-Oct-06 2:13 
AnswerRe: Change cursor image(Win 32 Application -Helloworld) Pin
Michael Dunn8-Oct-06 11:26
sitebuilderMichael Dunn8-Oct-06 11:26 
QuestionBasic handles question Pin
Oliver1237-Oct-06 12:03
Oliver1237-Oct-06 12:03 
AnswerRe: Basic handles question Pin
Mike_V7-Oct-06 12:43
Mike_V7-Oct-06 12:43 
Handles are a Windows concept - they are just used in VC because VC normally is used for Windows programming. They are similar to a pointer in that they store an index into some internal table. By looking up that index, Windows can find the actual data that manages the window. But as far as you are concerned, a handle is just some opaque number you can pass around to various Windows functions.

For the dialog - there should be something like pTestDlg->getHwnd() or whatever the MFC equivalent is.

To get a handle to a control, call ::GetDlgItem(hDialog, IDC_EDIT1); where hDialog is an HWND obtained by using a method above. Alternatively, if IDC_EDIT1 is represented by an MFC class, just call the getHwnd equivalent on that class.

Member functions cannot have handles. A handle is used by Windows - but a member function is just a special type of function. You can create a pointer to a member function, but the syntax is ugly and very limited as to what you can do. Or you can search for fastdelegate on CodeProject to find a member function pointer wrapper.

Mike
AnswerRe: Basic handles question Pin
Angbo20067-Oct-06 20:12
Angbo20067-Oct-06 20:12 
AnswerRe: Basic handles question Pin
Hamid_RT8-Oct-06 7:14
Hamid_RT8-Oct-06 7:14 
AnswerRe: Basic handles question Pin
Oliver1238-Oct-06 9:25
Oliver1238-Oct-06 9:25 
QuestionFull Screen Pin
Waldermort7-Oct-06 8:47
Waldermort7-Oct-06 8:47 
AnswerRe: Full Screen Pin
Hamid_RT7-Oct-06 9:10
Hamid_RT7-Oct-06 9:10 
GeneralRe: Full Screen Pin
Waldermort7-Oct-06 14:10
Waldermort7-Oct-06 14:10 
AnswerRe: Full Screen Pin
Link20067-Oct-06 14:34
Link20067-Oct-06 14:34 
GeneralRe: Full Screen Pin
Waldermort7-Oct-06 14:39
Waldermort7-Oct-06 14:39 
AnswerRe: Full Screen Pin
Link20067-Oct-06 14:52
Link20067-Oct-06 14:52 
GeneralRe: Full Screen Pin
Waldermort7-Oct-06 15:05
Waldermort7-Oct-06 15:05 
GeneralRe: Full Screen Pin
Angbo20067-Oct-06 19:59
Angbo20067-Oct-06 19:59 
AnswerRe: Full Screen Pin
A_Fa7-Oct-06 20:00
A_Fa7-Oct-06 20:00 
QuestionAdding Pictures Pin
Grimes7-Oct-06 7:28
Grimes7-Oct-06 7:28 
AnswerRe: Adding Pictures Pin
Hamid_RT7-Oct-06 7:44
Hamid_RT7-Oct-06 7:44 
QuestionRe: Adding Pictures Pin
Grimes7-Oct-06 7:51
Grimes7-Oct-06 7:51 
AnswerRe: Adding Pictures Pin
Hamid_RT7-Oct-06 8:08
Hamid_RT7-Oct-06 8:08 
QuestionNon Client Messages Pin
Waldermort7-Oct-06 6:40
Waldermort7-Oct-06 6:40 

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.