|
If _MAX__TIME64_T were not defined, it would not compile, but then that's part of the C run-time library and isn't compiled when you build your project (instead, the static library or the import library for the C run-time DLL is linked into your program).
_MAX__TIME64_T is defined in ctime.h in the VC\crt\src folder under the Visual Studio 2005 install folder, if you have installed the C run-time source. The maximum value of a _time64_t is the number of seconds from midnight, 1 January 1970 to 11:59:59pm, 31 December 3000. The value in the parameter you're passing to gmtime64 is exceeding this.
If the code uses a time_t* pointing into a larger structure which is coming from the ZIP/GZip file, you should either define the macro _USE_32BIT_TIME_T or change the data type to _time32_t and call gmtime32 .
|
|
|
|
|
THANK YOU THANK YOU THANK YOU! Makes so much more sense now!
Great fix!
|
|
|
|
|
I seem to recall reading somewhere that the MS Windows Taskbar sends a message to all windows when it's started (or restarted) so that running applications that placed an icon in the notification tray can re-install them.
Thanks in advance
-gb-
|
|
|
|
|
|
GB, see the answer to the last question on this[^] page.
/ravi (Big fan of SBD from the old execpc days. )
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
Thanks Ravi,
I also found what I needed in the Windows SDK as Plain C:
LRESULT CALLBACK WndProc(HWND hWnd, UINT uMessage, WPARAM wParam, LPARAM lParam)<br />
{<br />
static UINT s_uTaskbarRestart;<br />
<br />
switch(uMessage)<br />
{<br />
case WM_CREATE:<br />
s_uTaskbarRestart = RegisterWindowMessage(TEXT("TaskbarCreated"));<br />
break;<br />
<br />
default:<br />
if(uMessage == s_uTaskbarRestart)<br />
AddTaskbarIcons();<br />
break;<br />
}<br />
return DefWindowProc(hWnd, uMessage, wParam, lParam);<br />
}
To test:
- Run the application to be tested.
- Close all Explorer windows.
- Run the Windows Task Manager (Ctl+Alt+Del.)
- Kill the remaining Explorer.exe task still running.
- Use the File | New Task menu command and run Explorer.exe to re-start the taskbar and the application being tested should place a fresh icon in the tray.
SBD is still alive and well at
http://www.GregoryBraun.com
Thanks
-gb-
|
|
|
|
|
Hi...
I would like to show a text (like skype oder icq) in a running directx game (Battlefield 2).
Please give me a hint were to starting looking. Maybe a sample somewhere.
Running Windows XP Prof with MS Visual C++ 6.0
Stefan
-- modified at 18:50 Saturday 15th July, 2006
|
|
|
|
|
StefanKittel wrote: I would like to show a text
Give us some background of your experience with drawing text, in a window, in DirectX ??? What else??
"Just about every question you've asked over the last 3-4 days has been "urgent". Perhaps a little planning would be helpful?" Colin Angus Mackay in the C# forum
led mike
|
|
|
|
|
Why am i getting this error?
#pragma once
#include <ostream>
class CSentenceArray
// Sentences stored as an array
{
public:
CSentenceArray(void);
virtual ~CSentenceArray(void);
void readFromFile (const char *pszFileName);
void Display (ostream &Sentence);
void sortSentences(bool bAscending); // implements BubbleSort or quicksort
void Clear();
int FirstWord(const char *ptrWord);
protected:
CSentenceArray(bool bCreateArray);
//virtual void storeSentence(const char *pszSentence);
//virtual const char *getNextSentence();
//virtual const char *peekNextSentence();
//virtual void swapWithNext();
//virtual void Reset();
//virtual void eraseAll();
virtual int HowManyWords(const char *pszWord);
private:
char *m_pSentences;
int m_iCurrentPos;
};
Jon
|
|
|
|
|
Add #include <ostream>.
Best,
Jun
|
|
|
|
|
I can't see what you're including as you didn't tick the "Ignore HTML tags in this message (good for code snippets)" check box when posting or use enity references. I assume you're including <iostream> . Remember that the standard library is in the std namespace so you should write std::ostream .
Steve
|
|
|
|
|
Hello all,
I am having some problems with class view in VS2005.
I have created a MFC project with a form (CFormA) derived from CFormView and added two edits to it. Then, I have added two member control variables (CEdit) to these controls. Up to now, everything is ok.
So, I changed the CEdit control variables to a control of mine, also derived from CEdit (CGTBrowseEdit) but it resides on a common controls DLL (imported with AFX_EXT_CLASS). After that, CFormA has disappeared from class view and when I try to add any members to it, VS2005 reports a problem: "Add/Remove operation is impossible, because the code element 'CFormA' is read only".
The strange thing is: if I create another control derived from CEdit that belongs to the project (not imported from a DLL), and change the member variables to this control, class view shows CFormA again and everything works fine!
Does anybody have a similar problem or have heard about it?
Thanks
Gian.
-- modified at 14:28 Saturday 15th July, 2006
|
|
|
|
|
hello to all
i need to display in mfc turkish and other languages
that i get from html
the mfc display english char and some symbols good
but the turkish special char convert into to
unrelated symbols
the one char now takes 2 char ( i think its unicode ) of unrelated symbols
what can i do to display all turkish chars?
-- modified at 10:56 Saturday 15th July, 2006
|
|
|
|
|
|
Hello,
I need to choose a printer and init printing a document(saved on my disk), whithout a print dialog.
How can I do this?
[]'s
|
|
|
|
|
Hope I understood your question
<br />
LPPRINTER_INFO_2 m_pPrinters;<br />
LPDEVMODE m_lpdevmode;<br />
...<br />
...<br />
HDC hdc=CreateDC(m_pPrinters->pDriverName,<br />
(LPCTSTR)m_lpdevmode->dmDeviceName,m_pPrinters->pPortName,m_lpdevmode);<br />
whitesky
|
|
|
|
|
Thanks for your help.
I have a printer device and a file name on hard disc. How can start a print job passing these parameters (printer and file name)?
[]'s
|
|
|
|
|
sorry i dont understand,you have a printer ok and you have a file in your disc now you want to print this file,yes?
whitesky
|
|
|
|
|
That's right.
I need to do this programatically.
|
|
|
|
|
when you have a hdc from printer(CreateDC)then you can
read from your file in the loop and use StartPage and StartDoc
use TextOut or DrawText for write to printer and the end EndPage and EndDoc
(you need to check if your file is > from a page)
I hope its helpful for you
|
|
|
|
|
But my file can be any format, not only text file.
I need to print a image too.
Any other idea?
[]'s
|
|
|
|
|
if you need to print a image you can draw image to dc from printer you can open your file(Image) and use from handle printer for print it.(if you have a hdc you ability to print image or text its not only for printer i think that windows programming is work with handles)
I hope its helpful to you
|
|
|
|
|
But this file can be a .DOC file, with image included and formatted texts (bold, italic,...), then I need to build a app that the user select any file and OK. The app should send the file to a postscript printer for convert to .PS format.
Can I do this, only with my app?
|
|
|
|
|
It's not possible. An app cannot print a document from disc directly to printer.
I should do this with the app that can read the document.
Thanks for your atention.
[]'s
|
|
|
|
|
When you have each file (psd,3d,pdf,txt,...)first you need to read file for example a jpg file
you can use from a class CImage or GDI+ or you can read directly after read you want to print
(for example you need to print a psd file(photoshop) you cant use from a function for read you and print
you need to a structure for read this file and convert it to a for example hbtimap(you can see a example from read psd files in codeproject)
and then you can print this file.now you want to print doc file its like this you need to read this file and convert a foramt for print
A app cannot to print a file from disc directly its right you need to read to file and above
|
|
|
|