Click here to Skip to main content
15,901,426 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow can I get the Alpha Mask within a bitmap file? Pin
danginkgo9-Jul-08 22:46
danginkgo9-Jul-08 22:46 
AnswerRe: How can I get the Alpha Mask within a bitmap file? Pin
Iain Clarke, Warrior Programmer9-Jul-08 23:47
Iain Clarke, Warrior Programmer9-Jul-08 23:47 
GeneralRe: How can I get the Alpha Mask within a bitmap file? Pin
danginkgo10-Jul-08 1:12
danginkgo10-Jul-08 1:12 
QuestionHow to make the ::GetOpenFileName openfile Dialog to be a modal dialog? Pin
fantasy12159-Jul-08 20:15
fantasy12159-Jul-08 20:15 
AnswerRe: How to make the ::GetOpenFileName openfile Dialog to be a modal dialog? [modified] Pin
Rajesh R Subramanian9-Jul-08 20:37
professionalRajesh R Subramanian9-Jul-08 20:37 
AnswerRe: How to make the ::GetOpenFileName openfile Dialog to be a modal dialog? Pin
SandipG 9-Jul-08 20:40
SandipG 9-Jul-08 20:40 
GeneralRe: How to make the ::GetOpenFileName openfile Dialog to be a modal dialog? Pin
fantasy12159-Jul-08 20:53
fantasy12159-Jul-08 20:53 
GeneralRe: How to make the ::GetOpenFileName openfile Dialog to be a modal dialog? Pin
SandipG 9-Jul-08 20:57
SandipG 9-Jul-08 20:57 
i tried this and it works fine for me.

void CTrialMFCDlg::OnOK() 
{
	// TODO: Add extra validation here
	OPENFILENAME ofn;       // common dialog box structure
	char szFile[260];       // buffer for file name
	HWND hwnd;              // owner window
	HANDLE hf;              // file handle

	// Initialize OPENFILENAME
	ZeroMemory(&ofn, sizeof(ofn));
	ofn.lStructSize = sizeof(ofn);
	ofn.hwndOwner = this->GetSafeHwnd();
	ofn.lpstrFile = szFile;
	// Set lpstrFile[0] to '\0' so that GetOpenFileName does not 
	// use the contents of szFile to initialize itself.
	ofn.lpstrFile[0] = '\0';
	ofn.nMaxFile = sizeof(szFile);
	ofn.lpstrFilter = "All\0*.*\0Text\0*.TXT\0";
	ofn.nFilterIndex = 1;
	ofn.lpstrFileTitle = NULL;
	ofn.nMaxFileTitle = 0;
	ofn.lpstrInitialDir = NULL;
	ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST;

	// Display the Open dialog box. 

	if (GetOpenFileName(&ofn)==TRUE) 
		MessageBox("Open");	
	else 
		MessageBox("Cancel");

}


Regards,
Sandip.

QuestionRe: How to make the ::GetOpenFileName openfile Dialog to be a modal dialog? Pin
fantasy12159-Jul-08 20:43
fantasy12159-Jul-08 20:43 
AnswerRe: How to make the ::GetOpenFileName openfile Dialog to be a modal dialog? Pin
Rajesh R Subramanian9-Jul-08 20:57
professionalRajesh R Subramanian9-Jul-08 20:57 
QuestionRe: How to make the ::GetOpenFileName openfile Dialog to be a modal dialog? Pin
fantasy12159-Jul-08 21:17
fantasy12159-Jul-08 21:17 
QuestionSendMessage Hangs Pin
SelvaKr9-Jul-08 20:06
SelvaKr9-Jul-08 20:06 
AnswerRe: SendMessage Hangs Pin
Cedric Moonen9-Jul-08 20:23
Cedric Moonen9-Jul-08 20:23 
GeneralRe: SendMessage Hangs Pin
SelvaKr9-Jul-08 20:32
SelvaKr9-Jul-08 20:32 
GeneralRe: SendMessage Hangs Pin
Cedric Moonen9-Jul-08 20:49
Cedric Moonen9-Jul-08 20:49 
GeneralRe: SendMessage Hangs Pin
SelvaKr9-Jul-08 20:57
SelvaKr9-Jul-08 20:57 
GeneralRe: SendMessage Hangs Pin
Cedric Moonen9-Jul-08 21:10
Cedric Moonen9-Jul-08 21:10 
GeneralRe: SendMessage Hangs Pin
SelvaKr9-Jul-08 21:37
SelvaKr9-Jul-08 21:37 
GeneralRe: SendMessage Hangs Pin
krmed10-Jul-08 1:58
krmed10-Jul-08 1:58 
QuestionWorking of Enter key on List Ctrl. Pin
Le@rner9-Jul-08 19:17
Le@rner9-Jul-08 19:17 
AnswerRe: Working of Enter key on List Ctrl. Pin
fantasy12159-Jul-08 22:43
fantasy12159-Jul-08 22:43 
GeneralRe: Working of Enter key on List Ctrl. Pin
Le@rner9-Jul-08 23:03
Le@rner9-Jul-08 23:03 
GeneralRe: Working of Enter key on List Ctrl. Pin
Le@rner10-Jul-08 18:12
Le@rner10-Jul-08 18:12 
GeneralRe: Working of Enter key on List Ctrl. Pin
fantasy121525-Jul-08 15:08
fantasy121525-Jul-08 15:08 
GeneralRe: Working of Enter key on List Ctrl. Pin
Le@rner25-Jul-08 21:58
Le@rner25-Jul-08 21:58 

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.