|
Hello all,
can somenone explain to me the mean of
preprocessor directive: #pragma pack( pop, packing ) ?
Moreover can you tell me what the header pshpack1.h helps for?
thanx a lot
|
|
|
|
|
Did you see here?
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
it pops packing directives off the stak until it finds one that matches the value of 'packing'. the MSDN's page on 'pragma pack' might help.
|
|
|
|
|
|
Hello,
I'm working to define a toolbar. I would like to modify the handle.
I have drawn a picture, put it inside the toolbar as handle but I could manage the picture as a handle. I Used a CStatic and then loaded a Bitmap into it.
Does somebody know how to get the picture ID to after allocate it as handle ?
titi
titi
|
|
|
|
|
I surprised myself, just coded the whole project in an ANSI environment, switched to unicode and only found 3 errors. Anyway, I have a _tprintf() call, which is returning -1. GetLastError() is not being set either, so I haven't a clue why it's not working.
TCHAR tmp[5];
if (i < 10)
_tprintf(tmp,_T("_00%d"),i);
else if (i < 100)
_tprintf(tmp,_T("_0%d"),i);
else
_tprintf(tmp,_T("_%d"),i);
_tcscat(newNames[i],tmp);
It works fine in an ANSI build.
|
|
|
|
|
First of all, have you tried doing this instead:
_tprintf(tmp, _T("_%03d"), i);
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
yes,
TCHAR tmp[10];
memset(tmp,0,10);
if (i < 10)
_tprintf(tmp,_T("_%03d"),i);
Adding the memset has stopped it from returning -1, now returns 0. I have also tried removing all formating, but with no effect.
wprintf(tmp,L"Hello");
It just doesn't want to work
|
|
|
|
|
My bad, I was using the wrong function
_stprintf(tmp,_T("_00%i"),i);
|
|
|
|
|
Do'h! I should have caught that one, too. But you are still not using the formatting that the printf-family gives you. If you want 3 digit base-10 numbers with 0's prepended, use %03d.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Oh, I never realised that one before, thanks for the tip
|
|
|
|
|
StrCchPrintf[^]
"Alot of the people on this forum are incredibly stupid, thinking that the internet is real" Score: 1.0 in the Soap Box
led mike
|
|
|
|
|
hi
i want to delete files past a certain date
for example if the file is older than a certain number of days(nDays) remove it
im using the below, but it doesnt seem to be working
can anyone see whats wrong ??
thanks
Si
WIN32_FIND_DATA fd;
HANDLE hFind = ::FindFirstFile (_T (sPath+sExt), &fd);
CString name = fd.cFileName;
CTime tmCreate(fd.ftCreationTime);
CTime ctNow = CTime::GetCurrentTime();
if(tmCreate < (CTime::GetCurrentTime() - CTimeSpan(nDays,0,0,0)))
{
CString strFileName = sPath+"\\"+ (CString)fd.cFileName;
if(::DeleteFile(strFileName))
}
|
|
|
|
|
si_69 wrote: can anyone see whats wrong ??
Probably someone stepping through that in debug mode would be able to see whats wrong
"Alot of the people on this forum are incredibly stupid, thinking that the internet is real" Score: 1.0 in the Soap Box
led mike
|
|
|
|
|
si_69 wrote: im using the below, but it doesnt seem to be working
which part isn't working ?
|
|
|
|
|
Not sure if this applies in your case, but according to MSDN:
In rare cases, file attribute information on NTFS file systems may not be current at the time you call this function. To obtain the current NTFS file attributes, call GetFileInformationByHandle.
Karl - WK5M
PP-ASEL-IA (N43CS)
<kmedcalf@ev1.net>
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
Chris Losinger wrote: which part isn't working ?
the if statement.
the date of the file i wish to delete is 2/5/2005
which gives tmCreate {m_time=1157539835 }
and i want to delete files which are older than 11 days olds which gives me a time of {m_time=1156699696 }
so the if statement reads
if(tmCreate < (CTime::GetCurrentTime() - CTimeSpan(nDays,0,0,0)))
i.e {m_time=1157539835 } < {m_time=1156699696 }
but how can i file older have a m_time value higher than the time of 11 days ago perhaps thats where its going wrong
any ideas ?
|
|
|
|
|
si_69 wrote: the date of the file i wish to delete is 2/5/2005
which gives tmCreate {m_time=1157539835 }
No, it doesn't. It gives you: 1107590400
-----------------------------
Get trial copy of FeinViewer - an integrated GDI objects viewer for Microsoft Visual Studio .NET 2005 (8.0) Visual C++ Debugger, and other convenience and productivity tools for Microsoft Visual Studio .NET at at www.FeinSoftware.com
|
|
|
|
|
vladfein wrote: No, it doesn't. It gives you: 1107590400
yes it does !
|
|
|
|
|
When you run this code whats happening
|
|
|
|
|
ISO 9660 (Joliet) sector vise information vikasworks 2mins ago
Hi everyone,
I am trying to extract the files/folders information from the Data ISO (Joliet format) images. My motive is to read the information from the PVD (Primary Volume Descriptor), that resides at the begening of the 16th sector of the cd. After reading the information i want to display the files, folders contained in the ISO in terms of sectors.
For example : the data segment of a sector in (ISO)JOLIET format is 2048 bytes. if an ISO image contains following 5 files
A -> 500 byte
B -> 1000 byte
C -> 2000 byte
D -> 100 byte
E -> 400 byte
then in the explorer view the 17th sector(apx.) should display:
File Sector size SpreadFlag
A 17 500
B 17 1000
C 17 548(2000) yes
And sector explorer view for the next sector should display:
File Sector size SpreadFlag
C 18 1452(2000) yes
D 18 100
E 18 400
My query is that: is their any api available which can provide me the details of the ISO image CD in terms of sectors, path table, for the files contained in it or i have to do low level programming to fetch the list of contents available on the ISO image on the CD.
I will greatly appreciate any response provided by you.
thx.
-- modified at 10:07 Thursday 7th September, 2006
~vikas
-- modified at 10:08 Thursday 7th September, 2006
|
|
|
|
|
hi,
i am doing chatwindow project in vc++,I took two richeditcontrols one is for write the text and send the text messages and emotions also,Another richeditcontrol is to receive that textmessages and emotions,
I have the emotions dialog, in that emotions dialog tooltips are running on that emotions dialog only, i sent that emotions to another richeditcontrol,then the richeditcontrol received that emotions but it did not get any tooltip on that emotions ,my task is i should get that tooltips on second richeditcontrol also i tried so much but i didnt get,
please anyone help me,
thanks in advance.
maheshkanth
|
|
|
|
|
Hi everyone
Do anyone know some good book's
for Good Coding Practise in c++
If available Online thats best..
Thanks & regards
Vikas
Vikas Amin
EATON
PUNE
|
|
|
|
|
I enjoyed reading Code Complete by Steve McConnell, and Writing Solid Code by Steve Maguire.
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
DavidCrow wrote: enjoyed reading Code Complete by Steve McConnell
All developers should be familiar with this book or something comparable. But most developers are not.
Kevin
|
|
|
|