Click here to Skip to main content
15,887,027 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: 16 bit RGB bmp to 8 bit grayscale bmp Pin
Mark Salsbery11-Oct-07 5:34
Mark Salsbery11-Oct-07 5:34 
GeneralRe: 16 bit RGB bmp to 8 bit grayscale bmp Pin
Deepu Antony11-Oct-07 8:35
Deepu Antony11-Oct-07 8:35 
GeneralRe: 16 bit RGB bmp to 8 bit grayscale bmp Pin
Mark Salsbery11-Oct-07 8:43
Mark Salsbery11-Oct-07 8:43 
Questionchar buffers Pin
Programm3r9-Oct-07 23:14
Programm3r9-Oct-07 23:14 
AnswerRe: char buffers Pin
Cedric Moonen9-Oct-07 23:17
Cedric Moonen9-Oct-07 23:17 
GeneralRe: char buffers Pin
Programm3r9-Oct-07 23:30
Programm3r9-Oct-07 23:30 
QuestionRe: char buffers Pin
David Crow10-Oct-07 3:02
David Crow10-Oct-07 3:02 
Question[SOLVED] Enabling a button after previous button click. Pin
CodingLover9-Oct-07 23:14
CodingLover9-Oct-07 23:14 
Hi all,

In my MFC application I've create two buttons, OPEN and CLOSE, used to open a text file and close it. I do it as follows.

<br />
void CSRFToolDlg::OnBnClickedOpen()<br />
{<br />
	char* ReadFileName = "G:\\Work On\\CPP\\SRFTool\\text_file.txt" ; <br />
<br />
	if(openFile.Open(ReadFileName, CFile::modeCreate | CFile::modeReadWrite))<br />
	{<br />
		AfxMessageBox("File creates successfully", MB_OK) ;<br />
	}<br />
	else<br />
	{<br />
		AfxMessageBox("Error in file opening", MB_OK) ;<br />
	}<br />
}<br />
<br />
<br />
void CSRFToolDlg::OnBnClickedClose()<br />
{<br />
	openFile.Close() ;<br />
}<br />


What I want to do is, until user click the Open button the Close button should be disable. How should I do it. Those stuff really new for me.

ThanksSmile | :)



-- modified at 6:08 Thursday 11th October, 2007

I appreciate your help all the time...

AnswerRe: Enabling a button after previous button click. Pin
Nelek9-Oct-07 23:19
protectorNelek9-Oct-07 23:19 
GeneralRe: Enabling a button after previous button click. Pin
CodingLover9-Oct-07 23:25
CodingLover9-Oct-07 23:25 
GeneralRe: Enabling a button after previous button click. Pin
Lakshmi_p9-Oct-07 23:39
Lakshmi_p9-Oct-07 23:39 
GeneralRe: Enabling a button after previous button click. Pin
CodingLover9-Oct-07 23:53
CodingLover9-Oct-07 23:53 
GeneralRe: Enabling a button after previous button click. Pin
chandu00410-Oct-07 0:46
chandu00410-Oct-07 0:46 
GeneralRe: Enabling a button after previous button click. Pin
CodingLover10-Oct-07 0:50
CodingLover10-Oct-07 0:50 
GeneralRe: Enabling a button after previous button click. Pin
chandu00410-Oct-07 2:48
chandu00410-Oct-07 2:48 
GeneralRe: Enabling a button after previous button click. Pin
CodingLover10-Oct-07 19:04
CodingLover10-Oct-07 19:04 
GeneralRe: Enabling a button after previous button click. Pin
Nelek10-Oct-07 0:47
protectorNelek10-Oct-07 0:47 
GeneralRe: Enabling a button after previous button click. Pin
CodingLover10-Oct-07 0:56
CodingLover10-Oct-07 0:56 
GeneralRe: Enabling a button after previous button click. Pin
Nelek10-Oct-07 1:07
protectorNelek10-Oct-07 1:07 
GeneralRe: Enabling a button after previous button click. Pin
CodingLover10-Oct-07 1:10
CodingLover10-Oct-07 1:10 
AnswerRe: Enabling a button after previous button click. Pin
Hamid_RT9-Oct-07 23:38
Hamid_RT9-Oct-07 23:38 
QuestionFlickering Pin
saisp9-Oct-07 22:58
saisp9-Oct-07 22:58 
AnswerRe: Flickering Pin
chandu00410-Oct-07 0:29
chandu00410-Oct-07 0:29 
QuestionNon-rectangular client area Pin
Nishad S9-Oct-07 22:53
Nishad S9-Oct-07 22:53 
AnswerRe: Non-rectangular client area Pin
Nelek9-Oct-07 23:14
protectorNelek9-Oct-07 23:14 

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.