Related to this question, but... is it possible to trigger via API a new hardware device scan? I have a serial port Bluetooth device that I'm pairing automatically via API calls with 32feet.net .NET Bluetooth, which works quite nicely. While i can query for the serial services in the scanning of the device, the COM ports don't show up i...
Hi there~
I'm trying to send a duplicate message to an editbox window in this code:
extern "C" HOOK_DLL_API LRESULT CALLBACK GetMsgHookProc(int nCode, WPARAM wParam, LPARAM lParam)
{
if (nCode < 0)
{
CallNextHookEx(gMsgHook, nCode, wParam, lParam);
}
KBDLLHOOKSTRUCT *lpk = (KBDLLHOOKSTRUCT*) lParam;
...
I have a shared folder (New Folder) in a remote pc with current users (user1 and user2). When I try to access the shared folder with the ff credentials in a program, the GetLastError API returns 5 but I expect that GetLastError API should return 1326.
path: \\PC1\New Folder
user: 12345
pwd: 12345
Please explain to me the difference. T...
I registered a thumbnail on a window of another window. (dwmRegisterThumbnail())
I want to draw on top of the thumbnail but I can't as drawing of thumbnail is handled by DWM.
Is this possible?
...
Hi,
I'm implementing a custom combobox to behave like a searchbox.
It is constructed from an Edit control, a Button and a Listbox.
I'm trying to open the listbox on mouse click on the button, it seemed to be simple but become complicated.
First I tried to manage the mouse click on the "BN_CLICKED", but then I discovered it's too late a...
Hi all,
i have small doubt regarding the window functions in c++.
what exactly "invalidate()" function do?
what message does it sends?when we need to call this? also what is "update()" function?
is "invalidaterect()" works similar to "invalidate()" function?.
Thanks
...
Hi iam trying to retrieve the domain name of a machine using the following code
//if(FAILED(DnsQueryConfig(
// DnsConfigPrimaryDomainName_UTF8,
// FALSE,
// NULL,
// NULL,
// cszDomainName,
// &size
// )))
//{
// //break;
//}
//LPWSTR lpcszContent ...
I have this api routine that I use regularly to capture dos output. Recently a strange bug has been found where it doesn't seem to allow dns calls. For instance nslookup will return the "No response from server" error with Server: UnKnown. Ping will work if you supply it an IP address, but not if it has to make a dns call. This problem i...
I know how to do this in .Net but in native Win32, how does one dock a control. I'm trying to dock a trackbar I made like vlc's trackbar.
Thanks
dock it to the bottom of its parent window
...
How can I get the username of the process owner (the user who is executing my program) in C++?
...
In Windows I would like the C++ command or reference that would get the "tasklist" in C++ and output it to a buffer?
...
Does anybody know how the NdrClientCall2() function in rpcrt4.dll can be called in code or how it can be used?
We've gone through the MSDN help -
http://msdn.microsoft.com/en-us/library/aa374215(VS.85).aspx,
but didn't get any examples/samples how to use this function.
Please provide help.
Thank you.
...
Is there a way to convert a HDC to a wxDC object? I know wxDC is abstract. Is it possible to convert to wxClientDC?
...
hello!
All these years i have been successfully using EnumServicesStatus in combination with OpenScManager (with SC_MANAGER_ENUMERATE_SERVICE) to get a list of the services installed on a computer. This has been working well since NT 4 and up to Vista.
Now, for some reason, in Windows 7 I'm not getting the whole list of the installed s...
How can I get the caption of ListBox control.
I have handle to Listbox control.
I tried with following , but it returned empty string
SendMessage(hListBox,WM_GETTEXT,MAX_PATH,(LPARAM)wszCaption);
Any suggestion of how to get the caption associated with ListBox.
...
I am trying to find the handle to a dialog as soon as it opens.
Now as soon as dialog is opened I try to call FindWindowEx for that dialog in a separate thread but it returns NULL.
I then put some sleep before calling FindWindowEx. It works some time after putting sleep.
It looks like FindWindowEx is getting called before even dialo...
Hello,
I'm writing a game engine and I need a way to get a precise and accurate "deltatime" value from which to derive the current FPS for debug and also to limit the framerate (this is important for our project).
Doing a bit of research, I found out one of the best ways to do this is to use WinAPI's QueryPerformanceCounter function. G...
I implemented a wizard using property sheet. One one page I display tooltip if user enters something invalid. It is a tracking tooltip so I have to manually turn it on and off. Now I want to move the tooltip when the wizard page moves.
It seems that only the property sheet window receives WM_MOVE event from Windows. The page does not. I...
When I configure GFlags to show loader snaps on an image MYEXE.exe and run the executable from windbg I get loader snaps output in the debug window. But when I use windbg to attach to the process already running I do not, even though I enabled loader snaps before the process was started. How can I get loader snaps to work when attachin...
I want my application window to be in a certain spot in the window hierarchy. That is, say I have 3 windows on my desktop. At the very bottom I have Word, the window on top of word is explorer, and the active foreground window is itunes. I want to place my application window on top of word but beneath explorer. How can I achieve this wit...