|
See Here[^] maybe it is some helpful to you
whitesky
|
|
|
|
|
how we can get GMT time without using Current time
|
|
|
|
|
|
|
this is my code not workin
CTime time;
time.GetGmtTm(NULL);
m_time.Format("%d:%d:%d",time.GetHour(),time.GetMinute(),time.GetSecond());
|
|
|
|
|
sree_as wrote: this is my code not workin
What means 'not working' ? Compile error, runtime error, the code does not behave as expected (and supply information), or some other crazy thing...
Please, when asking a question, remember that we cannot see what you see !
Did you even try to read the links we gave you ?
This will do nothing:
time.GetGmtTm(NULL);
because you don't store the result. And you also constructed an uninitialised CTime object so it doesn't contain a valid date. Did you read the link I posted ? It describes how to construct a CTime with the current date and time.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
actually my problem is i have one dialog on that one combo box contains contry list and one static text for digital time.
it's is working.
but when we open my window time and u convert to another contry automatically our time changing.
due this currentTime().because when we changed it to another all will going wrong,
please help
sree.
|
|
|
|
|
You still didn't explain what the problem was. 'All will going wrong' won't help me very much to give you a detailed solution.
Where are you stuck ? What is the problem you are having ?
Did you read both links that we gave you ? They should contain enough information for you to know what to do. If not, is there something you didn't understand ?
And also, when explaining your problem, get rid of everything that is not related to the problem. Focus on the problem only.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
Cedric Moonen wrote: And also, when explaining your problem, get rid of everything that is not related to the problem. Focus on the problem only.
You are really very pedagogic today
Two times for different people in a few minutes.
Thank you! You are one of those keeping this site at the top
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
|
Hi,
I am using ShellExecute for the first time. But, I am encountering the following error:
error C2065: 'ShellExecute' : undeclared identifier
I have included windows.h and shellapi.h ... shell32.lib is also there. Can somebody suggest me a way out of this problem.
Thanks,
|
|
|
|
|
In an MFC based application you don't need to include any specific files for ShellExecute.
What type of application are you using?
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
-- modified at 4:04 Wednesday 21st June, 2006
|
|
|
|
|
Perhaps you have included "shellapi.h" before "stdafx.h" . If so, move all of your #include directives after #include "stdafx.h" .
Hope it helps.
|
|
|
|
|
Thankyou! That was very helpful It worked.
--
Viorel. wrote: Perhaps you have included "shellapi.h" before "stdafx.h". If so, move all of your #include directives after #include "stdafx.h".
Hope it helps.
|
|
|
|
|
what application type?
whitesky
|
|
|
|
|
Noob mfc question:
What's the best way of creating forms like invoices and reports? Those reports have a strict layout.
What i got so far was printing pdf's or html. The problem with html is that though it's easyer to create..it's imposible to set page counts and so on.
Postscript would be a good ideea but i don't know how to display it in a MDI
|
|
|
|
|
I want to write a virtual cd-rom like Deamon tools(DAEMON'S HOME), but quite simple one. I just have a little basis on driver development.
What should i do if i want write such a virtual cd-rom? Could you please give me some advices or some links on internet, thanks!
Go go go, enemy sighted!
|
|
|
|
|
I need to lock a file stream(opened using fopen) in exclusive write lock. I came across a code segment where the functions flock() and fcntl() were used to lock the file. I need to have the header files unistd.h and sys/file.h in order to use these functions but these header files are not available. I am using Windows XP and Microsoft Visual C++. From where can I download these files?
|
|
|
|
|
I think the flock() function, unistd.h and file.h header files are only for Unix. In Windows, you can try _lock_file() function. Another way is _locking() function. For first argument, specify the value returned by _fileno() .
Alternatively you can try LockFile function as described at http://msdn.microsoft.com/library/en-us/dnucmg/html/UCMGch09.asp?frame=true[^].
Hope it helps.
|
|
|
|
|
Thanks for the hints. I tried using both _locking() and LockFile(). I did not use _lock_file() since it returns a void so I could not find if the file is opened by some other process or not.
if(_locking(_fileno(fd), LK_NBLCK, 10L )!=-1)
printf("Lock obtained on file!");
is always returning "Lock obtained on file!" even if the file is open by some other process and
if(LockFile(fd,0,0,0xffff0000,0))
printf("Lock obtained on file!");
else
printf("Could not obtain lock on file!");
is always printing "Could not obtain lock on file!" even if the file is not being used by any other process. I think the problem is with how many bytes to specify to be locked. I want exclusive lock on the whole file so as to ensure that I don't write to a file when the same is opened by some other process.
-- modified at 2:13 Thursday 22nd June, 2006
|
|
|
|
|
plz help me
plzzzzzzzzzzzzzzzzzzzz\
i dont understand by doing so the text movws its position once but does not contineously moves i want that it moves regularly plz send me code to help
\\\\\\
i hav made a dialog based application
now i want that onmy dialog i add "hello how r u" through Static control
now i want that it moves on the screen all the time fron left to right
like screen saver but i dont know how to do it
plz tel me and send me code to solve my problem
Please mail me
-- modified at 3:16 Wednesday 21st June, 2006
|
|
|
|
|
1.change the the id of static ctrl to some value say IDC_MOVING_TEXT
2.Set a timer using the SetTimer Function in the OnInitdialog function
3. In the on timer function call
GetDlgItem( IDC_MOVING_TEXT )->SetWindowPos( 0, x, y, 0,0, SWP_NOSIZE|SWP_NOZORDER);
decrement or increatement the x value to make the control move....
nave
|
|
|
|
|
Set a timer using the SetTimer Function in the OnInitdialog function
wat how i define one function inside other as u tel me to set timer using settime function inside OnInitdialog function
plz send me code for help
Please mail me
|
|
|
|
|
If u use MFC, add a handler for WM_TIMER and Call SetTimer to set interval
if SDK and callback function for WM_TIMER
Use SetTimer & KillTimer functions
|
|
|
|
|
plz can u send me code which help me as i do with this but it changes its position
and i want to move text regularly
plzzzzzzz
Please mail me
|
|
|
|