Category : gdi

I’m using windows.h "TextOutW" function to print text to a bitmap. Printing regular ascii is really fast, but the printing in the unicode range seems to cause a huge slowdown. Here’s my code to print a unicode square: wchar_t b = 0x25A0; LPCWSTR s = &b; for(int y = 0; y < nScreenHeight; y+=12){ for(int ..

Read more

I am developing a module for Windows 10 that manages and applies configuration to connected monitors. With the code below I can clone and extend monitors connected via HDMI, VGA, DP and DVI but I’m having trouble cloning usb-connected monitor that uses the displaylink driver (https://www.displaylink.com/downloads). Of course this works if I use the Windows ..

Read more

I’m using gdi+ bitmap to load unsupported image files and then convert it to QImage. There is code: QImage cover; Gdiplus::GdiplusStartupInput gdiplusStartupInput; ULONG_PTR gdiplusToken; GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL); Gdiplus::Bitmap * bitmap = Gdiplus::Bitmap::FromFile(L"cover.png"); HBITMAP handleToSliceRet = NULL; bitmap->GetHBITMAP(Gdiplus::Color(0, 0, 0), &handleToSliceRet); // <- At this line used memory increase by ~5mb! QPixmap pixmap = QtWin::fromHBITMAP(handleToSliceRet); // ..

Read more

What are those things in the red circles called? (I think) they are MDI Clients. My question is, how do they get messages from mouse and keyboard in MDI clients? I couldn’t get them working (but I managed to draw shapes in them), how do they do this? I’m using Borland C++Builder as my compiler. ..

Read more

I would like to make coordinate system. I made the lines, and the windows to be scalableso it draws the scene real time. When I draw the lines it work just as I intended, but when I add even a single number the program slows down, and when I try to resize the window it’s ..

Read more

i found a code on github which takes a screenshot and saves it as a jpeg file. I copied and pasted it in notepad++, saved it, and compiled it with the following command: g++ -mwindows screenshot.cpp -lgdiplus and faced the following error: C:UsersUSERAppDataLocalTempccTLI53G.o:screenshot.cpp:(.text+0x158): undefined reference to `[email protected]′ collect2.exe: error: ld returned 1 exit status it ..

Read more