When creating a control (e.g. an edit control) on the fly using CreateWindow, it usually starts out with an ugly (boldish sans serif) font.
Usually I wok around that by grabbing the parent dialog's font, and setting it to the control - I can't even say if this is a good idea.
How do I "legally" fetch the right font?
...
When we send a message, "if the specified window was created by the calling thread, the window procedure is called immediately as a subroutine".
But "if the specified window was created by a different thread, the system switches to that thread and calls the appropriate window procedure. Messages sent between threads are processed only wh...
Hi!
I want to use the systems available windows media player visualizers in my app. Apperently visualizers expose an IWMPEffects interface to the world. My question is how do I enumerate and create instances to the available visualizers on my system? Probably it's just a process of getting the cslid of the visualizers and then create th...
I'm want resize window using WinAPI. I use WinAPI function
SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int x, int y, int cx, int cy, uint uFlags);
Window is resized, but window content is not redrawed. If I resize this window using mouse, content redraws. How to resize window using WinAPI with content redrawing?
...
I'm trying to get a window handle on a child window in my process and the only information I have is the window class name. Are there any win32 functions I can use for that? I'm doing this from C#.
A bit more detail: This is a Visual Studio plugin, written in C#. So my process is visual studio, which has lots of windows. One of them ha...
I have a very frustrating bug in an application I am working on. The routine is supposed to do something in one window, and then return focus to the other at the end of the method, but when I started to use a large data set the other day, the focus stopped returning at the end. I stepped through the code one line at a time, and the error...
i need to clear the data on serial port when i have read the data from it before i read the data again? i m using c/c++ on windows xp
how can i do so ?
thanx in advance.
...
We are just about to start a new project. The Proof of Concept (PoC) for this project was done simply using Win32. The plan is/was to flesh out the PoC, tidy the uglier parts and meet the requirements set by the project owners.
One of the requirements for the actual project is 100% code coverage but I can see problems ahead: How can I ...
Hi,
I'm having an issue when calling 32 bit delphi dll's from c# web site. The code generally runs fine, but occasionally I get an error Unable to load DLL '': The specified module could not be found. (Exception from HRESULT: 0x8007007E). This issue persists until I recycle the app pool for the site, and then it works fine again.
On t...
In C# (.Net) you can create a panel and set autoscroll to true. you can then add controls into it, including beyond it's size, then it will scroll.
I was wondering if when using the real WinAPI in c++ (not .net) how one could acheive the same result.
Must I keep track of the controls inside and move them all when I scroll or is there a...
would Intel(R) VTune(TM) Thread profiler be able to tell if threads synchronization was successful? I'm never profiled any application, where do i start?
...
I'm using a JTree to browse the content of a folder and I want that when a user click on a file, the software shows a preview of it (a screenshot of its first page).
The files are mostly Office documents and PDF.
I manage to do it for PDF file using a module downloaded from Sun, but I'd like to know if there is a way to do it using any...
hi I have to write a windows api code that encrypts a file by adding three to each character.
so I wrote this now its not doing anything ... where i go wronge
#include "stdafx.h"
#include <windows.h>
int _tmain(int argc, _TCHAR* argv[])
{
HANDLE filein,fileout;
filein=CreateFile
(L"d:\\test.txt",GENERIC_READ,0,NUL...
How can i convert from a Unicode path name (LPWSTR) to the ASCII equivalent? The library that gets called understands only c strings.
Edit:
Okay, I took the GetShortPathName and the WideCharToMultiByte suggestions and created that piece of code, i tested it with some folders containing Unicode characters in the path and it worked flawle...
I'm trying to resolve an issue that I brought up at the end of the investigation into SHBrowseForFolder and folder shortcut browsing: I cannot figure out how IFolderFilter's member function ShouldShow should work to filter out everything but folders and folder shortcuts.
I haven't found much documentation on this and my current solution...
Hello.
I am thinking about elegant way to encapsulate WinAPI callbacks inside a class. Suppose I am making a class handling asynchronous I/O. All Windows callbacks should be stdcall functions, not class methods (I need to pass their addresses to ReadFileEx WinAPI function for example). So, I cannot just pass method addresses as a callba...
I want to have my app which is minimized to capture data selected in another app's window when the hot key is pressed. My app definitely doesn't have the focus. Additionally when the hot key is pressed I want to present a fading popup (Outlook style) so my app never gets focus.
At a minimum I want to capture the Window name, Process ID...
HI
i want to search for a hidden files and directories in a specefic given path but I don't know how to do it for hidden files i do know how to search for normal files and dir i did this code but im stuck can't make it search for only hidden files
#include "stdafx.h"
#include <windows.h>
int _tmain(int argc, _TCHAR* argv[])
{
TCHA...
Hi all,
Trying to build the OCaml Win32 API binaries for OCaml 3.11.0 on Win 7 and I consistently get a message when I try nmake dynamic: 'cannot open input file "ocamlrun.lib"'. My google skills seem to be failing me--is there something I need to do to get this .lib file? It doesn't seem to be part of the libraries which are included...
hi I made a code that search in a givin path for a certain file name or folder and print the value BUT now how can i modify it to instead of printing its name perform on of the operations ( delete,copy,rename ) I searched on google and found nothin.
#include "stdafx.h"
#include <windows.h>
int _tmain(int argc, _TCHAR* argv[])
{
TC...