Hello,
I need to retrieve values from an external application but it does not provide any API to do so. The values are ever-changing and not fixed.
Is there a way to retrieve the values from the application?
Maybe getting into the message loop for that particular application and filtering for certain window messages which contains t...
WinXP, Vista, Win7, there is a certain folder for recyclebin.
How Can I get the recycleBin Path for each disk, for different operation System?
in WinXP it is called XX:\RECYCLER, while in vista it used another name.
Is there any windows C++ API for it ?
Many thanks!
...
I am current using VC++ 2008 MFC. Due to PostgreSQL doesn't support UTF-16 (Encoding used by Windows for Unicode), I need to convert string from UTF-16 to UTF-8, before store it.
Here is my code snippet.
// demo.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "demo.h"
#include "Utils.h"
#incl...
This question was in my job interview.. I just to see whether I gave all the details...
...
I'm trying to create a toolbar where my bitmaps will be 40x40 and I'm trying to make the toolbar 40 pixels in width. I want it to be a vertical toobar. I'm getting nothing but horizontal results from this code:
HWND OGLTOOLBAR::create(HWND parent,HINSTANCE hInst,WNDPROC prc, int *toolWidthPtr)
{
if (toolhWnd != NULL)
{
r...
HANDLE hThread;
DWORD dwThreadId;
hThread = CreateThread(
NULL, // default security attributes
0, // use default stack size
MyThreadFunction, // thread function name
0, // argument to thread function
0, ...
I've tried, with little success, to identify how the variable length portion of the EVENTLOGRECORD data works.
Winnt.h defines the structure, and the following data, as follows:
typedef struct _EVENTLOGRECORD {
DWORD Length; // Length of full record
DWORD Reserved; // Used by the service
DWORD RecordNumber; // Absol...
Right now I do something like this:
SYSTEMTIME st;
st.wHour = 6;
st.wMinute = 23;
BOOL result = SetSystemTime(&st);
The goal is to get it to show that exact time on my local machine. When I run the program it changes it to 8:23 instead of 6:23. How can I get it to show the correct local time?
...
I have a program that downloads a binary file, from another PC.
I also have a another standalone program that can convert this binary file to a human readable CSV.
I would like to bring the conversion tool "into" the download tool, creating a thread in the download tool that kicks off the conversion code (so it can start converting whi...
Hey, I'm working on a map editor for my game, and I'm trying to convert the mouse position to a position in the game world, the view is set up using gluPerspective
...
Is there a way to make a toolbar button look different than the rest (Aside from changing bitmap or setting its state to Disable? Is there away to make it look highlighted all the time? I want the selected tool to look selected. Thanks (Sort of like the way open applications are "Selected" in Windows 7.
...
I would like to implement a thread safe queue in VS 6.0
Is there a good class to use for this? This is an MFC application using the CWinApp.
My former post lead me to here but I don't have the luxury to code in VS 2010, stuck in 6.0 land.
o well.....
Thank You.
...
#include <stdio.h>
#include <Windows.h>
int main()
{
TCHAR buff[1024];
GetLogicalDriveStrings(1024, buff);
int i;
for(i = 0; buff[i] != 0; i += 4)
printf("%S", buff+i);
}
When I try to compile it with MSVC, I get the following errors:
Commenting out GetLogicalDriveStrings(1024, buff); causes the code to com...
I have a Windows 32 bit app written in Delphi that is giving problems when running under Windows Server 2008 64-bit.
Details are sketchy ("having all kinds of printing issues" was the best report I could get so far) and the app behaves fine on all the Win64 platforms I have access to, but aside from that, I would have thought that an ap...
I have two region say rgn1 and rgn2. I wanted to combine both of them using CombineRgn function. So I write -
if CombineRgn(rgnMain,rgn1,rgn2,RGN_OR) = error then
ShowMessage('error');
Its giving return value as ERROR.
I have tested that rgn1 and rgn2 are correct region.
Thank You.
...
i get device insertion and removal notification from WM_DEVICECHANGE
i get the dbcc_name from the DBT_DEVTYP_DEVICEINTERFACE
i get the corresponding drive letter from the DBT_DEVTYP_VOLUME
if i insert the device one by one it works correctly
but if i insert two device at a time i get duplication in drive letters
how can i solve it
...
I've been searching msdn forever now without a straight answer.
Is there a way to simply get the user's language? I don't want to load any resources or anything at this point, I just want to get their language. Is there ANY simple way to do this?
I'm using visual C++,and I'm not using MFC or anything like that.
Thanks in advance!
...
What would be the best approach to take in order to achieve a backwards compatible (Windows XP through Windows 7) way to capture sound that is being sent to the speakers on a machine, even if the audio driver doesn't expose the "Stereo Mix" recording device.
For extra points, it would be great if this approach allowed for capturing soun...
If my application crashes, I use an ExceptionFilter to catch the crash, perform some final actions, then show a message box to the user that the application has crashed.
Because the application already crashed, there's not much I can (or I dare) to do, because if I do too much, the executed code might access corrupted memory and crash a...
I have dwVolumeSerialNumber, nFileIndexHigh, nFileIndexLow values obtained from a call to GetFileInformationByHandle. How can I get file path from these values?
...