|
I find that when I drag the thumbtrack to the extereme left, I step into the SB_THUMBPOSITION: case, not SB_LEFT. So what action do i have to take to make the SB_LEFT triggger?
After that I hope to figure out what makes SB_PAGELEFT trigger.
Thanks,
ns
case SB_THUMBPOSITION:
{
m_nScrollPos = nPos;
bRecalc = TRUE;
break;
}
case SB_LEFT:
{
m_nScrollPos = minpos;
bRecalc = TRUE;
break;
}
|
|
|
|
|
help me, how to delete or rewrite with network share file, full control shared but not for everyone, it shared for only poweruser or administrator.
how to open one dialog to login with poweruser or administrator to delete and rewrite it.
thanks
(VC++ or C# language)
Nho'c Ti`
|
|
|
|
|
Check out MSDN network API.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnanchor/html/ntwrkprot.asp
Kuphryn
|
|
|
|
|
Hi
I create in my application an memory device context and draw grid into one.In next step i copy (and simulatenly decrease dimention) this context on another device context(display) use StretchBlt function,before it i set HALFTONE in SetStretchBltMode.And all was fine.But when i try to do it in Win98 my grid draw badly(if i set thickness of line which i draw my grid, not enought big my grid dissappear completle).I think what SetStretchBltMode function was fail.
Anybody suggest me decision of this trouble.
Sorry for bad eanglish.
Thanks.
|
|
|
|
|
Are only some of your grid lines disappearing? if so:
StretchBlt works by removing columns and rows of pixels. It may be that some of the rows that StretchBlt removes are the rows (or columns) that contain your grid lines.
You could verify this by changing the destination DC dimensions in your StretchBlt call and see if different rows/columns end up disappearing.
|
|
|
|
|
Hallo all ,i am preparing for graduated project and this project is to take the voice from a mic and encrypt it then save it to a .wav file and then play it after decrypte the .wav file what i finished from the project takeing the voice and save it to a .wav file and play it agine and what i want now to encrypte the incoming voice and decrypte it , i have a document that describe the A5/3 algorith and more detials including a code but i can not understand it ,Please any one help me and if any one want the documents i will send it quicly.
PLEASE HELP ME.
engahmadm@yahoo.com
|
|
|
|
|
|
Can anyone show mw how to write text to desktop, something like ative calendar.
Thank in advance.
|
|
|
|
|
use transparent windows for example!
Don't try it, just do it!
|
|
|
|
|
thank, i already did it, but how can i make it always on bottom?
|
|
|
|
|
An alternative is use GetDc(GetDsktopWindow())->DrawText("skjjkajsa",x,y,whatever the params....)
|
|
|
|
|
hi,
i has just done like this
void CTestDlg::OnOK()
{
// TODO: Add extra validation here
CWnd *wnd = this->GetDesktopWindow();
CRect rect;
rect.top=300;
rect.left=300;
rect.bottom=rect.top+200;
rect.right=rect.left+200;
CDC *pDC = wnd->GetDC();
pDC->SetTextColor(RGB(255,255,255));
pDC->DrawText("test",rect,DT_CENTER);
// CDialog::OnOK();
}
but nothing happend.
|
|
|
|
|
I recently take care of an application. It is used for testing some hardware with the communication port.The original maintainer developed it with Win98 and VC++6.0.Then , I become the new maintainer with Win2K and VC++.NET. Basically , the application is well performed , but only one button has some trouble. Whenever I click it , there is a message window pop out.And it says "there is an unhandled exception 0xC0000005 of xxx.exe at 0x77f8910e happened . Reading address of 0x80000039 is error".Meanwhile , the frame stack stop at "NTDLL.DLL!77f8910e()".....Who , the kind people , could help me.
|
|
|
|
|
Where can I find an equivalent of HTMLEncode in Visual C++?
Something that would replace " by " etc... in a CString?
If there is nothing standard, I would be grateful if somebody would share his/her code.
Thanks in advance!
|
|
|
|
|
decode quoted is available in the following site. download the entire source code. the function decodequoted is in the source.
http://sourceforge.net/projects/yahoopops/
Have A Nice Day!
Murali.M
|
|
|
|
|
|
My program has 4 threads .
And when it runs a few minutes ,error happens.
It prompted "buffer overrun detected! A buffer overrun has been detected which has corrupted the programs's interal state.The program cannot saftly continue execution and must now be terminated."
I use vc.net to compile it.The program base on SDI,CHtmlview.
when I use vc.6.0 compile ,the error isn't happen.
I don't know the difference about vc6.0 and vc.net.
Who can tell me what operation maybe cause this error happen?
Thanks !
|
|
|
|
|
The error may well happen on vc6.0, but the runtime is not geared up to detect it (which explains many of the security exploits that MS issue patches for).
You probably have a stack based variable (typically an array) that you're overwriting beyond the boundaries (char[] are favourites for this, many of the string functions don't/can't length-check)
Steve S
|
|
|
|
|
Buffer overrun problems happen when data is written past a variables' alloted space. For example:
char str[10];
strcpy(str, "This is a very, very long line"); The compiler will not detect this, although some third-party debuggers will.
A number of recent exploits to Windows has been because of bugs like this.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
|
Hello everybody out there,
I have a dialog window application which sets current user environment variables with RegSetValueEx. The values are parsed when the user pressed the OK Button.
After the parsing a new program is launched with CreateProcess.
Everything works fine as the variables are set and the new launched program starts, but as soon as I want to check if it can read the env variables by clicking a funktion of the program, which would mainly read out the variables and create a path out of them, I have an critical error message from windows.
I guess that I have a pointer or process still adressing something that new program needs, but as I am new to this I don't have clue where to look.
Here is more or less the code I am using:
void CSetEnvDialogDlg::OnOK()
{
CString evJOBValue, evSHOTValue;// contain the values from the dialog the user has set
int index;
DWORD res;
DWORD dwRet;
// Open registry key where current user environmental variables are stored!
if (res ==
SetVariable("JOB",
(char*) evJOBValue.GetBuffer(3),
strlen(evJOBValue),
REG_EXPAND_SZ))
evJOBValue.ReleaseBuffer(-1);
if (res ==
SetVariable("SHOT",
(char*) evSHOTValue.GetBuffer(3),
strlen(evSHOTValue),
REG_EXPAND_SZ))
evSHOTValue.ReleaseBuffer(-1);
// propagate changes so that environment variables takes immediate effect!
if( SendMessageTimeout(HWND_BROADCAST,
WM_SETTINGCHANGE,
0,
(LPARAM) "Environment",
SMTO_ABORTIFHUNG,
10000,
&dwRet) ){
AfxMessageBox("Registry has been updated sucessfully!", MB_OK);}
else AfxMessageBox("Registry didn't update sucessfully!", MB_OK);
PROCESS_INFORMATION ProcessInfo;
STARTUPINFO StartupInfo;
ZeroMemory(&StartupInfo, sizeof(StartupInfo));
StartupInfo.cb = sizeof StartupInfo;
if(CreateProcess("Path to the exe file",
NULL,
NULL,
NULL,
FALSE,
0,
NULL,
NULL,
&StartupInfo,
&ProcessInfo))
{
CloseHandle(ProcessInfo.hThread);
CloseHandle(ProcessInfo.hProcess);
}
else
{
AfxMessageBox("The process could not be started...", MB_OK);
}
CDialog::OnOK();
}
DWORD CSetEnvDialogDlg::SetVariable(char *name, char *value, DWORD valuelen, DWORD type)
{
HKEY h;
DWORD rc;
rc = RegOpenKeyEx(HKEY_CURRENT_USER, "Environment", 0, KEY_WRITE, &h);
if (rc == ERROR_SUCCESS)
rc = RegSetValueEx(h, name, 0, type, (unsigned char*) value, valuelen);
RegCloseKey(HKEY_CURRENT_USER);
return rc;
}
Xzaran
|
|
|
|
|
Have you single-stepped through each of the statements to see which one is causing the error? While I doubt it is related to the problem, you might want to consider changing strlen(evJOBValue) to evJOBValue.GetLength() . Also, if you changed the second parameter of SetVariable() to a LPCSTR , you could eliminate the (char *) cast, and the call to CString::GetBuffer() and CString::ReleaseBuffer() . When checking the return value from SetVariable() , are you intentionally using the comparison operator instead of the assignment operator?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Hello David,
the problem is, that the error message occures with the child process, which is bought product I can't debug. Actually, now that I looked at the code project page again it is the same error message ymmace explained in his thread: Look for help!! About NTDLL.DLL problem~~. That's why I thought I might have missed something in my code. Maybe I have to free some memory I allocated with the pointers?
Unfortunately my knowledge about pointers is not so good.
But thanks for the advice about simplifying my code...I will try that.
Any more suggestions about the NTDLL.DLL problem?
Cheers, Xzaran
|
|
|
|
|
Xzaran wrote:
Maybe I have to free some memory I allocated with the pointers?
Since you showed no heap allocations, it would be hard to tell at this point.
If you run this other application all by itself, does the problem still occur?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
No, it runs perfect if its not called from my dialog application.
Where do I have to look to find the possible problem?
Xzaran
|
|
|
|
|