|
Hi All
is there anyway to stop the Open File - Security Warning from not appearing
when someone first uses my application ?
You can get round this after by remove the tick, in the check box
but i would rather it not appear at all
Can anyone help
Simon
|
|
|
|
|
Which open file security warning?
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
|
Hi Experts,
How can I rename a file thorugh any API.
|
|
|
|
|
You can use of SHFileOperation or rename .
|
|
|
|
|
I used the code below but it does not rename the source file even it creates another file (spacifies in To).
SHFILEOPSTRUCT sfo; <br />
ZeroMemory ( &sfo, sizeof (SHFILEOPSTRUCT)); <br />
sfo.wFunc = FO_RENAME ;<br />
sfo.pFrom = _T("g:\zz.txt\0");<br />
sfo.pTo = _T("g:\pp1.txt\0");<br />
SHFileOperation(&sfo);
|
|
|
|
|
hmmm...
maybe remove the "\0" ?
|
|
|
|
|
pther wrote: sfo.pFrom = _T("g:\zz.txt\0");
sfo.pTo = _T("g:\pp1.txt\0");
Should be:
sfo.pFrom = _T("g:\\zz.txt");
sfo.pTo = _T("g:\\pp1.txt");
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
i have a
CSocket SomeSocket; variable declared globally in a "one.h" file.I have inlcuded this one.h in one.cpp as
#include "one.h"
I used this SomeSocket in another two.h files where i have included the file
#include "one.h"
now i get a linker error stating
two.obj : error LNK2005: "CSocket SomeSocket" (?xst@@3UGlobals@@A)
already defined in one.obj
what was the mistake.
-- modified at 6:54 Friday 30th November, 2007
Adi Vishayam
|
|
|
|
|
You need to put include guards in your header file:
#ifndef YOURFILE<br />
#define YOURFILE<br />
<br />
<br />
#endif
(replace YOURFILE by something unique, like the file name).
You could also use #pragma once for microsoft compiler.
|
|
|
|
|
Cedric Moonen wrote: You could also use #pragma once for microsoft compiler
#pragama once is already added.
problem remains the same.
Adi Vishayam
|
|
|
|
|
you have to declare it extern inside your include file (i.e. "one.h" )
extern CSocket SomeSocket;
and then define once inside a single source file (e.g. in your "one.cpp" ).
CSocket SomeSocket;
The mistake is in your include file: as it stands CSocket SomeSocket is defined in multiple source files.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
CPallini has given you the correct answer.
But I see this mistake a lot with novice programmers.
The linker is complaining because (as it says) you have two instances of SomeSocket.
Before the compiler attacks you "one.c" file, a preprocessor attacks it, and processes the includes.
An easy exercise for you: remove the #include from one.c, and cut and paste the whole of one.h into the top of one.c.
Do this for two.c. Now have a lightbulb moment as you realise what the linker is telling you.
Iain.
|
|
|
|
|
Hello to all,
I have designed one modeless dialog box which will get invoked after clicking one button and will get destroyed after some time automatically, now i have inserted a progress bar on this dialog box and i want that untill and unless this dialog box is existing it should show the progress bar with process of progress, now the problem is that progress bar is getting displayed on dialog box but it is not showing the process of progress. how to do it? can we insert progress bar on modeless dialog box? can any body help me plz?
Thanks and Regards,
Anay
|
|
|
|
|
Insert a Timer function in which the bar gets updated. 100ms is a nice value.:->
Greetings from Germany
|
|
|
|
|
AFAIK yes, it is possible, but how accurate it is... depends on code.
Can you show some related lines?
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
AnayKulkarni wrote: progress bar is getting displayed on dialog box but it is not showing the process of progress
You can create a function in the modeless dialog's class that updates the progress bar's state. Call that function at various points in your process.
Judy
|
|
|
|
|
AnayKulkarni wrote: ...but it is not showing the process of progress.
Do you have code in place to do the updating?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
hi all,
Can anybody help me in converting EXIF format to 24 bit BMP format?,
I got the following details When i checked about the format of the jpg file
1. JPEG FOrmat : EXIF
2. EXIF version : 0220
3. Encoding used : Baseline
kkr
|
|
|
|
|
Will this[^] helpful ?
Regards,
Paresh.
|
|
|
|
|
If you don't want to do the JPEG decompression yourself, you could use
GDI+.
For example, using the shared Visual C++ class CImage (which uses GDI+ for loading/saving)...
CImage img;
img.Load(_T("C:\\Path\\MyEXIFfile.jpg"));
img.Save(_T("C:\\Path\\MyEXIFfile.bmp"), ImageFormatBMP);
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi,
Im trying to loop through a string to get all layout of words in a forward manner and then search for patterns elsewhere.
I first created this:
spacePos.push_back(0);
for(int j = 0; j<input.length()+1; j++)
="" {
="" if="" (input[j]="=" char(32)="" ||="" j="=" input.length()){
="" spacepos.push_back(j);
="" }
="" }
basically="" pushes="" integers="" onto="" a="" vector="" of="" ints,="" with="" the="" start="" and="" end="" position,="" also="" where="" any="" spaces="" are.
then="" i="" try="" ot="" loop="" as="" so:
="" for(vector<int="">::iterator ii = spacePos.begin(); ii!=spacePos.end(); ii++)
{
for(vector<int>::iterator ii2 = spacePos.begin(); ii2!=spacePos.end(); ii2++)
{
if (*ii2 == 0 || *ii >= *ii2) continue;
if (input.substr(*ii, *ii2) != "")
{
//other code
}
}
}
so if the input line was "hello i am" it would 'hopefuly' do this>
"hello"
"hello i"
"hello i am"
"i"
"i am"
etc
but the problem is, i'm counting the spaces in the first for loop and storing them and after the first iterator of the for loop for ii, it's going out of sync and the longer the string the more this affect occurs:
"hello"
"hello i"
"hello i am"
" i"
" i am"
i tried trimming but it just causes so many problems with long strings so i really want to sort this out in the first for loop where i obtain all the space positions.
Does anyone have any ideas? or maybe even a better way to do what i want?
Cheers
|
|
|
|
|
The first thing to verify is that spacePos contains exactly what you think it should. If it doesn't, then the other two for() loops are irrelevant.
admgamer wrote: if (*ii2 == 0 || *ii >= *ii2) continue;
if (input.substr(*ii, *ii2) != "")
{
//other code
}
What is this snippet of code supposed to do?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
i am using vc2005 and the code is compiled in unicode mode. How to disable it?
KIRAN PINJARLA
|
|
|
|