Click here to Skip to main content
16,009,068 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Hain don't call my application virus Pin
David Crow12-Jul-04 6:04
David Crow12-Jul-04 6:04 
GeneralRe: Hain don't call my application virus Pin
ThatsAlok12-Jul-04 20:05
ThatsAlok12-Jul-04 20:05 
GeneralAbout customizing LoadKeyboardLayout - regarding Pin
Sukumaran K.11-Jul-04 19:24
Sukumaran K.11-Jul-04 19:24 
Generalproblm with float value Pin
Zeeshan Bilal11-Jul-04 19:19
Zeeshan Bilal11-Jul-04 19:19 
GeneralRe: problm with float value Pin
Cedric Moonen11-Jul-04 20:47
Cedric Moonen11-Jul-04 20:47 
Generalthanx Pin
Zeeshan Bilal11-Jul-04 20:55
Zeeshan Bilal11-Jul-04 20:55 
Generaldynamic common controls Pin
Puah11-Jul-04 18:51
Puah11-Jul-04 18:51 
GeneralRe: dynamic common controls Pin
Antti Keskinen11-Jul-04 19:16
Antti Keskinen11-Jul-04 19:16 
All Windows controls can be considered normal Windows, with special properties. Following this logic, creating pushbuttons is just like creating new windows.

For MFC, use
:CButton* pNewButton = new CButton();
pNewButton->Create("My Caption", WS_CHILD | WS_VISIBLE, CRect(0,0,30,30), this, WM_USER + 1);
This code fragment would create a new pushbutton as a child of the CWnd/CDialog class it is being called from, such as when CDialog::OnInitDialog is executed.

For Win32, the procedure is similar, but you'll just use HWND (window handle) and CreateWindow. To create a button, specify "BUTTON" as the class name in CreateWindow. Otherwise the parameters are similar to the MFC version.

See MSDN for more information.

-Antti Keskinen

----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
GeneralRe: dynamic common controls Pin
Puah11-Jul-04 20:35
Puah11-Jul-04 20:35 
GeneralRe: dynamic common controls Pin
Antti Keskinen11-Jul-04 20:56
Antti Keskinen11-Jul-04 20:56 
GeneralNot really sure how to ask this! Pin
otrcomm11-Jul-04 18:41
otrcomm11-Jul-04 18:41 
GeneralRe: Not really sure how to ask this! Pin
V.11-Jul-04 20:41
professionalV.11-Jul-04 20:41 
GeneralRe: Not really sure how to ask this! Pin
otrcomm11-Jul-04 21:31
otrcomm11-Jul-04 21:31 
GeneralRe: Not really sure how to ask this! Pin
V.11-Jul-04 21:48
professionalV.11-Jul-04 21:48 
QuestionHow does this happen? Pin
the_augy11-Jul-04 18:36
the_augy11-Jul-04 18:36 
AnswerRe: How does this happen? Pin
Antti Keskinen11-Jul-04 19:27
Antti Keskinen11-Jul-04 19:27 
GeneralRe: How does this happen? Pin
the_augy11-Jul-04 20:04
the_augy11-Jul-04 20:04 
AnswerRe: How does this happen? Pin
V.11-Jul-04 20:44
professionalV.11-Jul-04 20:44 
Generalhelp! Pin
sunmozhou11-Jul-04 16:28
sunmozhou11-Jul-04 16:28 
GeneralRe: help! Pin
Ryan Binns11-Jul-04 17:53
Ryan Binns11-Jul-04 17:53 
GeneralRe: help! Pin
ThatsAlok11-Jul-04 22:32
ThatsAlok11-Jul-04 22:32 
QuestionString = File || Directory? Pin
Timothy Grabrian11-Jul-04 16:05
professionalTimothy Grabrian11-Jul-04 16:05 
AnswerRe: String = File || Directory? Pin
valikac11-Jul-04 17:15
valikac11-Jul-04 17:15 
AnswerRe: String = File || Directory? Pin
Michael Dunn11-Jul-04 19:56
sitebuilderMichael Dunn11-Jul-04 19:56 
AnswerRe: String = File || Directory? Pin
Anonymous11-Jul-04 23:42
Anonymous11-Jul-04 23:42 

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.