winapi

SDL/C++/OpenGL graphics display says "Not Responding" on cin from console.

So the story goes, I have an sdl/c++/opengl/win32 program which has a window to display my graphics and a console to get user input. When I tell the console to get input the display will go into a "Not Responding" mode. The program is single threaded and I was hoping that there was a better way around the problem then creating a multi-...

How to delete IE addressbar history on Vista/Win7?

First, here is a picture of what I see http://img713.imageshack.us/img713/4797/iedrop.png I need an solution to clear addressbar dropdawn, but not using ClearMyTracksByProcess or IE dialogs. I need to delete only a specific URL and all his traces. I deleted manually all traces of that URL in: Users\\AppData\Local\Microsoft\Windows\Te...

c++ win32 set cursor position

i know wat function to use but i can't get it to workd right. i use SetCursorPos() the only problem is that it sets the cursor not to the windows coordinates but to the screen coordinates. i also tried the ScreenToClient() but it didn't work ethier. here is my code pt.x=113; pt.y=280; ScreenToClient(hWnd, &pt); SetCursorPos(pt.x, pt.y);...

user kernel mode division for windows process

hi all, How is the process address space(4GB) allocated between usermode and kernel mode modules in windows when i checked explorer.exe in process explorer the lower 2GB is occupied by user mode dlls and upper 3-4GB address range of system process is loaded by drivers (*.sys files) So my question is will all these 3-4GB address range...

C++ - Set a class instance's function after it has already been defined

I am trying to give a class event functions such as .onShow() and .onHide(), so when the object is shown, the .onShow() function will run. How can I allow the function to be change like so: MyClass myInst = MyClass(); myInst.onShow = OnShowFunction; Is it possible to allow this? ...

WinApi Base Services tutorial?

I need to make application which gathers basic data about system, like OS version, processor & memory type, data about installed programs... Application will be written in c and will work on Win Server 2000 and 2003. So first thing on my mind was WinApi, but i can not find any tutorials for these things, every tutorial i found is about U...

Determine Framerate Based On Delay

On every frame of my application, I can call timeGetTime() to retrieve the current elapsed milliseconds, and subtract the value of timeGetTime() from the previous frame to get the time between the two frames. However, to get the frame rate of the application, I have to use this formula: fps=1000/delay(ms). So for instance if the delay wa...

drawing outside client area, winAPI

How would I draw outside the client area of a window, and on the title bar. I know it can be done, but I am unsure of how to implement this effectively. Think google chrome, where the tabs are on the title bar. ...

C++ WinAPI save and open dialogues

Hey, How do I implement a save and load dialogue box into my current project? I only need to know how change the basics, like the filename mask and default path. Any help appreciated, or even a link to a helpful website. Thanks. ...

Accessing contents of VB6 Data Grid from AutiIt script

I'm using an AutoIt script to access data from a application developed in Visual Basic 6. Data in all controls can be accessed using Control*() functions. However, Data Grid and Data List controls (their class names: DataGridWndClass and DataListWndClass) don't respond to ControlListView() function. What is the way to access their con...

choice between win32 APIs and .NET framework

I have to develop an application for windows that will enable controlling the mouse through web cam by recognizing hand gestures. I will be using vc++ 2008 for development. But I am confused whether to go with .NET framework or core win32 APIs. Performance is very important for my application. As per the book "Beginning Visual C++ 2008" ...

Can't read certain registry keys programatically

I have a little app which reads registry key string values. It works well but for some reason it fails on this key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductId Despite working on other values of HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ It also fails on `HKEY_LOCAL_MACHINE\SOFTWARE\Mi...

Global hotkey in console application

Does anyone know how to use the RegisterHotKey/UnregisterHotKey API calls in a console application? I assume that setting up/removing the hotkey is the same, but how do I get the call back when the key was pressed? Every example I see is for Winforms, and uses protected override void WndProc(ref Message m){...}, which isn't available...

Progress bar embedded in listview

Hello, Does anyone know how I can add a progress bar to a listview cell using "pure" api. The only examples I've found are either in c# or outdated mfc ...

c++ having strange problem

I have a function that creates and insert some numbers in a vector. if(Enemy2.dEnemy==true) { pt.y=4; pt.x=90; pt2.y=4; pt2.x=125; for(int i=0; i<6; i++) { Enemy2.vS1Enemy.push_back(pt); Enemy2.vS2Enemy.push_back(pt2); y-=70; pt.y=y; ...

Invoke delegate on main thread in console application

In a Windows Application, when multiple threads are used, I know that it’s necessary to invoke the main thread to update GUI components. How is this done in a Console Application? For example, I have two threads, a main and a secondary thread. The secondary thread is always listening for a global hotkey; when it is pressed the secondary...

Is it possible to programmatically backup/restore Windows domain/certificate credentials?

I've been trying to use the Windows Authentication low level credential API functions to backup/restore credentials. http://msdn.microsoft.com/en-us/library/aa374731%28VS.85%29.aspx#low_level_credentials_management_functions However, I've found that while I can use CredEnumerate to obtain every credential on the system, all the pass...

Adding WPF window to Win32 application

I have a monster of a win32 application with GUI based on a mixture of MFC, WTL, user32 and a few other technologies. I need to add another top-level window and I would like to give WPF a chance. Could you help me identify the steps necessary to host a WPF window in win32 app? Details are welcome. ...

how to get a window title using SendMessageTimeout in C#

I need to enumerate all open windows and get their title, but the problem is that some windows belong to the same process but to a different thread, which is blocked (waiting for a mutex). Therefore I cannot use GetWindowText for windows that belong in my own process as this will result to a SendMessage call which will block my code's ex...

How to encode an AVI from x64 .Net Application?

I have a .Net application which we compile in both x86 and x64 bit. One feature is the video export to avi, but on the x64 version this doesn't work. The reason, I think, is that it uses the win32 dll called AviFil32.dll to encode the avis, and this doesn't like being called by a x64 process. Originally I thought the problem was a lack ...