|
You need to set the symbol _WIN32_WINNT to 0x0500 or greater, to specifically target Win2000 or XP. If you don't do this, the declarations in winbase.h are #if'd out.
Of course, this also means your app cannot run on WinNT or Win9x/ME, unless you delayload the appropriate DLL and then test OS version at runtime.
Steve S
|
|
|
|
|
How to get "password policy requirement" for local computer, not for domain?
Can anybody help?
|
|
|
|
|
I want to start a program Using CreateProcess().What shld I pass so that compiler will search the whole computer for that executable.
|
|
|
|
|
Hi,
refer CFileFind class. use this recursively for find files in the sub directories. sample code is in msdn.
Have A Nice Day!
Murali.M
|
|
|
|
|
Hi,
Iam new to VC++, Is there any body tell me how to capture screen and save it in .Avi.
Santosh K
|
|
|
|
|
for capturing screen imgae use
GetDesktopWindow() this will return u the handle of desktop window
then using you can get the DC of your desktop
like this
HWND Desktophwnd = GetDesktopWindow();
CWnd wnd;
wnd.Attach(Desktophwnd) ;
then query for desktop DC
CDC desktopDC = wnd.GetDC();
now using bitmap funtions of CDC class u can actually get the screen bitmap
and then for saving it into AVi u have to create Video stream and can save easily ur images in AVI file
// for creating AVI u can use library vfw32.lib
using AVI function of this libray you can create ur own AVI file by writing
AUDIO/VIDEO data in it.
like
0 AVIFileInit // for initializing AVI library
1 AVIFileOpen // for creating AVI File
2 AVIStreamCreate / for creating Audio/ video stream
3 AVIStreamWrite //for writing audio video data
5 AVIFileClose // for closing ur file
4 AVIFileExit / un initializing the library
For capturing every movement and action taking place on desktop u have to write ur whole image capturing code and saving code in a worker thread.
Regards
Abhishek Srivastava
Software Engineer (VC++)
India ,Noida
Mobile no 9891492921
|
|
|
|
|
in the same way, is there a simple method to capture image from an avi (or mpeg, divx, etc) at a certain position, and in 'hide' mode (i.e. no screen drawing, no screen capture..). I try that with DirectX in a worker thread, but there is a crash because of bad COM initialization or release...
Thanks for ideas...
Thierry
|
|
|
|
|
Implement of asynchoronous TCP client socket(winsock2) I made the following steps to do this:
1. Create socket with help socket function
2. Select window for which generate notify message WSAAsyncSelect
3. Call connect function for this socket
Trouble: When I send data from other host(or loopback), notifycations doesn't deliver to window, but if after connect call insert recv then statement application is work, but it isn't in asyncronous mode it is clear.
Question: Is it possible to implement asyncronous(asynchronous receive) windows client socket and what I must do for this?
|
|
|
|
|
Hi,
yes you can!
I did it this way (it's a server, but it should help you):
.
.
.
SOCKET datasocket;
SOCKET listensocket;
listensocket = ::socket(AF_INET, SOCK_STREAM, 0);
if(listensocket == INVALID_SOCKET) throw runtime_error("server socket failed");
// importent port for non-blocking
unsigned long blockmode = 1; // see ioctlsocket call
if((ioctlsocket(listensocket, FIONBIO, &blockmode) == SOCKET_ERROR))
throw runtime_error("server set socket to non-blocking failed");
struct sockaddr_in local, from;
local.sin_family = AF_INET;
local.sin_addr.s_addr = INADDR_ANY;
local.sin_port = htons(clientConnectionOptions.port);
int rc;
rc = ::bind(listensocket,(struct sockaddr*)&local,sizeof(local));
if(rc != 0) throw runtime_error("server bind failed");
rc = ::listen(listensocket,2);
if(rc != 0) throw runtime_error("server listen failed");
while(!endServer)
{
int fromlen = sizeof(from);
datasocket = ::accept(listensocket, (struct sockaddr*)&from, &fromlen);
if(datasocket == SOCKET_ERROR)
{
if(WSAGetLastError() != WSAEWOULDBLOCK)
{
throw runtime_error("accept in service module failed");
}
Sleep(100);
continue;
}
if (datasocket == INVALID_SOCKET) break;// throw runtime_error("accept failed");
//datasocket is open and ready to send/recv data
.
.
.
|
|
|
|
|
Hi,
i am using thread for make httprequest for some urls timeout is occured and throwing CInternetException on that case thread is exit with 0. how to solve the problem. any one help to me. thanks in advance.
Have A Nice Day!
Murali.M
|
|
|
|
|
|
hello all,
i have "accidently" "misplaced" my license key for visual assist .net v7.1
can anyone help me?
|
|
|
|
|
Try sending these folks a message support@wholetomato.com or support@wholetomato.com. I'm sure they'll be able to help you
Regards,
|
|
|
|
|
my friend, i meant i "ACCIDENTLY" (*wink wink*) lost my license key.
can i call you joey?
|
|
|
|
|
i'll be frank,
the original post wants to know the license key number to enable visual assist.
|
|
|
|
|
try to search at astalavista.box.sk
|
|
|
|
|
I suggest you *wink wink* cough up US$79 - a laughably small price for a great productivity improvement.
Don't you yourself earn your income (or plan to) from the fact that others pay for your efforts?
Bernd
|
|
|
|
|
Here is my problem:
In order to use GetOpenFileName I use a OPENFILENAME structure which has a member variable called lStructSize.
In MSDN I am advised to use sizeof(OPENFILENAME) to initialize this one IF WINDOWS IS WIN2000 OR LATER!!!
otherwise I should use OPENFILENAME_SIZE_VERSION_400.
All is fine. I determine which type of Windows is my app running and use different initializations but this
OPENFILENAME_SIZE_VERSION_400 seems undefined! What can I do?!
TNX!
|
|
|
|
|
OPENFILENAME_SIZE_VERSION_400 is defined in <commdlg.h>
Call GetVersion[Ex] to determine which version of Windows your application is running on then set the lStructSize field of the OPENFILENAME accordingly.
Regards,
|
|
|
|
|
It doesn't work!
My commdlg.h header file supplied with VC++6 does *not* include this definition at all. In fact no .h file from my distribution doesn't contain it. In a moment of desperation I searched brute-force-style ALL files on the hard drive for this string. None. Except cache files of Opera (web browser and text files that I wrote).
Let's say I might (??!) have an incomplete distribution of this Visual Studio. What if I would nicely ask you if you could tell me the number value of this constant?
It's probably unnecessary to tell you how to do that.
Thank you.
PS: Could it be the fact that I don't really like C ?!? Maybe it has a mind of its own and senses my hate?
|
|
|
|
|
had the same problem.
#if (_WIN32_WINNT >= 0x0500) && !defined(OPENFILENAME_SIZE_VERSION_400)<br />
#ifndef CDSIZEOF_STRUCT<br />
#define CDSIZEOF_STRUCT(structname, member) (((int)((LPBYTE)(&((structname*)0)->member) - ((LPBYTE)((structname*)0)))) + sizeof(((structname*)0)->member))<br />
#endif<br />
#define OPENFILENAME_SIZE_VERSION_400A CDSIZEOF_STRUCT(OPENFILENAMEA,lpTemplateName)<br />
#define OPENFILENAME_SIZE_VERSION_400W CDSIZEOF_STRUCT(OPENFILENAMEW,lpTemplateName)<br />
#ifdef UNICODE<br />
#define OPENFILENAME_SIZE_VERSION_400 OPENFILENAME_SIZE_VERSION_400W<br />
#else<br />
#define OPENFILENAME_SIZE_VERSION_400 OPENFILENAME_SIZE_VERSION_400A<br />
#endif // !UNICODE<br />
#endif // (_WIN32_WINNT >= 0x0500) && !defined(OPENFILENAME_SIZE_VERSION_400)
found it on http://codeworks.gnomedia.com/wtl/wtldocs/atldlgs_8h-source.html
hope it will help.
greetz
tib
----------------------------------------------------------
I once had a nightmare in binary --- I think there was a 2
|
|
|
|
|
I am thinking about purchasing Visual Studio.Net and would like to know if there is a cheaper version of VS.Net since I can't afford an $899 product. I am a student though, I just want to transfer to new technologies... Is there a cheaper way of getting visual studio.net?
Actual Linux Penguins were harmed in the creation of this message.
|
|
|
|
|
|
I know how to implement different UI controls but how can I owner draw them, I never thought about how useful they could be, though they are visually appealing in some cases, can anyone would recommend some article about how to make owner drawn controls, maybe websites...
Actual Linux Penguins were harmed in the creation of this message.
|
|
|
|
|