I'm unsure of the syntax for this. I'm trying to translate this C# code into F#.
struct LASTINPUTINFO
{
public uint cbSize;
public uint dwTime;
}
public class IdleTimer
{
[DllImport("User32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
private static extern bool GetLastInputInfo(ref LASTINPUTINFO plii);
}
This i...
Hello,
I have a simple Win32 GUI app which has an edit control in the main window. If I write:
printf("Hello world!\n");
I would like the text to appear in that control instead of the console. How to?
Update: The app is just simple window with edit control and I can compile it with or without displaying the console (gcc -mwindows). ...
When I invoke my Perl scripts in the Windows environment without invoking perl first, the parameters are not passed to my script.
For example,
C:\> C:\my-perl-scripts\foo.pl bar
invokes foo.pl but doesn't recognize bar as a parameter (@ARGV is empty). However,
C:\> perl C:\my-perl-scripts\foo.pl bar
works as expected.
Is this a ...
Hi all! it's a very newbie question but after 3 hours of looking after it i'm done with google-ing for today....i'm using a code i've found and it uses Win32, it's says "The Name 'Win32' does not exists in the current content" - what am i missing? how to call\declare win32?? Thank you all, Amit.
public class TransparentTextBox : TextB...
Hello,
My application (C++ WinAPI) creates an icon in the system tray. I have set a tooltip text for this icon, so that when a user places a mouse cursor over the icon, this text shows.
But I want to programmatically show different balloon notications when certan events occur and at the same time keep that behavior of showing the const...
I have a third party dll that I want to change the symbol names. Is this possible? I dont want the competition to know what component my product uses. I don't have the source for the dll.
...
< I have reviewed the "related questions" shown by SO before posting this >
Scenario :
Drag and drop initiated from a control within a WinForm.
note : all drag and drop code validated, carefully tested. I can use the code right now
to create/write a file to the Desktop when the mouse is released.
Drag goes outside the Form, mouse goe...
HI
I'm developing in the WIN32 environment, for windows mobile, and experiencing a few problems -
I have keys that have both numbers and letters, but no matter if i press the 'function' key i always get the numbers
my program does not recognize * and # clicks.
Debugging it, i got to the WndProc method, which was registered in the MyReg...
I want to get the height and width of a .cur file without look into its format.
I try to use LoadCursorFromFile() to get a HCURSOR, I suppose there is a API function to obtain the HCURSOR infos, but I find that GetCursorInfo() is not I want at all.
Is there any way to get the height and width of a HCURSOR object?
...
I have a C++ RAII class for managing Win32 HANDLEs using boost::shared_ptr<> that looks a bit like this:
namespace detail {
struct NoDelete { void operator()( void* ) {}; };
}; // namespace detail
template< typename HANDLE_TYPE, typename HANDLE_DELETER >
class CHandleT
{
public :
explicit CHandleT( HANDLE_TYPE handle, bool delete_o...
I have a Perl script running that acts like a service, one of the things I do with it is use it to spawn other processes. Some of these processes are executables and some are perl scripts.
At times I want to set the processor affinity on some these processes. I use SetProcessAffinityMask to do this, for the executables everything wo...
I am reviewing code which creates a lot of threads. CreateThread documentation on Windows says that a all thread creation calls are serialized within a process. To estimate the performance impact of such code, I wonder how long does CreateThread take to run? I understand this depends on the number of DLLs already loaded into the process,...
I'll start with
GNU utilities for Win32.
Per tool per post please.
thanks.
...
I need to zip and unzip the directory hirarchy in Windows Mobile using C++/C#. What is
the simplest library available for it?
I have googled many times. I found some stuff, but I am not able to go ahead with it.
If you have implemented or if you know some stuff about it please let me know.
...
HI
I'm trying to create an application in the Win32 environment containing more than one window.
How do i do that? all the Win32 Tutorials on web i found only showed how to manage one window.
How do i create the second window, and how do i handle messages for both of them together?
(i understood i'm supposed to have only one message loop...
Hi,
folks can you provide me the tutorial link or .pdf for learning basic COM?.
i do google it.. still i recommend answers of stackoverflow so please pass me..
Thanks
...
Hi - I'm developing in C code that uses the Win32 Api to create multiple windows.
I used createWindow twice - to create parent and child windows.
i have a message loop
while ( GetMssage (&msg, NULL,0,0)){
.
translate
dispatch
.
}
But i only get the WND_Proc function called once, instead of twice for each of the windows.
What am i d...
Hi. I asked a question, and some people commented that my question wasn't clear,
So here is a new one.
I'm trying to create an application with multiple windows using the WIN32 API.
I created two windows, one is a child of the parent. Then i have a message loop,
But unfortunately only the parent WndProc gets message, while the child ...
all day I'm trying to get EnumThreadWindows working, but I always get a Wrong Parameter-Error
although my code is nearly the same as on pinvoke.net!!
dont know why this doesnt work:
public static IntPtr FindMsgBoxFrom(IntPtr MainHWND)
{
SetLastError(0);
uint ThreadID = GetThreadID(MainHWND);
E...
Hi, I'm trying to change the input mode to a given window.
Searching i found the Edit_SetInputMode function, but when i run it, it always returns 0 ( fails) .
The MSDN documentation doesn't seem be to revealing... Any ideas anyone
Thank you
Dan
...