

get user desktop device context to get pixels fromī = sizeof(BITMAPINFOHEADER) ī = -wBmpHeight ī = BI_RGB ī = wBmpWidth*wBmpHeight*3 BYTE *pPixels = new BYTE īYTE *pPixels = new (std::nothrow) BYTE allocate width * height * 24bits pixels WBmpHeight = (WORD)pbmiInfo->bmiHeader.biHeight WBmpWidth -= (wBmpWidth%4) // width is 4 byte boundary aligned. WBmpWidth = (WORD)pbmiInfo->bmiHeader.biWidth GetObject(pBitmap, sizeof(bmpBmp),&bmpBmp)

bitmap info will hold the new 24bit bitmap info a bitmap object just to get bitmap width and height type:ICON, name:1, language:0x0409 IīYTE* Get24BitPixels(HBITMAP pBitmap, WORD *pwWidth, WORD *pwHeight) I also tried to change the id of the controls also no resultĮrrorĒ1 error CVT1100: duplicate resource. rc file, there are no mentions of the same name in other ffile I tried include only one icon, but still I got the error. To make it more clear: I have checked the id of the items. Note 2: I wanted to create buttons with icons, but now I realize there is possible to create tool bar, but I would need the toolbar be extra small and not to be moveble, but fixed on a page. Note: the icon is not standard size, it is 13x13 It is transparent ico (normally displayed in explorer in Windows). I used this convertor to create ico file from png: type:ICON, name:1, language:0x0409ġ>LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corruptĭo I do it correct or the file is really corruped?

Or if the other program is open source and whose license lets you modify the code, then it would be better to change the original code to support what you need to do.1>CVTRES : fatal error CVT1100: duplicate resource. Personally, though, I would try to get in touch with the original author of the other program to see if they have extension points. You could say, the learning curve for the Windows UI automation APIs is too steep, and just learn how to script things using AutoHotkey. This is the basis for a lot of the assistive technologies which help people with disabilities be able to use Windows programs. Let the Windows UI automation do all the hard work of finding the other process' screen elements and do the inputs that you would have had to write in Approach 1. NET assembly, and then once loaded to execute it. The objective is for the injected code to then get into the managed space of the other process and effectively call LoadAssembly() to load your. Then you need write some assembly, C, or C++ code to do some DLL injection to inject some code into the process space of that other program. NET assembly which does all the DataGridView manipulations. Essentially page scrape the DataGridView using multiple calls to EnumWindows() and GetWindowText(), and then use the Win32 input APIs to change focus to the appropriate cells and enter new text.
