Click here to Skip to main content
15,915,319 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How can I select direct StringTable to load on to dialog interface Pin
dungpapai25-Feb-07 19:43
dungpapai25-Feb-07 19:43 
QuestionMFC 7 in studio 2005, #region possible? Pin
Greg Ellis25-Feb-07 11:30
Greg Ellis25-Feb-07 11:30 
AnswerRe: MFC 7 in studio 2005, #region possible? Pin
Mark Salsbery25-Feb-07 11:44
Mark Salsbery25-Feb-07 11:44 
GeneralRe: MFC 7 in studio 2005, #region possible? Pin
Greg Ellis25-Feb-07 11:56
Greg Ellis25-Feb-07 11:56 
AnswerRe: MFC 7 in studio 2005, #region possible? Pin
Andre xxxxxxx25-Feb-07 12:36
Andre xxxxxxx25-Feb-07 12:36 
GeneralRe: MFC 7 in studio 2005, #region possible? Pin
Mark Salsbery26-Feb-07 7:22
Mark Salsbery26-Feb-07 7:22 
Questionhow to find a file in one folder Pin
zhangguoliming25-Feb-07 10:18
zhangguoliming25-Feb-07 10:18 
AnswerRe: how to find a file in one folder Pin
bob1697225-Feb-07 17:37
bob1697225-Feb-07 17:37 
If I'm understanding your situation correctly, your dialog box has an edit control and a button to initiate a "file search". You created a member variable for the edit control in the dialog class. This member variable is of type CString?

If so, the string variable will not get updated until the data exchange routines run. Instead, you want access to the edit control directly so create a variable for the edit of type CEdit. If your using VC++ 6.0, in the ClassWizard, for the dialog class, under the member variables tab, select your edit control, click "Add Variable...", for "Category:" choose "control" and then select CEdit for the "Variable Type:". This way you can do the following with your code snippet...

void CFilefindDlg::OnButton1()
{
// TODO: Add your control notification handler code here
HANDLE handle=NULL;
WIN32_FIND_DATA fd={0};
CString sFile="";

m_editName.GetWindowText(sFile);
handle = FindFirstFile(sFile, &fd);

if (handle != INVALID_HANDLE_VALUE) {
AfxMessageBox("Find this folder.");
} else {
AfxMessageBox("Could not find folder.");
}
}


AnswerRe: how to find a file in one folder Pin
Hamid_RT25-Feb-07 19:21
Hamid_RT25-Feb-07 19:21 
AnswerRe: how to find a file in one folder Pin
ThatsAlok25-Feb-07 19:50
ThatsAlok25-Feb-07 19:50 
Questionimage capturing using webcam Pin
mannur25-Feb-07 8:49
mannur25-Feb-07 8:49 
AnswerRe: image capturing using webcam Pin
Mark Salsbery25-Feb-07 10:13
Mark Salsbery25-Feb-07 10:13 
QuestionHow To Build Docked Windows in Visual C++ 2003 Pin
webHamlet25-Feb-07 8:15
webHamlet25-Feb-07 8:15 
QuestionDefines Pin
Makakuin25-Feb-07 6:58
Makakuin25-Feb-07 6:58 
AnswerRe: Defines Pin
toxcct25-Feb-07 7:04
toxcct25-Feb-07 7:04 
AnswerRe: Defines Pin
bob1697225-Feb-07 7:56
bob1697225-Feb-07 7:56 
AnswerRe: Defines [modified] Pin
Mark Salsbery25-Feb-07 8:00
Mark Salsbery25-Feb-07 8:00 
AnswerRe: Defines Pin
Mark Salsbery25-Feb-07 8:11
Mark Salsbery25-Feb-07 8:11 
QuestionMAP file in visual studio 2005 Pin
eli1502197925-Feb-07 5:16
eli1502197925-Feb-07 5:16 
AnswerRe: MAP file in visual studio 2005 Pin
Michael Dunn25-Feb-07 6:36
sitebuilderMichael Dunn25-Feb-07 6:36 
AnswerRe: MAP file in visual studio 2005 Pin
Mark Salsbery25-Feb-07 6:38
Mark Salsbery25-Feb-07 6:38 
QuestionI need BIG help! Pin
reyyy25-Feb-07 4:57
reyyy25-Feb-07 4:57 
AnswerRe: I need BIG help! Pin
Waldermort25-Feb-07 5:08
Waldermort25-Feb-07 5:08 
GeneralRe: I need BIG help! Pin
reyyy25-Feb-07 5:14
reyyy25-Feb-07 5:14 
AnswerRe: I need BIG help! Pin
bob1697225-Feb-07 7:40
bob1697225-Feb-07 7:40 

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.