Click here to Skip to main content
15,917,709 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionreduce the size of an array of chars.... Pin
jon-804-Sep-06 6:22
professionaljon-804-Sep-06 6:22 
AnswerRe: reduce the size of an array of chars.... Pin
Waldermort4-Sep-06 6:25
Waldermort4-Sep-06 6:25 
GeneralRe: reduce the size of an array of chars.... Pin
jon-804-Sep-06 6:32
professionaljon-804-Sep-06 6:32 
GeneralRe: reduce the size of an array of chars.... Pin
Waldermort4-Sep-06 6:43
Waldermort4-Sep-06 6:43 
GeneralRe: reduce the size of an array of chars.... Pin
jon-804-Sep-06 8:11
professionaljon-804-Sep-06 8:11 
QuestionControl handles Pin
Oliver1234-Sep-06 6:17
Oliver1234-Sep-06 6:17 
AnswerRe: Control handles Pin
Waldermort4-Sep-06 6:26
Waldermort4-Sep-06 6:26 
AnswerRe: Control handles Pin
gregdolley4-Sep-06 22:21
gregdolley4-Sep-06 22:21 
A handle (such as HWND or HANDLE) is simply typedef'ed to a long. It is a unique number assigned by the operating system to every window. When you create a window through the Win32 API, a handle is returned (HWND). Whenever you want to do something to that window you pass the HWND value to whatever Win32 function you're calling. Since MFC is basically a huge wrapper around the whole Win32 API, handles work the same way in MFC.

Your IDC_EDIT1, IDC_EDIT2, etc constants refer to the resource ID of a particular control. It is not the same as the handle. The resource ID is simply a number that the compiler uses when making resource files.

The control MFC classes (such as CEdit, CComboBox, etc.) all have a method called GetSafeHwnd() and a member called m_hWnd. Whenever you need a handle (HWND) of your control, just call GetSafeHwnd(). Or you can just grab the value of m_hWnd (it is public).

-Greg Dolley
AnswerRe: Control handles Pin
Hamid_RT11-Sep-06 9:52
Hamid_RT11-Sep-06 9:52 
Questionscanning until the EOF Pin
Desmo164-Sep-06 6:15
Desmo164-Sep-06 6:15 
AnswerRe: scanning until the EOF Pin
Waldermort4-Sep-06 6:30
Waldermort4-Sep-06 6:30 
GeneralRe: scanning until the EOF Pin
Desmo164-Sep-06 6:40
Desmo164-Sep-06 6:40 
GeneralRe: scanning until the EOF Pin
Waldermort4-Sep-06 6:49
Waldermort4-Sep-06 6:49 
Questionneed help Pin
amzeus4-Sep-06 6:04
amzeus4-Sep-06 6:04 
AnswerRe: need help Pin
Cedric Moonen4-Sep-06 6:12
Cedric Moonen4-Sep-06 6:12 
AnswerRe: need help Pin
Hamid_RT4-Sep-06 22:32
Hamid_RT4-Sep-06 22:32 
QuestionSir,How Can Find or See WinMain Function in Simple MFC Application ? Pin
CodeVarma4-Sep-06 5:54
CodeVarma4-Sep-06 5:54 
AnswerRe: Sir,How Can Find or See WinMain Function in Simple MFC Application ? Pin
Hamid_RT11-Sep-06 9:46
Hamid_RT11-Sep-06 9:46 
QuestionAnimation of bitmaps Pin
Fernando A. Gomez F.4-Sep-06 5:40
Fernando A. Gomez F.4-Sep-06 5:40 
AnswerRe: Animation of bitmaps Pin
Waldermort4-Sep-06 6:22
Waldermort4-Sep-06 6:22 
AnswerRe: Animation of bitmaps Pin
Hamid_RT4-Sep-06 22:30
Hamid_RT4-Sep-06 22:30 
GeneralRe: Animation of bitmaps Pin
Fernando A. Gomez F.5-Sep-06 5:05
Fernando A. Gomez F.5-Sep-06 5:05 
QuestionProfiling in VS6.0 and VS.Net 2K5 Pin
cpp_prgmer4-Sep-06 4:45
cpp_prgmer4-Sep-06 4:45 
QuestionTWAIN sample Pin
majco3334-Sep-06 4:09
majco3334-Sep-06 4:09 
AnswerRe: TWAIN sample Pin
Hillmann-20234-Sep-06 4:32
Hillmann-20234-Sep-06 4:32 

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.