|
sollution that worked:DeleteUrlCacheEntry()
the other indeea didn't work for me but maby it works on other comps no hard feelings
but I still have a question:
is there an equivalent of DeleteUrlCacheEntry() for VBscript or a way to call this funcion from there maby?
if you know please answer, thank you in advance
|
|
|
|
|
making urldownloadtofile skip the caching
Hi,
I use urldownloadtofile function to get some data from the net(a file) and I need to read from this file all the time, every few seconds(because my program needs new instructions) but I can't use it more than once because then dumb windows caches that file and then I can't download it any more and I only get the same file because windows only downloads if it hasn't already cached it.
Is there any way to fix this problem? Thanks in advance
|
|
|
|
|
I've found plenty of examples for using Crystal Reports for .Net, but I just want to use it with regular MFC/C++. Does anyone know of any place that I can find some info on this? Using .Net, you can use the CrystalReportViewer control (which is great!). I'm hoping to find a way to use that control or a similar one from a non-managed MFC application. Any response is appreciated. Thanks!
If I write code in my sleep, does that make me brilliant, or just a lazy programmer?
My articles
www.stillwaterexpress.com
BlackDice - the programmer formerly known as bdiamond
|
|
|
|
|
I'm working on a trivial MFC SDI app that uses several dialogs, triggered by the menus or the view itself. I had one dialog functioning very well and then added another. Now I get the following error message when my app hits MyDlg.DoModal() :
Microsoft Visual C++ Debug Library:
Debug Error!
Program: E:\...
DAMAGE: after Normal block (#249) at 0x00326038.
(Press Retry to debug the application)
[Abort][Retry][Ignore]
The "normal block" number and memory address seem to reflect my memory usage, which makes some sense. For example, if I load several files into the program before attempting to open the dialog, the block number will jump about 1000 per file, as will the memory address.
I believe the only significant change was the addition of the second dialog. In my frustration, I've tried replacing the dialog class and copy/pasting the old code into the new class (with necissary changes). I still get the same error. The dialog is called from the app's view class; beyond that, I don't know what other info to provide.
I don't know what this error means or what caused it to appear. Thank you in advance for any help you can provide!
Help me! I have no idea what's happening! Please?
|
|
|
|
|
ps I'm a member, i really am! login was funky...
Help me! I have no idea what's happening! Please?
|
|
|
|
|
As far as I remember this message occurs if you overwrite the bounds of memory that you allocate.
I.E.
char *temp = new char [100];
for(l=0;l<200;l++)
char[l]='x';
will cause this message.
hope that helps.
|
|
|
|
|
I forgot to add...
delete [] temp;
/\
|
|----- this is when the error will be reported.
|
|
|
|
|
Very strange problem... Didn't find the cause, but I did find some ints in my data structures that were never initialized. After I initialize them, the dialog seems to work, so I'll go with it... Makes absolutely no sense...
Help me! I have no idea what's happening! Please?
|
|
|
|
|
Hi,
I am working on a small periodic table for my college friends. The idea of the application is that there will be a button for each element, placed in the same style as that of Modern periodic table. Now I have 2 options to implement this.
-> I must place more than 100 buttons on the Dialog and write event handler for each button.
-> or place buttons and write single event handler for all button.
What should I choose? Or suggest anything else I can implement.
Also, if I implement 2nd option, how I can detect which button is clicked
|
|
|
|
|
Check out ON_NOTIFY_RANGE() .
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
...Or check ON_COMMAND_RANGE, just make sure your buttons have subsequent IDs. Your handler will look like:
void MyApp::OnButton(UINT nID)
{
int nIdx = nID-IDC_BUTTON1;
// handle button by order index
}
Igor Green
http://www.grigsoft.com
Compare It! + Synchronize It! : Files and folders comparison never was easier!
|
|
|
|
|
Hi,
I'm having trouble displaying a picture by overriding OnPaint() method and putting the function SetDIBitsToDevice in there. Here's a bit of the code
<br />
void CProjectorFrame::ShowPattern()<br />
{<br />
m_bBlank = false;<br />
OnPaint();<br />
}<br />
void CProjectorFrame::OnPaint() <br />
{<br />
CPaintDC dc(this);
CRect rClient;<br />
GetClientRect(&rClient);<br />
<br />
if (m_bBlank)
{<br />
dc.SetBkColor(RGB(0, 0, 0));<br />
dc.ExtTextOut(0,0,ETO_OPAQUE, &rClient,0,0,0);<br />
return;<br />
}<br />
else<br />
{<br />
int val = ::SetDIBitsToDevice(<br />
dc,<br />
m_nXOffset, <br />
m_nYOffset,<br />
m_BitmapInfo.bmiHeader.biWidth, <br />
m_nImageHeight,<br />
0, <br />
0,<br />
0, <br />
m_nImageHeight,<br />
m_pImage, <br />
&m_BitmapInfo, <br />
DIB_RGB_COLORS );<br />
}<br />
}<br />
m_MyObject.ShowPattern();<br />
But the pattern doesn't display right after the call to ShowPattern(). I ran this through the debugger and everything seems to work fine. SetDIBitsToDevice actually returns that it set 768 lines, and all the code executes. I'm confused.
Thanks.
|
|
|
|
|
Budric B. wrote:
void CProjectorFrame::ShowPattern()
{
m_bBlank = false;
OnPaint();
}
Never call OnPaint() directly. OnPaint() will be called automatically by the framework when the UpdateWindow() or RedrawWindow() member functions are called. If you call it directly, many of the internal data structures might not be initialized correctly and can lead to all sorts of errors.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it!
|
|
|
|
|
Any knows, how to write this tool for windows.
What DLLs should I use?
What Methods etc
I want to do this thing in some range of IP
|
|
|
|
|
What about WNetOpenEnum() and WNetEnumResource() ? Or NetShareEnum() ?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I wonder if anyone can point me to any literature regarding designing a command driven application like AutoCAD. I already have the GUI (drawing view, command bar, etc.) in place. I now need the command engine to run the GUI.
For example, if the user enters "LINE" at the command prompt, a new thread (I guess) should begin which looks for mouse clicks in the drawing view and keyboard events at the command prompt (for the line's end point coordinates). This thread should not return untill all the required input is gathered, in this case, the two end points of the line to be created. The user can specify the start point of the line by clicking in the drawing view and enter the coordinates of the end point at the command prompt. After this is done the thread returns control to the calling function which creates the line.
Any comments, suggestions, ideas that will help me achieve this will be greatly appreciated.
Thanks.
|
|
|
|
|
I would try looking at apps that use parsing, like the one written by toxcct (whose post you can see below).
If I write code in my sleep, does that make me brilliant, or just a lazy programmer?
My articles
www.stillwaterexpress.com
BlackDice - the programmer formerly known as bdiamond
|
|
|
|
|
Could find the article. Can you send me a link?
/Deelip
|
|
|
|
|
no need for threading ...
a simple workflow ( or state machine ) to direct the user at what to do.
when a user start a new command, the system wait for an input; if the input is good, then, the system advance to the next event, ... so on and so forth.
for example, for a line command ... ( very pseudo-code )
-Start Line Command <br />
-While ( first point not picked )<br />
wait for user to click or type a valid point.<br />
-if first point is valid<br />
-While ( second point not picked )<br />
wait for user to click or type a valid point.<br />
-if second point valid<br />
Create line with both points.<br />
-End Line Command
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
hi everybody,
how can i, in a dialog dox application, change the default button ?
i've tried to change the styles (SetStyle() or something like that) of the buttons, but it only changes the STYLE, and not the effective function of DEFAULT BUTTON.
any ideas guys ?
thx a lot
TOXCCT >>> GEII power
|
|
|
|
|
From MSDN:
An application sends a DM_SETDEFID message to change the identifier of the default push button for a dialog box.
DM_SETDEFID
wParam = idControl; // identifier of new default push button
onwards and upwards...
|
|
|
|
|
It's already a method of the CDialog class: CDialog::SetDefID()
this->SetDefID(IDC_BUTTON1); works just fine.
If I write code in my sleep, does that make me brilliant, or just a lazy programmer?
My articles
www.stillwaterexpress.com
BlackDice - the programmer formerly known as bdiamond
|
|
|
|
|
Default button? Check the button properties.
<italic>Work hard and a bit of luck is the key to success. You don`t need to be genius, to be rich.
|
|
|
|
|
no, if you did have a look at what i said previously, i've already done this, and, it doesn't change nothing else but the style of the buttons, not the effective default action...
TOXCCT >>> GEII power
|
|
|
|
|
Oh you did. Try not to use any style on that button. This might be a bug.
<italic>Work hard and a bit of luck is the key to success. You don`t need to be genius, to be rich.
|
|
|
|