Category : winapi

The declaration for timeSetEvent contains a uResolution parameter: MMRESULT timeSetEvent( UINT uDelay, UINT uResolution, LPTIMECALLBACK lpTimeProc, DWORD_PTR dwUser, UINT fuEvent ); But my understanding is that, to set the timer resolution, timeBeginPeriod must be called first: The timeBeginPeriod function requests a minimum resolution for periodic timers… call this function immediately before using timer services… Do ..

Read more

What are those things in the red circles called? (I think) they are MDI Clients. My question is, how do they get messages from mouse and keyboard in MDI clients? I couldn’t get them working (but I managed to draw shapes in them), how do they do this? I’m using Borland C++Builder as my compiler. ..

Read more

I need to call the windows api : BOOL WINAPI * ServerSupportFunction( _In_ struct _HTTP_FILTER_CONTEXT *pfc, _In_ enum SF_REQ_TYPE sfReq, _In_ PVOID pData, _In_ DWORD ul1, DWORD ul2 ); https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff827495(v=vs.85) That is translated in delphi like: function ( var pfc{: THTTP_FILTER_CONTEXT}; sfReq: DWORD; pData: Pointer; ul1, ul2: DWORD): BOOL; stdcall; The winApi doc say that ..

Read more

While searching for a way to get the first letter from TCHAR, I came across code like this: template<int N> bool GetChar(LPCTSTR var, char(&out)[N]) { #ifdef UNICODE return WideCharToMultiByte(CP_ACP, 0, var, -1, out, N, NULL, NULL) != 0; #else return strcpy_s(out, var) == 0; #endif } I wasn’t familiar with c++ templates, and decided to ..

Read more

Taking advantage of high-resolution mouse input means getting mouse input in the native resolution of the mouse. This is good, and means that I can respond with as much resolution as the user’s mouse provides. GetRawInputDeviceInfo looks promising, but the RID_DEVICE_INFO_MOUSE that it returns contains dwSampleRate, "the number of data points per second," which while ..

Read more