|
do you know what the _T() macro does ?
it simply prepends a L in front of the string (because you're supposed to pass it a literal string, not an integer) if UNICODE is defined, and does nothing otherwise.
|
|
|
|
|
toxcct wrote: it simply prepends a L in front of the string (because you're supposed to pass it a literal string, not an integer).
Oh no. Prepends nothing in his case.
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.
|
|
|
|
|
OMG, i forgot to finish my sentence ! lol. fixed now
|
|
|
|
|
You're trying to do a pretty weird thing.
Since your application is not set as a UNICODE build, the macro _T expands to nothing and you'll get s1 = (2193) ;
and this shouldn't ever compile.
BTW UNICODE value for down arrow is 0x2193 , i.e. 8595.
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.
|
|
|
|
|
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.
|
|
|
|