Click here to Skip to main content
15,900,110 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: sqaur root Pin
Iain Clarke, Warrior Programmer21-Oct-03 23:02
Iain Clarke, Warrior Programmer21-Oct-03 23:02 
GeneralRe: square root Pin
David Crow22-Oct-03 2:39
David Crow22-Oct-03 2:39 
GeneralRe: sqaur root Pin
QuiJohn22-Oct-03 2:47
QuiJohn22-Oct-03 2:47 
General256 colors icon getting modified without a reason Pin
DaFrawg21-Oct-03 21:15
DaFrawg21-Oct-03 21:15 
GeneralRe: 256 colors icon getting modified without a reason Pin
Johnny ²21-Oct-03 21:44
Johnny ²21-Oct-03 21:44 
GeneralRe: 256 colors icon getting modified without a reason Pin
Atif Mushtaq22-Oct-03 20:16
Atif Mushtaq22-Oct-03 20:16 
GeneralRe: 256 colors icon getting modified without a reason Pin
DaFrawg27-Oct-03 1:53
DaFrawg27-Oct-03 1:53 
GeneralRe: Cbutton Pin
DaFrawg21-Oct-03 20:58
DaFrawg21-Oct-03 20:58 
If you mean a number like IDC_RESETBUTTON, the solution is quite easy. Just take an unique number (e.g. 2001) and define your IDC_ thing as that number using the preprocessor (so no ending semicolon):
#define IDC_RESETBUTTON 2001

Then make sure you declared your CButton* resetButton in you dialog class (well, you declare it as a local member, but then it will be destroyed afterwards and the ID isn't valid anymore...) and call, if the pointer resetButton is valid, the Create member function:

resetButton->Create("Reset Data",0,bRect,parent,IDC_RESETBUTTON);

where "Reset Data" is the window (read: button) title, 0 the style (why not WS_VISIBLE?!), bRect the window (read: button) rect, parent a pointer to the parent window (but you could also creaete it into a button Poke tongue | ;-P ) and IDC_RESETBUTTON (the compiler will read '2001') the ID number.

This number can be used to get a pointer to the dialog item:

CButton* buttonPointer = (CButton*)YourDialogClassInstance.GetDlgItem(IDC_RESETBUTTON)

Could somebody confirm these things, please?
GeneralTool Bar Pin
Neelesh K J Jain21-Oct-03 20:29
Neelesh K J Jain21-Oct-03 20:29 
GeneralRe: Tool Bar Pin
twing21-Oct-03 22:56
twing21-Oct-03 22:56 
Generalpostfix to infix Pin
ranjjj21-Oct-03 18:54
ranjjj21-Oct-03 18:54 
GeneralRe: postfix to infix Pin
David Crow22-Oct-03 2:33
David Crow22-Oct-03 2:33 
GeneralHelp w/ IPicture please Pin
Anonymous21-Oct-03 18:34
Anonymous21-Oct-03 18:34 
Generalassembly help Pin
Sirrius21-Oct-03 18:28
Sirrius21-Oct-03 18:28 
GeneralRe: assembly help Pin
ZoogieZork22-Oct-03 1:53
ZoogieZork22-Oct-03 1:53 
Generalcharacter set conversion(UTF8 and UCS2) Pin
convert_sg21-Oct-03 17:03
convert_sg21-Oct-03 17:03 
GeneralRe: character set conversion(UTF8 and UCS2) Pin
Joe Woodbury21-Oct-03 17:58
professionalJoe Woodbury21-Oct-03 17:58 
GeneralRe: character set conversion(UTF8 and UCS2) Pin
convert_sg21-Oct-03 19:03
convert_sg21-Oct-03 19:03 
Questionhow can i reach the same result in vc++? Pin
Habbit21-Oct-03 16:31
Habbit21-Oct-03 16:31 
AnswerRe: how can i reach the same result in vc++? Pin
David Crow21-Oct-03 16:51
David Crow21-Oct-03 16:51 
Generalthanks Pin
Habbit21-Oct-03 16:55
Habbit21-Oct-03 16:55 
GeneralRe: how can i reach the same result in vc++? Pin
includeh1022-Oct-03 4:49
includeh1022-Oct-03 4:49 
GeneralRe: how can i reach the same result in vc++? Pin
David Crow22-Oct-03 5:10
David Crow22-Oct-03 5:10 
GeneralDisable Auto Bitmap Scroll in CScrollView Pin
Swinefeaster21-Oct-03 15:45
Swinefeaster21-Oct-03 15:45 
GeneralRe: Disable Auto Bitmap Scroll in CScrollView Pin
John R. Shaw22-Oct-03 3:53
John R. Shaw22-Oct-03 3:53 

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.