Windows Vista and Windows 7 display semi-transparent forms when Aero is activated. And some screen-taking applications such as WinSnap or Windows Clippings are able to capture those windows as a semi-transparent PNG image. What Windows API are they using to obtain such a beautiful capture ?
...
I am trying to load high resolution image(like 3264x2448). For that I am using IImageFactory class in C#. IImageFactory is downloaded from the Microsoft site. If I try to load the high resolution image I am getting “out of memory” exception. Have a look at the below sample:
IImage GetIImage(string fileName)
{
Bitmap bitmap = null;
Gra...
I added this code to my web page:
<input id='argh' type='text' onfocus='this.value=7'>
Unless the browser window is active, the focus event does not seem to fire (using the 'focus' command) from Selenium:
# [info] Executing: |waitForElementPresent | argh | |
# [info] Executing: |focus | argh | |
# [info] Executing: |verifyValue | arg...
if i use textout("this text") with a particular font/style, i want to find out the (x,y) coords of 't' 'h' 'i' 's' chars.
i cant use the printer route. how else can i obtain the individual x,y coords.
...
I have a plugin for a c++ MFC app. I'm working with the developer of another plugin for the same app, that's trying to get notifications of events in my code. Both plugins are in the form of c++ dlls.
How can I pass messages from my plugin to his plugin? The solution needs to be robust to mismatched versions of our two plugins, as we...
Hi,
i am creating .cab file installer for windows mobile application,
problem is i need to keep the 90X90 .png image as icon for application.
as per the link
i tried to load the icon,step am following are
1) writing the icon path to registry
2) then loading the icon...
i followed the step mentioned above link,
but the problem is i...
Is there any way to get a control's name through win32api? (c++)
I'm talking about the property that in C# is 'Name', like 'frmMain', or 'btnNext'.
Is there any way to retrieve this data through the win32API?
I've tried GetWindowInfo() and stuff but I think I'm not heading in the right direction..
thanks
edit: I'm iterating with Enu...
Usually, when a user holds the mouse pressed over a button, moves the mouse away from the window, and then releases it, the button can tell that the mouse has been released even though the release has actually occured outside the window.
When I inspect mouse clicks in my window, how can I imitate the same behavior?
When a mouse button ...
I am making a dll that controls a dialogue box. I like to get a certain area to have red text. This code does compile, but the effect is not seen. Here is the area where the dialogProc is done:
LRESULT CALLBACK DialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
switch(message)
{
case WM_INITDIALOG:
...
Environment: Visual Studio 2008, Visual Studio Feature Pack, MFC Dialog App, Windows XP, New Common Controls.
I'm having a problem with a list control that happens to be on a tab control.
To reproduce the problem simply create a dialog based app. Place a tab control on that dialog, then put a list control onto that tab control. You d...
I can only imagine I'm not searching correctly; this seems like an obvious question to be asked here. My apologies if this is a duplicate.
I'm writing a Perl program that will take a filename as a command-line argument. I need to convert the filename (or the filename with a relative path attached) to an absolute path (specifically to wo...
I need to register a window class, and right after that set some data in it's extra memory section (the one cbClsExtra refers to) before any window of the class is being created. The problem is that SetClassLong expects a HWND in order to identify the class, instead of the class's name or atom.
What's the way to acheive this?
...
Question:
Are there Windows API calls (perhaps NTFS only) which allows one to split a very large file into many others without actually copying any data (in other words, specify the logical breakpoints between joined files, with file names and sizes)?
Examples: SetFileValidData, NtSetInformationFile
Scenario:
I need to programatically...
What is the best way for detecting whether a network interface is a loopback adapter?
The windows API's GetAdaptersInfo and GetAdaptersAddresses state in the documentation that they will return whether an interface is a loopback through the Type (MIB_IF_TYPE_LOOPBACK) but neither of these do for the Microsoft Loopback Adapter at least, ...
hi there ,i m new here . stackoverflow is a good place to help others and being helped.
so i post my problem here.i'va asked quite a few people and find no answers.
thanks
Use SelectObject() on your memory DC to select the bitmap into it.This makes me puzzled.
i read the msdn but still don't konw how to fill the second parameter of Se...
I want to make a screen shot and display it in the window of my program, but so far I have only been able to make the screen white.
What am I doing wrong?
Code:
#include <windows.h>
LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ;
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
PSTR szCm...
Hello,
I've the following piece of code in my program which dynamically links wtsapi32.dll file for session notifications like WTS_SESSION_LOCK and WTS_SESSION_UNLOCK and runs in background. After the first lock/unlock the program hangs and not responding.
Is this a right way of doing explicit linking ?
void RegisterSession(HWND...
How can I make a true full screen mode in VC++?
Code:
#include <windows.h>
LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ;
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
PSTR szCmdLine, int iCmdShow)
{
static TCHAR szAppName[] = TEXT ("screen") ;
HWND hwnd ;
MSG ...
I want to print out a message using MessageBox (or similar). I would also like control over where exactly on the screen the box appears but can find nothing in the description of MessageBox that allows you control over the location. Did I miss something? If MessageBox can not be used, then is there an alternative?
For reasons too comple...
I'm trying to create a function that takes the name of a directory (C:\foo\bar, or ..\foo\bar\..\baz, or \\someserver\foo\bar), and creates directories as necessary so that the whole path is created.
I am attempting a pretty naive implementation of this myself and it seems to be a string processing nightmare. There is / vs \, there is ...