|
In Visual C++ 6.0, when I set Directory list in menu "Tools->Options...->Directories", the Directory list is used for every project. If I open new project, I must enter new Directory list. How can I set the Directory list for each project? I'm boring to set new Directory list every time I open new project.
|
|
|
|
|
Hi,
use your project-settings.
For include files: project-settings -> C/C++ -> Preprocessor : "Additional include directories"
For Lib files: project-settings -> Link -> Input : "Additional library path"
HTH
Regards
Frank
|
|
|
|
|
I want to control 'richedit sting color'.
Fisrt step,,,,
I used CRicheditCtrl member,,,,
I accessed directly RTF-formated string.
and,select string,and set RTF-formated string.
because of selecting string,the program affect scroll bar and cursor.
ofcourse,I can used CRichEditCtrl::SetSel.But For a moment, the selection range flickers.
Second Step,,,
I used ITextRange member,,,,
But A program needs to convert "CString(char*)-index" to "CRichEditCtrl(GetSel)-index", in order to use a member.
How do I convert "CRichEditCtrl::GetSel index" to "CString(char*) index"?
or
How do I convert "CString(char*) index" to "CRichEditCtrl::GetSel index"?
Please help me.
|
|
|
|
|
table = "account"<br />
<br />
---------------------<br />
ID Pass <br />
---------------------<br />
"user1" "abc"<br />
"user2" "xyz"<br />
"user3" "y3z"<br />
<br />
<br />
.......<br />
DDX_Control(pDX, IDC_EDIT1, m_ID);<br />
......<br />
<br />
void login::OnOk() <br />
{<br />
CString strID;<br />
m_ID.GetWindowText(strID);<br />
m_pSet->m_strFilter = "ID = " + strID; <br />
AfxMessageBox(m_pSet->m_Pass);<br />
}
when I typed "user2" or "user3" into edit control (IDC_EDIT1) , these code always show Messagebox with "abc" :eek (
how can I do to achieve correct password "xyz" when typed "user2" ?
thanks
|
|
|
|
|
That filter would probably work if you enclose strID in single quotation marks (apostrophes).
// Might not compile as is (see CString operator +)
m_pSet->m_strFilter = "ID = '" + strID + "'";
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
thank......... but
I also tried this way, I still get wrong result
help me , please
|
|
|
|
|
I program with ADO (that's how a filter would work in ADO), but in ODBC you cannot set a filter after the database is opened. (At least this is what MSDN says )
"After you construct the recordset object, but before you call its Open member function, use this data member to store a CString containing an SQL WHERE clause."
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
How do i disable and enable toolbar buttons within code
|
|
|
|
|
Use the UPDATE_COMMAND_UI for needed buttons.
void CMainFrame::OnUpdate....(CCmdUI* pCmdUI)
{
pCmdUI->Enable(FALSE);
}
Best regards,
Eugene Pustovoyt
|
|
|
|
|
how would that get called? ive never used cmdui and my program is dialog based
|
|
|
|
|
I have a program that resizes all my controls including the status bar but it doesnt resize the panes inside is there a way to do this?
|
|
|
|
|
Hi,
see the following code
<br />
m_wndStatusBar.GetPaneInfo(1, ID, Style, width);<br />
Style = SBPS_NORMAL;<br />
width = 500;<br />
m_wndStatusBar.SetPaneInfo(1, 0, Style, width);<br />
In this example you get the style and width of the second pane, change the attributes and set the new attributes.
If you use the index, you don't need the ID.
Regards
Frank
|
|
|
|
|
yeah i treid that it actualy cuases the program to crash
|
|
|
|
|
crash? .. ok
now we need some more information:
- which function crashes and possible at which position internally
- the exception message
- if possible the error code (e.g. DWORD GetLastError() ), maybe use a try-catch(...)-block.
Regards
|
|
|
|
|
I'm trying to work with the mciSendString, but it's new to me. I've not seen it mentioned in any of the books I have. What's it used for?
Tanks!!!!!
Dave
"The man who reads nothing is better educated than the man who reads nothing but newspapers."- Thomas Jefferson
|
|
|
|
|
Platform SDK: Windows Multimedia
MCI
The Media Control Interface (MCI) provides standard commands for playing multimedia devices and recording multimedia resource files. These commands are a generic interface to nearly every kind of multimedia device.
The mciSendString function sends a command string to an MCI device. The device that the command is sent to is specified in the command string.
Example in Platform SDK Doc:
DWORD PlayFromTo(LPSTR lpstrAlias, DWORD dwFrom, DWORD dwTo)
{
char achCommandBuff[128];
wsprintf(achCommandBuff, "play %s from %u to %u",
lpstrAlias, dwFrom, dwTo);
return mciSendString(achCommandBuff, NULL, 0, NULL);
}
BuggyMax
|
|
|
|
|
Thanks Max
"The man who reads nothing is better educated than the man who reads nothing but newspapers."- Thomas Jefferson
|
|
|
|
|
Hello Prof,
I read you project & injoy it.
I'm Searching V.C project about below topic,If you have one it Please as soon as possible send to me.
1.Design Virus
2.Intrusion Detection System
3.desing User password Detector
4.Simple Firewall
5.Dictionary attack on password files
6.Design password detection in SSL
Thanks
|
|
|
|
|
Hello Prof,
I read you project & injoy it.
I'm Searching V.C project about below topic,If you have one it Please as soon as possible send to me.
1.Design Virus
2.Intrusion Detection System
3.desing User password Detector
4.Simple Firewall
5.Dictionary attack on password files
6.Design password detection in SSL
Thanks
|
|
|
|
|
|
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
Michael Dunn wrote:
Try this programming help site
John would be so proud
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
lol, you own
Don't try it, just do it!
|
|
|
|
|
|
DaveE9th wrote:
I'm trying to open a file from a console program. How do I do this?
Are you using the C libraries, STL, MFC or Win32? You need to be more specific in the question.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|