|
I'm now writing a program using MFC. I plan to incorporate a file deletion feature into the program. Thank you for your help.
|
|
|
|
|
Use Win32 API function: BOOL DeleteFile(LPCTSTR lpFileName)
|
|
|
|
|
I use this function:
int RecycleBin (LPCSTR File)
{ // sends the specified file to the recycle bin.
// returns zero on success, non-zero otherwise.
char buffer[MAX_PATH];
::ZeroMemory (buffer, MAX_PATH);
strcpy (buffer, File);
SHFILEOPSTRUCT fos;
::ZeroMemory (&fos, sizeof (SHFILEOPSTRUCT));
fos.wFunc = FO_DELETE;
fos.pFrom = buffer;
fos.fFlags = FOF_NOCONFIRMATION | FOF_NOERRORUI | FOF_SILENT | FOF_ALLOWUNDO;
return SHFileOperation (&fos);
}
|
|
|
|
|
Pretty cool, I like this function a lot better than ::DeleteFile(..)
I think it sucks if an application I wrote just deletes a (any) file, without leaving the user the ability to un-delete it. Although I'd understand you use DeleteFile if your application only write a temporary file (e.g. a spoolfile or whatever) to the 'Temp'-folder. No need to recycle that one.
--
Alex Marbus
|
|
|
|
|
|
How can i access data in an Excel file using VBScript?
In ASP, I can do it using
set conn = Server.CreateObject("ADODB.Connection")
conn.open "FileDSN=xyz.dsn"
but i am using the VBScript code in an Interworld (Web tool) component which is not recognising the Server object of ASP.
Ananda
|
|
|
|
|
I am very new @ VC++. I am interested in writting my own keypad plugin for winamp. Could someone be kind enough to share some sample codes to give me a head start please...
|
|
|
|
|
Have you downloaded the General Plugin SDK from Winamp? Well, it's not an SDK, just a sample plugin, but that's a good place to start. Winamp's site also has links to discussion boards for developers.
--Mike--
http://home.inreach.com/mdunn/
Time is an illusion; lunchtime doubly so.
|
|
|
|
|
Hi,
I am thinking about a freeware application, that should be able to display and manipulate images. I've looked at the more famous libraries, such as ImageGear. Until I noticed QuickTime was free to use. Does anybody know a link with some sample-code how to use this? Or where I can download the SDK? (Didn't found it @ apple). Thanks!
--
Alex Marbus
|
|
|
|
|
I got lot of trouble using the PDF ActiveX in my application
I'm looking for programmers that have already use this control in a Visual C++ program (like Turbo Browser 2000). The control doesn't refresh itself and I can't find a solution.
Please help me...
Davy
|
|
|
|
|
I have been trying to figure out how to write a Win32 Telnet Client that supports ANSI. The problem I keep running into is hte lack of documentation on ANSI Escape sequences, Windows Socket programming, and related. I desperately wish to know how to make the base code so that I can expand my current designs and incorperate all that I want into it. Thanks!
|
|
|
|
|
Hi,
Did you check out Randy More's "NT Telnet server and client"? on this site?
Also, doing a search at the homepage brings up another project, I believe from the same author.
HTH!
Scott!
|
|
|
|
|
Anybody interested to code a control container (ATL) wih me? Any precise article/code would be good help too.
A
|
|
|
|
|
I've just started writing one - I was going to develop support for hosting ActiveX controls *only* V1 wasn't going to support windowless nor quick activation? why are you developing a control container?
|
|
|
|
|
Does any one know how to change some controls (ex. How the button look, or the progress bar ).
After a long search the best I found is GUIgui from nopcode.com
but the problem is there using a Lib to do that and the skins are in a separate file(s)
that you have to add with your App Plus it’s all managed from an INI file .
they have some samples but there full projects that you have to trace to find what you need.
I only need to change three controls ( buttons, progress bar, Dialog frame(background) ).
I think one way of doing it is to create a non-rectangular shape of the control and fill it with a bitmap , but this may only work for buttons.
You can download GUIgui from http://www.nopcode.com/guigui/index.shtml
In any way you can PLEASE help nass121@yahoo.com
|
|
|
|
|
Does any one know how to change some controls (ex. How the button look, or the progress bar
Yep, it's called owner-drawing. There are several examples of owner-drawn buttons here (check out the dropdown-menu buttons especially) at CP. Progress bars are pretty simple controls to draw (frame + progress meter). You can paint a custom background in a dialog in the WM_ERASEBKGND message - again I'm sure there are examples here at CP in the Dialogs section.
--Mike--
http://home.inreach.com/mdunn/
Is history an illusion caused by the passage of time, or is time an illusion caused by the passage of history?
|
|
|
|
|
Anyone know a good report writer tool with graphic editor and source code
for VC++??
Tanks
DL
|
|
|
|
|
Need sourse cod of subj. Help me plz.
|
|
|
|
|
I was given an assignment to make a discussion forum for a website. I have no idea what programming language is involved and if there are other considerations on the server side that should be taken care of.
The forum should allow new users to register and their particulars will go to a database. Registered users can post questions or answer questions. Asked questions are to be shown in a list (The list only shows the subject of the questions) and anyone can view this list. If one should wish to answer any question, the answers will be sent directly to the email account of the person with this particular query.
A list of registered users should also be presented and their status (online or offline)indicated.
Can anyone please help me? Thanks a million!
|
|
|
|
|
Does anybody have classes which Wrap up the DB2 Call Level Interface.
I am trying to get started at programming with DB2 as my back-end database - but I cannot find anything on DB2.
Plenty on Access and SQL Server - but nothing on DB2.
Any help would be greatly appreciated
Btw - please remove the _NO_SPAM_ from my email address to reply
Thanks
Brian
|
|
|
|
|
I have worked with the DB2 CLI in version 5.1 and 6.0. At least through 6.0, the DB2 CLI was modeled after the ODBC API's. I actually used the ODBC API as reference for the DB2 CLI.
I do not have a "class" wrapper for it though. I do, however, have a code/header file which I use in 3 enterpirise applications. This code exposes a set of functions to implement db2 access in a GUI application. It is intended for applications which require only a single connection (there is some code to support multiple threads, but it is minimal) and it has code built-in for connection management (ie. lost connection, auto reastiblish, auto-timeout). Also, it has an SQL logging feature to log the SQL executed by the module.
It has worked very well for the applications I use it for.
If you would like the code, email me at gullettm@yahoo.com and I will reply with the code attached.
NOTE: There will probably be a couple of changes you will have to make to it because there are a couple of client-specific functions in it.
|
|
|
|
|
how to change font in menu of window at runtime?
can anybody help me?
|
|
|
|
|
One word: Ownerdraw
In a nutshell, you cannot set a magic "font" property (unless maybe VB supports that sort of craziyness) you will need to set the MF_OWNERDRAW flag for each menu item that you want customized & then handle the resulting WM_MEASUREITEM and WM_DRAWITEM messages to actually draw the menu item yourself.
Before a menu is displayed windows sends WM_MEASUREITEM to the parent window to get the minimum dimensions for each item with the MF_OWNERDRAW flag set.
After querying for the size, windows will send a WM_DRAWITEM message (again, for each ownerdraw menu item) that you can use to draw the menu item with any one of your favorite GDI calls.
One little note, you may want to keep a map (or collection of some sort) to keep track of the menu item text, it tends to get forgotten when you mark a menu item as ownerdraw.
There are also some samples here on code project that you should check out to help you along.
Happy coding
|
|
|
|
|
is there any one who can help me out in building a control similar to the control menu in the VC++ IDE.
Uday BHaskar
Software Engineer.
|
|
|
|
|
Hi uday,
It's apparent that the control hosts other ActiveX controls and just displays their icons in it's UI. So we gotta use AxWindow.
Whadyya think?
|
|
|
|