|
One way i use is to get a pointer to an Element,
usually the BODY element, but you can do the
trick with any other elements (DIVs,SPANs,Ps,etc).
Then use the put_InnerHTML method.
One bug/feature of this trick is that you can
load an HTML file from the disk/Resourse and then
replace the body with a dynamically generated HTML string.
The document will still have the Stylesteets,scripts,METAs
defined in the section and also the attributes
defined in the body.
ex.
- - - - - - - - - - - - - - - - - -
Memory leaks is the price we pay \0
01234567890123456789012345678901234
|
|
|
|
|
Dear all.
How to get the name of the recently added file to a Particular folder?
In my project i have to find the recently added file name for particular directory.
Presently i am watching the folder continuously and i am catching the event when ever the new file is entered to this folder( for this i am using Franky Braem Filemonitor control.. this is an exelent ATL control,please go through )
But i have to get the file name which is recently added to the folder.
advance thanks.
anju
|
|
|
|
|
Why not look at the time of last modification or time of creation, when you have to display the list of recently modified files.
But, if you have to display it realtime, watching the folder continuously seems to be the only option that you have ... If you need to display only the files that are modified during the lifetime of your application, then monitoring would be the best solution. It is not very expensive because the app is just waiting on an object...
Thomas
modified 29-Aug-18 21:01pm.
|
|
|
|
|
Thank u for sugesstion.
The problem is i have to intimate recently added file name to front end (it is in VB)by REAL Time.
Is there any API is available.Please ...it is very urgent for me
thank u once again
anju
|
|
|
|
|
The Win32 API functions to do this are
1. ReadDirectoryChangesW - not supported in 95/98/ME
2. FindFirstChangeNotification and
FindNextChangeNotification functions - works from 95 upwards
There is a C++ example in MSDN under the title
"Monitoring Changes in a Directory or Directory Tree". If you search this in MSDN for the exact string, ie using quotes on both sides, the example is the first result.
I am not very familiar with VB, so I do not know how you can use this info in VB. In C++, I would have a worker thread, that calls a callback function, with the changes as and when they occur.
Hope this helps
Thomas
modified 29-Aug-18 21:01pm.
|
|
|
|
|
I know it's possible to wrap my entire application in an exception handler so that when our code does something it's not supposed to do, I can pop up a dialog saying, "We're crashing, here's a log of the application state."
I've even cut and pasted an example from MSDN, and I'm in the midst of trying to find that again. Can someone point me in the right direction?
J
|
|
|
|
|
Try SEH exception to hook GPFs. There are a few articles on CP about this. Also search MSDN with SEH Exception to find more.
// Fazlul
Get RadVC today! Play RAD in VC++
http://www.capitolsoft.com
|
|
|
|
|
Bingo! Thanks a bunch. I knew it was around...
J
|
|
|
|
|
Check in MSDN for ::SetUnhandledExceptionFilter. It works on W95 > , NT3.5 >.
|
|
|
|
|
Yah, as it turns out, this is what I need. After reading a bunch on SEH, I feel enlightened, but for what I need, SetUnhandledExceptionFilter() is perfect.
Thank you.
J
|
|
|
|
|
Hi,
Has anyone written or come across code to display a thumbnail image in
a CListCtrl in report or list view (ie., not icon or small icon)? Basically
I would like to develop a CListCtrl that would display a small picture alongside every entry in the list.
Thanks in advance
Wayne.
|
|
|
|
|
|
Hi All,
I have a problem which is only manifesting itself in the 'Build for Release' version of my MFC app.
I have an app which creates a worker thread, the thread returns data to the document. As soon as the worker thread terminates however all the file operations on my menus become greyed out. Has anyone seen this before , any solutions?
Many Thanks,
Louis
|
|
|
|
|
I am sending out data on a TCP socket and there are times when the bandwidth available between the server and the client is not sufficient to deliver data at the rate the server wants to. Is there any standard way to handle this? The data is mostly realtime and the previous data is not significant to the user, so it is ok to drop earlier packets in favour of new packets. Any suggestions ??
Thomas
modified 29-Aug-18 21:01pm.
|
|
|
|
|
First, do not use TCP/IP (connection-oriented sockets) but UDP instead (datagram sockets). Then you can have a feedback TCP connection for the client to inform the server about how things are going (based on the numbering of the packets received) so that the server can adjust the speed with which it delivers the data.
There's a standard protocol that does precisely this sort of things. Its name is RTP (Real Time Protocol) and it's defined at Internet RFC 1889.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thank you for the input...
The only problem that made me use TCP in favour of UDP was packet ordering. The messages have to be in sequence, even if I miss a few. I guess the message sequence numbers can be used for the purpose and can ignore any out of sequence messages. I am going through the RFC now.
Thomas
modified 29-Aug-18 21:01pm.
|
|
|
|
|
Also do you know of any resources on the Internet or any books that looks at data compression from the point of view of a network application.
Thomas
modified 29-Aug-18 21:01pm.
|
|
|
|
|
Hi!
I am displaying a Dialog Box and I have removed the System Menu from the Properties of the Dialog BOx. Now the Problem is that there isnt any Icon at task Bar this application is running or minnimized. I want to put a specific icon at the taks bar but I dont know how to NEED HELP. Is there some way? If you cant help me with this maybe you know a way to remove the Close button and still have the Systemmenu property on the dialog. I would be so happy if anyone could hlp me
TANX
H
|
|
|
|
|
Removing the system menu shouldn't remove the caption. Have a look through your options in the dialog editor, and see if you've changed the dialog from popup to child, or something. It's a drop box on the left of one of the tabs.
To change the icon, just change the icon for the program, it's a resource. To do more you need to handle WM_NCPAINT.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
how do you draw "triangle with lines at right-bottom" of resizeable dialog (without status-bar)?
resizeability is not enought
i afraid to draw it own way to keep compatibility with possible skins or new system versions
t!
|
|
|
|
|
Try looking for resizable dialog classes on codeproject or codeguru and try comparing them to resizable 'skinned' projects. I created a skinnable dialog box that resizes so it is possible.
.NET or not .NET? MFC is the question......
|
|
|
|
|
It's part of a status bar. See CStatusBar in MSDN and also try building an MFC Appwizard SDI application. It has a status bar with a Gripper (as it's called) by default.
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
If you need the gripper without a status bar, you can create it; it's a style of the Scrollbar control. Never tried to use it this way myself though, or even seen it used, so can't tell you how it works.
If you just want to draw it, you can use DrawFrameControl() to do so:
<br />
::DrawFrameControl(hDC, &rect, DFC_SCROLL, DFCS_SCROLLSIZEGRIP);<br />
...You can use ::GetSystemMetrics(SM_CXVSCROLL); and ::GetSystemMetrics(SM_CYHSCROLL); to get the correct width and height.
farewell goodnight last one out turn out the lights Smashing Pumpkins, Tales of a Scorched Earth
|
|
|
|
|
I am developing an app that will read an XML file from a standard web server and use its contents as variables in a dialog based app. I will be using it to read member profiles. There will be a separate XML document for each member using the following XML tags.
<name>Joe Bloggs</location>
<age>24</age>
<location>England</location>
and these will be displayed in the dialog as:
Name: Joe Bloggs
Age: 24
Location: England
The field names are labels in the dialog and the variables are taken from the XML document.
The idea of this is to be able to update user profiles myself without having to re-distribute the app or use a HTML web page control.
Andy ideas would be gladly appreciated.
.NET or not .NET? MFC is the question......
|
|
|
|
|
Take a look at CPs XML/Soap-corner!
mfg HintiFlo
|
|
|
|