I am trying to get my toolbar to work with an ImageList. The images are individual PNGs, so I was adding them in the ImageList in succession, Bbt it wasn't working. Here is the code to add the Image to the ImageList:
HIMAGELIST CreateToolBarImages(HINSTANCE hInst)
{
HIMAGELIST v_ImageList = NULL;
// IMAGE_LIST v_Img;
HICON h...
I am working on Win32 dialogs with various controls like Static Text , Checkbox etc and all the strings need to be localized for different languages.
I have designed the dialogs for US intl . But when I put localized strings those, not fitting properly and I have to change layout for each intl.
Is there a better way to do this?
Can I c...
Im trying to make a tool for my end users that can create a MiniDump of my application if it hangs (i.e. external to the app). Im using the same code as the internal MiniDumper but with the handle and processid of the app but i keep getting error code 0xD0000024 when calling MiniDumpWriteDump. Any ideas?
void produceDump( const char* ex...
Hi,
I have a program that uses gethostbyname (in Windows) in order to convert IP address to hostname.
But, it works only for IPv4...
What is the correct replacement for IPv6?
Thanks.
...
I want to use WPF windows in a legacy win32 application.
I'd like to behave them in a similar way, like the WPF window always being displayed on top of the win32 window.
For this I'd like to set the owner of the WPF window to the win32 windows, but I got no idea how to achieve this.
Any help here?
Since the answer is hidden behind so...
I am trying to retrieve the monitor ID's as shown in the Windows display properties (#1, 2... etc), but I can't seem to find a way. I have tried using EnumDisplayMonitors as well as EnumDisplayDevices. They both return something like "\.\DISPLAY1". However, this number doesn't always match the number shown by Windows, especially when 2 v...
I am capturing output of windows program using following function:
public static Bitmap Get(IntPtr hWnd, int X1, int Y1, int width, int height)
{
WINDOWINFO winInfo = new WINDOWINFO();
bool ret = GetWindowInfo(hWnd, ref winInfo);
if (!ret)
{
return null;
}
int curheight = height;
if (curheight <= 0 |...
Many Windows applications (games, web browsers, some editors, etc.) support fullscreen mode, in which the application's client area covers the entire screen.
As a Win32 developer, I have always implemented full-screen by
removing the window's frames and title bar, and
setting the window's position to (top, left, width, height) = (0, 0...
I'm having a problem localizing the Task Links for a Control Panel applet on Windows Vista (http://msdn.microsoft.com/en-us/library/cc144188(v=VS.85).aspx#localizing_links).
This is the part of my XML file where I define the task:
<sh:task id="{3DC35DFB-B037-4148-B351-7959EE034D92}">
<sh:name>@MyApplet.cpl,-101</sh:name>
<sh:keywor...
In Microsoft Windows, this works:
mnu := GetSystemMenu(h, false);
EnableMenuItem(mnu, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
But this does not work:
mnu := GetSystemMenu(h, false);
EnableMenuItem(mnu, SC_MOVE, MF_BYCOMMAND or MF_GRAYED);
Hence I know how to disable the "Close" system menu item of a window, but not the "Move" ite...
Hello everyone :)
I've got a moderately complex iterator written which wraps the FindXFile apis on Win32. (See previous question) In order to avoid the overhead of constructing an object that essentially duplicates the work of the WIN32_FIND_DATAW structure, I have a proxy object which simply acts as a sort of const reference to the sin...
I'm binding a client TCP socket to a specific local port. To handle the situation where the socket remains in TIME_WAIT state for some time, I use setsockopt() with SO_REUSEADDR on a socket.
It works on Linux, but does not work on Windows, I get WSAEADDRINUSE on connect() call when the previous connection is still in TIME_WAIT.
MSDN is...
Hi!
I'm working on a Project with outdated, very old looking GUI (the used GUI framework is more than 10 years old)
Since the used programming language is Eiffel, there are almost no good libraries for GUI development. Although Wrappers for C libraries exist, it's not that easy to wrap something like Qt with them.
The current GUI frame...
For instance I have a main dialog, when I click a button a smaller dialog appears next to it. But it would be neat if the small one could somehow transition in, rather than simply appear. For instance using transparency, or zooming in, or sliding in from width=0 -> full-width.
Making an actual dialog do such things isn't too hard, but w...
Hi all,
I am writing an app, which needs to take the screen shots automatically (just like pressing PrintScreen button). So please suggest me how to get this done. A raw 24 bit BMP image would suffice.
PLEASE NOTE: My app is in C, so any win32 APIs that can be called from my code is what I am looking for.
(Sometimes back I had got an e...
I have some Linux code that monitors our hardware by collecting temperatures, voltages, and fan speeds, from the motherboard using inb(), outb(), inl(), etc. low level i/o functions.
My challenge is to port that code over to run under Windows as a simple console app. But am puzzled in what functions Win32 (or .NET) provide that allow m...
Any combo box I create seems to be stuck at 12 dialog units in height. Microsoft's guidelines for spacing and sizing of controls in dialog boxes state that a combo box should be 14 dialog units high.
I have even tried editing the resource file in notepad and recompiling in Visual Studio without opening the resource editor - but the com...
I'm still having issues justifying TDD to myself. As I have mentioned in other questions, 90% of the code I write does absolutely nothing but
Call some Windows API functions and
Print out the data returned from said functions.
The time spent coming up with the fake data that the code needs to process under TDD is incredible -- I lite...
I would like to know whether it is possible to enumerate file handles in c#, maybe using Win32API. This is easily done for window and process handles, but it seems that it is not possible for file handles.
While some functionality is offered by NtQuerySystemInformation, this is being phased out and therefore it is not recommended to us...
On my Windows 7 system, the GetVersionEx Windows API function returns "6.0", indicating Windows Vista, when it should return "6.1".
If it matters, I used the following Delphi code:
function winver: string;
var
ver: TOSVersionInfo;
begin
ver.dwOSVersionInfoSize := SizeOf(ver);
if GetVersionEx(ver) then
with ver do
result...