|
yes but are no results because sTextDatabase this string are from my program .
and i rewrite my code and he look like this :
void CNcontabile::OnChangedb()
{
CWaitCursor wait; // Display a wait cursor
m_Db.GetWindowText(sTextDatabase);
sTextDatabase.TrimLeft();
sTextDatabase.TrimRight();
CDatabase_1BunView1 *pBun = new CDatabase_1BunView1;
pBun-> m_strFilter = "um ='" + sTextDatabase + "'";
pBun->Open();
pBun->GetRecordCount();
pBun->MoveFirst();
while(!pBun->IsEOF())
{
if(pBun->m_strFilter == sTextDatabase)
{
m_denDb.SetWindowText("GGGGGGG");
}
}
pBun->Close();
delete pBun;
}
he tell me sql column ( what i insert in the string) is not found !
please help me!
-- modified at 6:45 Tuesday 17th October, 2006
Bravoone
|
|
|
|
|
Bravoone_2006 wrote: ...but are no results because sTextDatabase this string are from my program .
And that matters how? Just use a string literal (equal to whatever sTextDatabase would otherwise contain at runtime) in the DB console. Quite making this overly complicated.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
i dont understand can you give me an example or be more ...
Bravoone
|
|
|
|
|
Bravoone_2006 wrote: i dont understand...
What's not to understand? Do you know how to use a SQL statement in the DB console?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi all,
I need to open a file using Win 32(MFC API).. read each line from it, and after reading all the line i've to replace each char in the file with a random number.. after that i've to delete that file....
It's very urgent..i'll be very grateful if anyone provide the solution....
bye
kamalesh
|
|
|
|
|
Since the net result is to delete the file, why bother with the character replacement? In any case, just use DeleteFile() .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Because the OP is wanting to overwrite the data and thus prevent the file from being undeleted later. IIRC, there was a tool in the 'Norton Tools' set that did just this.
They've obviously never seen a computer forensics expert recover data from a hard drive by tweaking the controller board's currents
Steve S
Developer for hire
|
|
|
|
|
kamalesh82 wrote: I need to open a file using Win 32(MFC API
Is opening the file in WIN32 a problem to you. You can use simple FILE * to read/write to the file.
kamalesh82 wrote: read each line from it
Use fgets, fgetc etc as per your preference.
kamalesh82 wrote: after reading all the line i've to replace each char in the file with a random number
Why so? You can read a line and change the character values simultaneously.For this you can create a temporary file in your applications directory and keep on writing that random data in the temp file. When you are done with the reading of the file you can first delete the original file and then rename the temp file.
kamalesh82 wrote: after that i've to delete that file....
BOOL DeleteFile(
LPCTSTR lpFileName
);
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Are you trying to write your own PGP Wipe?
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
How are you going to guarantee that the system writes the random bytes over the original bytes on
the disk??
|
|
|
|
|
i just want "secure deletion"... if i just delete , the data used in the file is very much recoverable, untill the same space of the hard disc is overwritten( as the space is holding the data)... that's y i need to change every char in the file by a random generated numbers
kamalesh
|
|
|
|
|
Right I understand but using regular file APIs you have no gaurantee that your random data will
be written back to the disk at the same spot. The "old" data could (and most likely WILL) be able
to still be seen on the hard drive for an indefinite amount of time. To really pull this off I'm
pretty sure you need to work with the disk at a lower level than file APIs.
Mark
|
|
|
|
|
|
Hi again,
Simple question: will the function ExitWindowsEx() restart Windows Server 2003, Windows 2000 Server without user actions.
i.e.
<code>
ExitWindowsEx(EWX_REBOOT,NULL);
</code>
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
It depend on how applications running on it respond to WM_QUERYENDSESSION and WM_ENDSESSION messages.
You can forcible restart by combining EWX_FORCE or EWX_FORCEIFHUNG as first parameter.
|
|
|
|
|
Thanx again Prasad.
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
i've created a software tht is used for video conferencing in side a lan network by using the corresponding ip address. it has been created in visual c++.and converted to .exe file.
now i have to implement the same videochat concept in an internet explorer window.. wat can i do for that... some saying that i can use a active x controls if so say me the procedure pls... i'm new to vc++.
jegadesh balan
isakuratechnologies
chennai
mobile:9940304533
|
|
|
|
|
This[^] section with this[^] article should help.
Elaine
|
|
|
|
|
Hi,
I am working on clipboard in VC++ 2003. I want to copy a GDI Bitmap Class image to clipboard. Does anyone know how can I do this?
Thanks in advance,
Priyank
|
|
|
|
|
priyank_ldce wrote: I am working on clipboard in VC++ 2003. I want to copy a GDI Bitmap Class image to clipboard. Does anyone know how can I do this?
Take a look at CF_BITMAP in MSDN for more information.
Owner drawn
Jesus Loves
|
|
|
|
|
|
Hi all,
I would like to know if someone could give me some advise about monitoring a computers memory i.e. if the computer runs out of resources I want to restart the computer, (but only if the memory resource are insuffient).
Would it be a good idea to use the function QueryMemoryResourceNotification() , or is there another function I not aware of.
Thanx in advance
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
Nevermind got what I was looking for: GlobalMemoryStatus() ....
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
A activex control was created that gets called through a php page with ms word 2003 embeded in a dialog box, in the activex control.
a tool bar is also created in the derivation of MyDialog::OnInitDialog() with some buttons in the dialog box like this:
if (!m_ToolBar.Create(this, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_TOOLTIPS | CBRS_FLYBY) || !m_ToolBar.LoadToolBar(IDR_MAINFRAME))
{
TRACE0("Failed to create toolbar\n");
return -1; // fail to create
}
// Move the toolbar so it is VISIBLE on the screen.
CRect rc;
GetClientRect(&rc);
rc.bottom = rc.top + 34;
rc.bottom = rc.left + 30;
m_ToolBar.MoveWindow(&rc);
m_ToolBar.ShowWindow(SW_SHOW);
RepositionBars(AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST, 0);
EnableToolTips(true); //enable tool tips
//////////////////in its message map i'm calling OnToolTipNotify////////
BEGIN_MESSAGE_MAP(CDlgDocument, CDialog)
ON_NOTIFY_EX_RANGE(TTN_NEEDTEXTW, 0, 0xFFFF, OnToolTipNotify)
ON_NOTIFY_EX_RANGE(TTN_NEEDTEXTA, 0, 0xFFFF, OnToolTipNotify)
END_MESSAGE_MAP()
///////declaration of OnToolTipNotify in the 'void MyDialog:public CDialog'///
afx_msg BOOL OnToolTipNotify(UINT id, NMHDR *pNMHDR,LRESULT *pResult);
///////////and definitition of OnToolTipNotify is://////
BOOL CDlgDocument::OnToolTipNotify(UINT id, NMHDR *pNMHDR,LRESULT *pResult)
{
// need to handle both ANSI and UNICODE versions of the message
TOOLTIPTEXTA* pTTTA = (TOOLTIPTEXTA*)pNMHDR;
TOOLTIPTEXTW* pTTTW = (TOOLTIPTEXTW*)pNMHDR;
TCHAR szFullText[256];
CString strTipText;
UINT nID = pNMHDR->idFrom;
if (pNMHDR->code == TTN_NEEDTEXTA && (pTTTA->uFlags & TTF_IDISHWND) ||
pNMHDR->code == TTN_NEEDTEXTW && (pTTTW->uFlags & TTF_IDISHWND))
{
// idFrom is actually the HWND of the tool
nID = ::GetDlgCtrlID((HWND)nID);
}
if (nID != 0) // will be zero on a separator
{
// don't handle the message if no string resource found
if (AfxLoadString(nID, szFullText) == 0)
return FALSE;
// this is the command id, not the button index
AfxExtractSubString(strTipText, szFullText, 1, '\n');
}
#ifndef _UNICODE
if (pNMHDR->code == TTN_NEEDTEXTA)
lstrcpyn(pTTTA->szText, strTipText, _countof(pTTTA->szText));
else
_mbstowcsz(pTTTW->szText, strTipText, _countof(pTTTW->szText));
#else
if (pNMHDR->code == TTN_NEEDTEXTA)
_wcstombsz(pTTTA->szText, strTipText, _countof(pTTTA->szText));
else
lstrcpyn(pTTTW->szText, strTipText, _countof(pTTTW->szText));
#endif
*pResult = 0;
return TRUE; // message was handled
}
i've tried most of the ideas on the net but couldn't view the tool tip.
kindly help me out how tool tips can be displayed for the tool bar
buttons?
note: the activex control is executing in the internet explorer 6.0.
praveen k. sethiya
|
|
|
|
|
minkowski wrote: how I can get the default text highlighted in the text box
CEdit has SetSel() method. Use this method to select the text. To select the entire content in use SetSel as,
SetSel(0, -1)
Do your Duty and Don't expect the Result
|
|
|
|