|
i am using CreateTimerQueue() funcation to create queue for timers and i have include windows.h and winbase.h files but compiler give error that CreateTimerQueue() is undeclared identifier
C:\Documents and Settings\Administrator\Desktop\radio_check_ selection\vep.cpp(344) : error C2065: 'CreateTimerQueue' : undeclared identifier
what can be reason and its solution
|
|
|
|
|
shaina2231 wrote: error C2065
Following are the reasons for Error C2065 from MSDN.
1. You are compiling with a debug version of the C runtime, declaring a Standard C++ Library iterator variable in a for loop, and then trying to use that iterator variable outside the scope of the for loop. Compiling Standard C++ Library code with a debug version of the C runtime implies /Zc:forScope. See Debug Iterator Support for more information.
2. You may be calling a function in an SDK header file that is currently not supported in your build environment.
3. Omitting necessary include files, especially if you define VC_EXTRALEAN, WIN32_LEAN_AND_MEAN, or WIN32_EXTRA_LEAN. These symbols exclude some header files from windows.h and afxv_w32.h to speed compiles. (Look in windows.h and afxv_w32.h for an up-to-date description of what's excluded.)
4. Identifier name is misspelled.
5. Identifier uses the wrong uppercase and lowercase letters.
6. Missing closing quote after a string constant.
7. Improper namespace scope. To resolve ANSI C++ Standard Library functions and operators, for example, you must specify the std namespace with the using directive. The following example fails to compile because the using directive is commented out and cout is defined in the std namespace:
shaina2231 wrote: what can be the solution
Please make sure that you are not doing any of them.
|
|
|
|
|
The CreateTimerQueue() will only be available only if _WIN32_WINNT is greater than or eual to 0x0500. So in the project settings->c/c++->Pre processor definition put _WIN32_WINNT=0x0500
or in the stdafx.h define the macro as
#define _WIN32_WINNT 0x0500
|
|
|
|
|
That function requires windows 2000 or above. So take Project settings, C/C++ tab and add _WIN32_WINNT=0x0500 to the preprocessor definitions. Hope at this time, it will compile.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
plz send me link regarding Queue Timer examples or Demos
|
|
|
|
|
|
Hi,
I just got a a New Lap Top same as OS as my Tower Windows XP service pack 2
However when I try to do a OpenProcess on the Parent Process (I am in the code) of the child process
I get zero for the process handle AND access denied for GetlastError
I am trying to jog my memory and see if changed the registery --> Local Security Dont remember
here is the Create Process
<br />
return_code = CreateProcess(NULL,<br />
(LPCSTR) &herc_buff[0],<br />
NULL,<br />
NULL,<br />
TRUE,<br />
NULL,<br />
NULL,<br />
NULL,<br />
&si,<br />
&pi);<br />
<br />
|
|
|
|
|
Add @err,hr to the watch window and check what is the last occurred error. Hopefully it can give you the hint.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Are you sure you're the exe has enough privilege? is it being blocked by security applications like firewall?
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
Turned Firewall off
I am going to investigate @err,h mentioned previously in the thread to see what its about
thankx
|
|
|
|
|
ForNow wrote: @err,h
Its err,hr buddy. Be careful.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
I tried that
All that does is return the same result as GetLastError
Access Denied
The thing what I dont understand is the Code Woks on My Tower same os Windows XP service Pack 2
|
|
|
|
|
Hi All,
When i am porting my application VC++ 6.0 to VC++ 9.0 in the following piece of code i got the error
error C2039: 'm_hWndLastControl' : is not a member of 'CDataExchange'
else if (pDX->m_hWndLastControl != NULL && pDX->m_bEditLastControl)
{
::SendMessage(pDX->m_hWndLastControl, EM_LIMITTEXT, maxChars, 0);
}
When i had a look at the CDataExchange class the member hWndLastControl is emoved and a new member called m_idlastcontrol is introduced.
i can use the pDX->m_hWndLastControl in the comparison, but SendMessage nead a HWND. How can i get the HWND from m_idLastControl?
Is there any API to get the handle of a control from its ID?
Thank you all for the support.
|
|
|
|
|
Googling for "site:msdn.microsoft.com m_idLastControl" leads you to this[^] - informative?
|
|
|
|
|
Thanks for the link.
We are able to get the control id, how can we get the handle to control from control id?
|
|
|
|
|
If you have the dialog handle, GetDlgCtrl will work.
|
|
|
|
|
Thanks Stuart.
I dont have a Dialog Handle,
Can i use ::GetDlgCtrl or any other API?
Thanks
|
|
|
|
|
|
hiyah Stuart - is there a definative guide about porting from VC6 to (anything higher) or is at all 'suck it and see and when you get an error search MSDN/the forums'
cheers & thanks ..
Garth
|
|
|
|
|
|
thanks - I havnt been following this for a long time (obviously, vc6 ..) but will be stepping up in the new year
cheers
Garth
|
|
|
|
|
Yea that's must be great to hear. VC 6 is not fully following ISO standard for C++. But it's easy to use (if we ignore the problems with class wizard and all). One of the best IDE, I've ever used. The new Visual Studio IDE is not so responsive as the old one. But it's having improved compiler and libraries
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
Garth J Lancaster wrote: suck it and see and when you get an error search MSDN/the forums
That's the approach I've always used - but the only porting I've done was 50-60 kLOC of non-MFC code from VC6 to VC7.1. I was using lots of STL, lots of Boost, so moving to VC7.1 was a blessed relief
I think that if you've stuck to documented parts of MFC (which is not what the OP's done, from what I can tell), you'll be mostly OK.
I suppose I ought to port some of my old VC6 stuff, seeing as I no longer have any VC6 installs, but I have trouble getting enthused as a) they work, b) the customers aren't wanting updates, and c) did I mention, they work Also - one of them is my first ever MFC app (originally written in VC5!). I've looked at it since, and it's horrible - I don't want to dip my toes in that sewer!
|
|
|
|
|
many thanks Stuart - it seems (very luckily) for me that anything Im going to port is non-MFC, STL, Boost, ACE (I should have mentioned this up-front)
thanks again
Garth
|
|
|
|
|
actually some body has change the setting/so i can't see my workspace and client areas (as)it was before ..some times they are overlapping..not like a normal application ...
|
|
|
|