|
I advise you to put these defines in your project's properties, and then recompile to make sure that stdafx.h et al picks it up. If the error still persists after that, I advise you to hire an exorcist...
--
From the Makers of Futurama
|
|
|
|
|
Found it. Some backstreet file had decided to not include stafx and rather include the files for itself. So my #defines were not being picked up.
|
|
|
|
|
Thats a New One, Never tried an Excorsist before, but it seems to have worked!
Let's get a new (ANSI Approved) Pragma , like
#pragma (invoke excorsist)
// This Pragma ensures that ( in the Debug Version at least
// that All Bugs will be Automatically Fixed)
Do not Forget however:
#pragma (endinvoke excorsist), or you get:
error C9999: "found end of line before closing pragma statement"
Regards
LateNightsInNewry
|
|
|
|
|
just write
#define UNICODE 1, you work will done!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
haha, I did. The trouble was I wrote it in a place where a particular file couldn't see it.
|
|
|
|
|
Help!
I'm in the process of switching an exisitng app to use comctrl version 6. In the process it broke transparent support I had for checkboxes. Static text controls still behave properly.
My main window is a CWnd and I handle the OnCtlColor call. It still allows me to change the brush of the checkbox, but not the text colour nor the transparent flag (whenever I use the transparent flag it picks black as the fill).
Any suggestions as to where I have gone astray?
Thanks!
|
|
|
|
|
|
I still didn't get the hang of these. We can add a value like so:
uRetVal |= DV_CENTERALL;
But I want to remove a value also if it is present:
uRetVal ^= (uRetVal | DV_RIGHT) == uRetVal ? DV_RIGHT : 0;
Is the above correct, or is there an easier better way to do it?
|
|
|
|
|
to remove DV_CENTERALL how about
<br />
uRetVal = uRetVal & ~DV_CENTERALL<br />
cje
|
|
|
|
|
Thanks for that. The '~' operator is not on MSDN, it's in the index, but the page has a large "Empty Index Entry" written across the top. So I am guessing it is the NOT operator?
|
|
|
|
|
yes, the ~ operator is the Bitwise NOT
cje
|
|
|
|
|
|
I need a function to get time(seconds and microseconds) in windows, like gettimeofday in Linux.
Can you help me?
Thanks
|
|
|
|
|
|
I need to get the microseconds too. What is the function, if exists?
thanks
|
|
|
|
|
Opps sorry, I saw milliseconds. I don't know if microseconds are supported.
led mike
|
|
|
|
|
afpr wrote: I need to get the microseconds too. What is the function, if exists?
Windows does not have that level of resolution. What exactly are you trying to do?
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I'm trying to calculate time between send and receive a packet. I'm using packet.dll.
thanks
|
|
|
|
|
|
Check ::GetSystemTimeAsFileTime() in the MSDN library.
|
|
|
|
|
afpr wrote:
I need a function to get time(seconds and microseconds) in windows, like gettimeofday in Linux.
try Multimedia timers .. timeGetDevCaps api will starting api for same
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
I have found a solution. Use this functions:
/* Initialize everything to 0 */
void sec_init(void)
{
LARGE_INTEGER lFreq, lCnt;
QueryPerformanceFrequency(&lFreq);
freq = (double)lFreq.LowPart;
QueryPerformanceCounter(&lCnt);
start = lCnt.LowPart;
}
/* return number of seconds since sec_init was called with
** a gross amount of detail
*/
double sec(void)
{
LARGE_INTEGER lCnt;
long tcnt;
QueryPerformanceCounter(&lCnt);
tcnt = lCnt.LowPart - start;
return ((double)tcnt) / freq;
}
|
|
|
|
|
dear all,
I have dll in which one the function should display a dialog box( this dialogbox resource is in dll)when it called by the aplication ,which has loaded this library (using Loadlibrary()).
But problem here is ,when the application calls this function( which is exported by dll) the dialogbox is not displaying properly and the program stops continuing execution. To solve this i used AFX_MANAGE_STATE(),but when i compile it displayed AFX_MANAGE_STATE is undefined variable( i complied using nmake in SDK platform environment)..
Manjunath S
GESL
Bangalore
|
|
|
|
|
Manjunath S wrote: But problem here is ,when the application calls this function( which is exported by dll) the dialogbox is not displaying properly and the program stops continuing execution.
What do you mean by this? can you be more specific.
Why dont you tried using MFC dll's.
|
|
|
|
|
Actually i have created a dialogbox in an exsisting Dll sample code and tried to display the dialogbox which i have created
But it is giving an error(Err No.1813,Specified Resource type cannot be found in the Image file)
Thanks
Manjunath S
GESL
Bangalore
|
|
|
|