I was wondering if there is a way to extract an Image object from a Cursor object in Java.
A use for this would be for instance :
Image img = extractCursorImage(Cursor.getDefaultCursor());
Which you then can draw on a toolbar button (that's the purpose I want it for).
...
So yea, im working on a windows system and while this works locally, know it will break on other peoples servers. Whats a cross platform way to do the same as this
function fetch($get,$put){
file_put_contents($put,file_get_contents($get));
}
...
It a is a c# winform app. I've set ShowInTaskbar prop to false because I don't want the program to appear in taskbar, but like this SetForegroundWindow or ShowWindowAsync don't work.
...
I am reading the NOTIFYICONDATA documentation in MSDN.
It says the NOTIFYICONDATA structure has a cbSize member should be set to the size of the structure, but NOTIFYICONDATA structure's size has different size in every Shell32.dll, so you should get the Shell32.dll version before setting cbSize.
The following quotes from MSDN:
If i...
I tried to write a Utility Manager application, and I am trying to test it on WinXP SP3.
I added it to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Accessibility\Utility Manager, and it works well when loading the utility manager when I am logged in.
However, when I try to load it from Utility Manager at startup befo...
I've found nice examples using C++ (http://www.codeproject.com/KB/tips/resswitch.aspx), but not in C#.
Can someone help, please?
Edit:
The exact function that list the video modes is:
BOOL CVideoModes::GetAvailableVideoModes(CAvailableVideoModes& modes)
{
modes.SetSize(0, 5);
int i=0;
DEVMODE dm;
while (EnumDisplaySettings(NU...
So, I'm writing a text editor, using MDI.
I have a frame window, child windows and each child window has a text-area window.
Now, my problem is the pointer. It's not setting itself to the correct bitmap. So for example, if I move the pointer to the border, it correctly turns into the left-right drag icon. That's all good and well - ...
We are developing a skinned app with various rounded edges on most of its windows. I am using window regions to define non-rectangular shapes, but nearly everyone objects to the jagged aliasing this causes, because pixels can only be either fully opaque or fully transparent.
I've come up with a solution to this using layered windows, b...
I know there are startup folders and certain registry keys I need to look into. But how to do that using Windows API? I'm interested to know for Windows XP and Vista. Thanks for your time.
...
To attach a winforms dialog on Microsoft Wordpad toolbar/menubar?
...
I need to know how big a given in-memory buffer will be as an on-disk (usb stick) file before I write it. I know that unless the size falls on the block size boundary, its likely to get rounded up, e.g. a 1 byte file takes up 4096 bytes on-disk. I'm currently doing this using GetDiskFreeSpace() to work out the disk block size, then using...
Exact Duplicate
Initialize Critical Section only once for a process
I have a dll that creates a global critical section, initializes and use it.
Now a third party application is using / loading the dll more than once which leads to a heap corruption.
The appverifier warns me with a
-->
VERIFIER STOP 00000211: pid 0x1470: Critic...
I'm having a problem on Vista with the Listview control, in particular setting custom icons on the header. Normally under XP or any of the previous version of Windows, if I added an icon (in C++), I could do so with the following:
HeaderItem.mask = HDI_FORMAT | HDI_IMAGE;
Header_GetItem(HeaderHWND, Column, &HeaderItem);
TurnOn(Hea...
I'm wondering which approach is faster and why ?
While writing a Win32 server I have read a lot about the Completion Ports and the Overlapped I/O, but I have not read anything to suggest which set of API's yields the best results in the server.
Should I use completion routines, or should I use the WaitForMultipleObjects API and why ?
...
If I have the following interfaces and a class that implements them -
IBase = Interface ['{82F1F81A-A408-448B-A194-DCED9A7E4FF7}']
End;
IDerived = Interface(IBase) ['{A0313EBE-C50D-4857-B324-8C0670C8252A}']
End;
TImplementation = Class(TInterfacedObject, IDerived)
End;
The following code prints 'Bad!' -
Procedure Test;
Var
A : ...
I have a COM API foo, the IDL looks like:
foo([in] unsigned long ulSize, [in, size_is(ulSize)] unsigned char* pData)
when I consume this function with foo(0,NULL);
I get an error - NULL argument passed. Is there a way to workaround this?
...
I am not well acquainted to the compiler magic. The act of transforming human-readable code (or the not really readable Assembly instructions) into machine code is, for me, rocket science combined with sorcery.
I will narrow down the subject of this question to Win32 executables (.exe). When I open these files up in a specialised viewer...
I was wondering if there's some sort of system event that gets fired every time a user changes the time in Windows. I know there's a way to enable this in Windows' EventLog, but I was looking for a way to respond to this event programatically (like using the Windows API).
...
I"m working on a C++ Win32 application for which I'm trying to essentially "auto detect" if a device has been plugged into one of the RS232 ports and then if it has been disconnected.
The checking for a connected device is easy enough because my use case allows me to assume that this particular thread will be the first to try to initiat...
Question:
How to display the value of a C++ iterator using WinDbg, illustrated below:
for (vector<string>::iterator i = args.begin(); i != args.end(); i++)
//omitted
//for instance:
} else if (*i == "-i") {//attempting to display the value of *i
++i;
if (!::PathFileExistsA(i->c_str()))
{
Note:
Using ?? evaluate C++ expression ...