Click here to Skip to main content
16,008,183 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: DateTimePicker in Win32API Pin
Michael Dunn9-May-01 19:38
sitebuilderMichael Dunn9-May-01 19:38 
Generalappearance of the scroll bar in a List View control Pin
QEugene9-May-01 19:13
QEugene9-May-01 19:13 
GeneralBitmap in ListView control Pin
QEugene9-May-01 19:12
QEugene9-May-01 19:12 
GeneralRe: Bitmap in ListView control Pin
Tomasz Sowinski10-May-01 1:12
Tomasz Sowinski10-May-01 1:12 
QuestionHow to totally hide main frame window of SDI MFC application? Pin
Do Quyet Tien9-May-01 18:23
Do Quyet Tien9-May-01 18:23 
AnswerRe: How to totally hide main frame window of SDI MFC application? Pin
markkuk9-May-01 23:49
markkuk9-May-01 23:49 
GeneralCFileDialog with OFN_ALLOWMULTISELECT Pin
9-May-01 16:44
suss9-May-01 16:44 
GeneralRe: Try this. Pin
Masaaki Onishi9-May-01 17:39
Masaaki Onishi9-May-01 17:39 
Hello, the codegurus around the world.;)

Try this.Cool | :cool:
char szFN[256];
memset (szFN, 0, sizeof(szFN));

CFileDialog dlg (TRUE);

dlg.m_ofn.lpstrFilter = "Text Files (*.txt)\0*.txt;*.lst\0All Files (*.*)\0*.*\0";
dlg.m_ofn.lpstrTitle = _T("Open Text Files");
dlg.m_ofn.lpstrFile = szFN;
dlg.m_ofn.nMaxFile = sizeof(szFN);
dlg.m_ofn.Flags = OFN_OVERWRITEPROMPT | OFN_ALLOWMULTISELECT | OFN_ENABLEHOOK;

if (dlg.DoModal() == IDOK) {
}


//From Dlgfile.cpp from MFC source code;
// Daaa. Since I use Debug version, I need OFN_ENALBEHOOK?
int CFileDialog::DoModal()
{
	ASSERT_VALID(this);
        // Ooops, do we need OFN_ENALBEHOOK flags?
	ASSERT(m_ofn.Flags & OFN_ENABLEHOOK);
	ASSERT(m_ofn.lpfnHook != NULL); // can still be a user hook

	// zero out the file buffer for consistent parsing later
	ASSERT(AfxIsValidAddress(m_ofn.lpstrFile, m_ofn.nMaxFile));
	DWORD nOffset = lstrlen(m_ofn.lpstrFile)+1;
	ASSERT(nOffset <= m_ofn.nMaxFile);
	memset(m_ofn.lpstrFile+nOffset, 0, (m_ofn.nMaxFile-nOffset)*sizeof(TCHAR));
..............
}


Have a nice day!
-Masaaki Onishi-
GeneralRe: &#65306;&#65289;Thanks. Pin
9-May-01 19:10
suss9-May-01 19:10 
Generalcapturing DOS console txt... Pin
9-May-01 15:18
suss9-May-01 15:18 
GeneralRelease DLL Crash Pin
9-May-01 14:23
suss9-May-01 14:23 
GeneralDesigning a GUI in DOS Pin
Fabian Glace9-May-01 12:33
Fabian Glace9-May-01 12:33 
GeneralAvoiding Deadlocks Pin
Chris Meech9-May-01 10:31
Chris Meech9-May-01 10:31 
GeneralRe: Hummm... (^|^) Pin
Masaaki Onishi9-May-01 14:54
Masaaki Onishi9-May-01 14:54 
GeneralLinking Multiple Dialog Boxes Pin
9-May-01 10:03
suss9-May-01 10:03 
GeneralRe: So, PropertySheet exists. Pin
Masaaki Onishi9-May-01 10:16
Masaaki Onishi9-May-01 10:16 
GeneralRe: Linking Multiple Dialog Boxes Pin
Christian Graus9-May-01 12:35
protectorChristian Graus9-May-01 12:35 
QuestionGraph and Grid Control Tools? Pin
Keith Ramey9-May-01 6:10
Keith Ramey9-May-01 6:10 
AnswerRe: Graph and Grid Control Tools? Pin
George Chastain9-May-01 7:06
George Chastain9-May-01 7:06 
GeneralWTL LoadBitmap in client area Pin
9-May-01 5:15
suss9-May-01 5:15 
GeneralRe: WTL LoadBitmap in client area Pin
Christian Graus9-May-01 12:37
protectorChristian Graus9-May-01 12:37 
GeneralRe: WTL LoadBitmap in client area Pin
10-May-01 8:00
suss10-May-01 8:00 
Questionhow to detect end of line, end of file and CR? Pin
hearties9-May-01 4:52
hearties9-May-01 4:52 
AnswerRe: how to detect end of line, end of file and CR? Pin
l a u r e n9-May-01 7:01
l a u r e n9-May-01 7:01 
AnswerRe: how to detect end of line, end of file and CR? Pin
Stuart van Weele9-May-01 9:35
Stuart van Weele9-May-01 9:35 

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.