I am using a crude system to control a Flash movie from a C++/win32 program by sending WM_MOUSEMOVE events directly to the Flash window. It works well for one axis: SendMessage( m_targetWindowHWND, WM_MOUSEMOVE, 0, xpos); However I'd like to now send both x and y values. I know these are packed into a WM_MOUSEMOVEs lparam. In C++ this could be unpacked with MAKEPOINTS or GET_X_LPARAM/GET_Y_LPARAM. But how do I pack the x and y, basically doing the reverse of the macros above. My guess: DWORD packed = y << 8 + x; Thanks
I got an old application which was written in a C++. I have 0 experience with it but I am suppose to make some changes in app. One of them is to change some text. Problem is that part of updated text needs to be bold, but i have no idea how to do that. I googled but with no much success. Only think I now is to go to new line with \nand new tab with \t. Any clever advise? EDIT: Example of code: BEGIN STRING1 "First Example" STRING2 "Second Example" And place where STRING1 is used: // WelcomeTip ---------------------------------------------// LPSTR idsWelcomeTip = (LPSTR)GlobalAlloc(GPTR, sizeof
I have a win32api application written in c here. All controls in main window are created manually like this: hEditSource = CreateWindowEx(WS_EX_CLIENTEDGE, L"EDIT", NULL, WS_VISIBLE | WS_CHILD | WS_TABSTOP | ES_MULTILINE | ES_READONLY, someLeft, someTop, someWidth, someHeight, hWndMain, NULL, hInst, NULL); At first I didn't apply IsDialogMessage test in main message loop so all controls' tab stop won't work. Now I have it done, every control are OK except the multi-line textbox above. Indeed nothing happens when press tab in it. No focus moving, no tab charactor inserting(it will discard read
What I need I need to get the DC of a Firemonkey component's TCanvas. I need this to use Win API drawing functions not accessible through Firemonkey, mainly 100% control over font rendering. Obviously, this is a pure Windows Application, so any compatibilities with OSX isn't an issue. What I did I managed to get hold of the TForm's handle and convert it into a HWND, then getting the DC with GetDC(FmxHandleToHWND(Handle)); This is the OnPaint handler for the Character_PaintBox control. HWND hWND = FmxHandleToHWND(Handle); HDC hDC = GetDC(hWND); int x = PreviewBack_Rectangle->Position->X +
I have a problem with unicode filenames appearing as question marks in my edit boxes. When I paste unicode characters in an edit box, for example Arabic or Thai, they show correctly, but after I run this code, they become question marks. How come? WCHAR buf; GetWindowTextW(hWndEditBox, buf, 100); SetWindowTextW(hWndEditBox, buf); Another thing - the project is ANSI (we have code that can't be ported so the entire project stays ANSI), i.e. _UNICODE macro is undefined, but I explicitly use the Unicode versions of the filenames.
I have to check if the Airplane Mode is enabled in Windows 8 and maybe switch its state. I am currently working on a C# .NET 4.0 Windows Forms application but the answers in this question shouldn't be limited by that.
I have a C++ program. It's quite simple - shows an image (splash screen) and launches another application, then closes when that other application is started. Actually, this one: http://www.olsonsoft.com/blogs/stefanolson/post/A-better-WPF-splash-screen.aspx with very minor changes (my splash screen image and my program is launched instead of the sample one). It works good on my Windows 7 developer machine. Also it works on another (virtual) machine with Windows XP SP2 and Visual Studio 2008 installed. But it doesn't work on just the same virtual Windows XP SP2 machine without Visual Studio
I have a win32 application. Trying to run in windows 7 64-bit OS in VisualStudio 2008. Have installed x64 Environment. So when i'm trying to run my project i'm getting this error "the application was unable to start correctly 0xc00007b". I have no link errors too. Anyone any suggestions please.
I have a Delphi application A, which I need to control from a .NET application B. Among other things, I need to automate this process: User selects item X from a combo box. Application A notices the change and reacts by displaying a certain panel. This works fine, if I do it manually. But when the application B selects a combo box value, no panel is displayed. This is the problem. Potential cause of it: When I select a combo box item, a certain windows message is fired. Some Delphi routine reacts to this message. When I select a combo box item programmatically, the only message I send is CB