I was just trying the SetTimer method in Win32 with some low values such as 10ms as the timeout period. I calculated the time it took to get 500 timer events and expected it to be around 5 seconds. Surprisingly I found that it is taking about 7.5 seconds to get these many events which means that it is timing out at about 16ms. Is there a...
I'm completely new to win32. I have been working on it the last 48 hours.
I'm trying to build a "grid", and I got examples of a List-View control and a Header control on msdn.microsoft.com .
The first one calls the InitCommonControls() function (besides I read this function is obsolete).
HWND DoCreateHeader(HWND hwndParent, HINSTAN...
When I created my visual studio project it defaulted to forcing me to use wide strings for all the functions which take character strings. MessageBox() for example, takes a LPCWSTR rather than a const char*. While I understand that it's great for multi-lingual and portable applications, it is completely unnecessary for my simple little a...
If a thread is doing something like this:
const DWORD interval = 20000;
DWORD ticks = GetTickCount();
while(true)
{
DoTasksThatTakeVariableTime();
if( GetTickCount() - ticks > interval )
{
DoIntervalTasks();
ticks = GetTickCount();
}
}
Eventually, ticks is going to wrap when the value doesn't fit in a ...
My program does file loading and memcpy'ing in the background while the screen is meant to be updated interactively. The idea is to have async loading of files the program will soon need so that they are ready to be used when the main thread needs them. However, the loads/copies don't seem to happen in parallel with the main thread. The ...
As far as I know , both of them are pointed by a HANDLE which can be manipulated by user.
What is the difference?
...
I need to find the bandwidth available at a particular time. The code must be developed in Visual C++ or in .Net family . If anyone knows how, please help me out.
...
Is there a significant overhead associated with calling OutputDebugString in release build?
...
I need to get the sytem idle time.It must be developed in vc++ and the code should not use hooks is there any possible way of getting SystemIdleTime from taskmanager
...
Hello,
Is there a way to get/set the location of the scrollbar in Internet Explorer/Firefox?
I am not looking to do that from inside the HTML/ASP/Javascript code, but from an application outside the browser (using WinAPI for example), and without using BHO.
From the search I've done right now it seems impossible, so I'm dropping a ques...
I have a Windows application that HAS to run as 32-bits (because of other limitations out of my control). However, my application has to call and access a driver which may be 32-bits or 64-bits depending on the system where it is installed.
I access the driver through DeviceIoControl() calls, exchanging data structures declared in an in...
Using C winapi, how can you capture receieved data from a commport that is open exclusively by another program.
I know there are programs that do this, but I want to code my own monitoring software for a specific purpose and was wondering how is it done?
...
How can i which is the default browser in my system programatically. the codes must be developed using vc++
Is there any API for this
Where in the registry is the default browser value changed can somebody help me out.
...
How can I programatically find the CPU time which is displayed in System Idle Process (in Task Manager) using Visual C++?
...
I want to get the various user account passwords which are stored in my computer programatically using Visual C++. Are there any APIs to help me do this?
...
I'm writing an application that will need to reboot the Windows machine the code is running on.
There didn't appear to be an API within .NET to do this, so I looked up the the Win32 API for this and it is called InitiateSystemShutdown. The extern declaration is given below:
[DllImport("advapi32.dll")]
public static extern bool Initiate...
Hi,
I create a window with CreateWindow() and show it with ShowWindow(). But the parent window on which this was created should be disabled until user returns from this window, i.e. it should simulate modal dialog box. Any help is appreciated.
Thanks
...
Is it possible to set the parent of a .NET WinForm to a native app?
So it acts like its child window?
...
Hi, I have created a wn32 project with Visual Studio 2008 and Visual C++ language, it uses the ws2_32.lib library and then I compiled in Release mode.
It runs very good in the same computer, but when I copy the exe file to other computer (that doesn't have installed Visual Studio), it doesn't run.
The message I see is:
This applicati...
Hello, I have a problem which is most likely a simple problem, but neverthe less still a problem for me. I am using the Listbox in Win32 / C++ and when getting the selected text from my listbox the string returned is just garbage. It is a handle to a struct or similar?
Below is the code and an example of what I get.
std::string Listbox...