|
Hadi:
Here you can find a sample how make that with ADO, but with DAO is the same.
Best Regards
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
Thanks Carlos,
That was useful example !
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
I like to write a program to delete some special folder. I try this code but it generate error : "Can not delete file: file system error (1026)".
SHFILEOPSTRUCT sh;
sh.hwnd = GetSafeHwnd();
sh.wFunc = FO_DELETE;
sh.pFrom = "c:\\windows\\temporary internet files\0";
sh.pTo = NULL;
sh.fFlags = FOF_NOCONFIRMATION | FOF_SILENT;
sh.hNameMappings = 0;
sh.lpszProgressTitle = NULL;
SHFileOperation (&sh);
please help me!
Thank you very much!
BUNG
|
|
|
|
|
I am not sure you can delete "c:\windows\temporary internet files"
It's a special system folder [that stores temp IE files]
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
Nish is a BIG fan of Goran Ivanisevic
|
|
|
|
|
I've just installed VC++6 on a new P4 system, and I'm having an isolated obscure problem that I'm trying to prove is a problem with my hardware and not with VC++. I get this problem running win2k, XP, and Me.
The problem is that I get a compiler warning C2124 'divide or mod by zero' on a legit line of code:
int main()
{
double a = 1.0; // ok
double b = 2.0f; // ok
double c = a / b; // ok
double d = 1.0 / b; // ok
double e = 1.0 * 2.0; // ok
double f = 1.0 / 2.0; // Error C2124: divide or mod by zero
return 0;
}
I get the same problem with floats, but not ints.
Has anyone seen anything like this, or know of ways of proving that this is a problem with the CPU or mb?
Any help is greatly appreciated!
thanks,
~mark
|
|
|
|
|
Well, it might make you happy to know that I got a divide-overflow error on a P-III-600/128MB
int main()
{
double f = 1.0 / 2.0;
}
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
Nish is a BIG fan of Goran Ivanisevic
|
|
|
|
|
Nish,
I just tried the code on my PIII 1.2gig 512mb and it worked fine. What version of the compiler and service pack did you try it on.
Michael
|
|
|
|
|
Turbo C++ 1.01
I use that to test out small console progs
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
Nish is a BIG fan of Goran Ivanisevic
|
|
|
|
|
works fine on my PIII 600/512MB using VC6 SP5...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Did anyone collided with a problem of break of a line not on words(Word-Wrap, DrawText-DT_WORDBREAK), but the same as in CEdit during input of a continuous line? I try to use this way in CStatic, but it does not work. If there are ideas, I shall be glad to discuss.
|
|
|
|
|
Hey, i want to change the background of a checkbox. Can somebody help me with that?
Thank you.
|
|
|
|
|
put the followin in OnCtlColor
if(nCtlColor==CTLCOLOR_STATIC )
{
pDC->SetBkColor(RGB(255,0,0));
}
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
Nish is a BIG fan of Goran Ivanisevic
|
|
|
|
|
Thanks, it works.... but it changes color only under the text... is there a way to change the backgorund color of the control as well because right now i have a small gray border around my checkbox.
|
|
|
|
|
hey, here's what i came up with for filling the backgorund.
i have the following in OnCtlColor
//**********
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
// TODO: Change any attributes of the DC here
if(nCtlColor==CTLCOLOR_STATIC )
{
CBrush br;
CRect rc;
hbr = CreateSolidBrush( RGB( 255, 255, 255 ) );
m_1_sub_folders.ScreenToClient(rc);
br.Attach(hbr);
pDC->SetBkColor( RGB(255,255,255));
pDC->FillRect(rc,&br);
br.Detach();
}
// TODO: Return a different brush if the default is not desired
return hbr;
//**********
it works, but is there some other way to do it?
Thank you.
|
|
|
|
|
Hey Guys
I have a shell extension DLL i have written and i get this error:-
RegSvr32: LoadLibrary(".\ReleaseMinDependency\RCAS.dll") failed.
GetLastError returns 0x0000001f.
when i compile and it trys to register the DLL has anyone got any ideas what this is. It used to work till i installed the new platform SDK. Unfortunately i need the new platform sdk for it to.
Cheers
Peter
|
|
|
|
|
Your DLL is compiling in ReleaseMinDependrncy mode. In the Buid menu select the build type to either Release or Debug.
|
|
|
|
|
I only have ReleaseMinSize and MinDependency options as well as unicode versions of the above no plain release option. Also the same error occurs for all the release ones. If i compile in debug mode though i get this error
Linking...
Creating library Debug/Software to Sign and Verify Files.lib and object Debug/Software to Sign and Verify Files.exp
Software to Sign and Verify Files.exp : warning LNK4070: /OUT:RCAS.DLL directive in .EXP differs from output filename "Debug/Software to Sign and Verify Files.dll"; ignoring directive
CertificateSelection.obj : error LNK2001: unresolved external symbol _CryptUIDlgViewContext@24
Debug/Software to Sign and Verify Files.dll : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
if this helps to solve the problem at all.
Cheers
Peter
|
|
|
|
|
I fixed the last error with the debugi just hadn't included a libary in the link properties. So the dbug version now compiles but i still get the.
Performing registration
RegSvr32: LoadLibrary(".\Debug\Software to Sign and Verify Files.dll") failed.
GetLastError returns 0x0000001f.
error
Peter
|
|
|
|
|
Another thing is that this code will compile and register with no problems under XP its only on other O/S's it has problems registering under.
|
|
|
|
|
Okay i found out why it wouldn't register. It was because i have a feature in the program that is not supported under 9x platforms. But i have this under a function that detects the OS version before it runs it so how can i get it in the program and still get it to register under the 9x OS's.
Cheers
Peter
|
|
|
|
|
I have a question that it can only display the tip which length is less than 64 on the icon which I use
Shell_NotifyIcon to add into the tray.How to diaplay the tip which length is more than 64 in vc.
|
|
|
|
|
The NOTIFYICONDATA struct's szTip member is declared as char szTip[64];
So you can't do much with the NOTIFYICONDATA
But in the handler for WM_MOUSEMOVE in the Application-defined message handler, you can try and show a bigger tooltip using CToolTipCtrl
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
Nish is a BIG fan of Goran Ivanisevic
|
|
|
|
|
I try to send a WM_CLOSE message to KaZa application. But it just minimize the app. Hm... it's something with that they have done so it doesn't close the app before user clicks on the menu item ( that closes the app ).
Unuseful words those last.... but is there a way to close/terminate an app with some other code??
My code looks like this:
HWND wnd = ::FindWindow(classname, NULL);
if( wnd != NULL )
{
::SendMessage(wnd, WM_CLOSE, NULL, NULL);
}
------------------------------
©0d3 ©®4©k3® - That's me!
------------------------------
|
|
|
|
|
They have probably overridden WM_CLOSE and got it to do something else [like minimizing for instance]
I am not at all sure about this, but try out WM_QUIT and WM_DESTROY
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
Nish is a BIG fan of Goran Ivanisevic
|
|
|
|
|
Hello, the codegurus around the world.;)
We can check how the message will be dealt with on the target window
by SPY++.
When you send WM_CLOSE message to the target window,
you can check how this WM_CLOSE will be dealt with on the process
of the message with WPARM and LPARAM.
Please, don't send me your email about your questions directly.
Have a nice day!
Sonork - 100.10571:vcdeveloper
-Masaaki Onishi-
|
|
|
|