Questions tagged [wm-paint]

WM_PAINT is a central message in the classic Microsoft Windows API.

The WM_PAINT message is central in the classic Microsoft Windows API. It is sent to a window when it needs to redraw (a portion of) its content.

77 questions
0
votes
0 answers

Painting over a transparent window in Windows

I wish to paint over a window created with the styles WS_EX_TOPMOST|WS_EX_TRANSPARENT|WS_EX_LAYERED, in the WM_PAINT message the window receives. Can I do that? If not what can I do to draw an animation (the content drawn is changed) over a…
tmj
  • 1,750
  • 2
  • 19
  • 34
0
votes
2 answers

Processing WM_PAINT

I have read many examples on the internet but I'm still stuck. I'm trying to process the WM_PAINT message sent to my application. In my application, I always draw in the same DC, named g_hDC. It works perfectly. When WM_PAINT is received, I just try…
vfloyd
  • 17
  • 3
0
votes
2 answers

Is it necessary to invalidate update region before painting in the window

Is it necessary to invalidate the update region before immediate painting (in response to a user action) if I use Direct2D? Or is calling RenderTarget::BeginDraw() enough? I need to quickly repaint some part of the window outside of the WM_PAINT…
Alex999i
  • 3
  • 2
0
votes
0 answers

NPP_HandleEvent with WM_PAINT message

The Mozilla developer's documentation says: Windows The plug-in receives a WM_PAINT message. The lParam parameter of WM_PAINT holds a pointer to a RECT structure specifying the bounding box of the update area. Some plug-ins will choose to ignore…
Alex Shul
  • 500
  • 7
  • 22
0
votes
1 answer

LPCWSTR will not Cast Correctly on TextOut() Method

Entire Code snippet... #include #include #include using namespace std; //========================================================= // Globals. HWND ghMainWnd = 0; HINSTANCE ghAppInst = 0; struct TextObj { string s;…
Volearix
  • 1,573
  • 3
  • 23
  • 49
0
votes
1 answer

What is to best approach to repeatedly invalidate a window using InvalidateRect?

I need to repeatedly redraw a window showing some form of continous analysis. Now: 1) If I do that in WM_PAINT after the painting, I basically kill everyone else's painting, so it's not usable. 2) If I do that in a timer, it is kind of lagging. So…
Vojtěch Melda Meluzín
  • 1,117
  • 3
  • 11
  • 22
0
votes
1 answer

I lose the functionality of button when I changes him background

I tried every source to replace the background of button by implementation subclassing. When I change the background, i got a square shape and impossible to click it. somebody can share a good tutorial or sample of code? anyway, this is my…
Itay Avraham
  • 329
  • 1
  • 3
  • 15
0
votes
1 answer

GradientFill API doesn't perform as it should

INTRODUCTION AND RELEVANT INFORMATION: I want to create a static control with gradient background. I want to do it the following way: Create the gradient at the main window’s background, and then place transparent static control on top of that…
AlwaysLearningNewStuff
  • 2,939
  • 3
  • 31
  • 84
0
votes
2 answers

WM_PAINT and non finished COM calls (ATL OOP Server "Deadlock")

We have developed an STA ATL COM OOP Server and all works fine, almost. We are facing a problem: As the COM client internally gets the result of any COM call through a windows message the WM_PAINT message (or any other message i guess) can be…
0
votes
1 answer

Animation with VCL Component (WM_PAINT)

The problem is OpenGL animation stops while any mouse button is clicked on the TForm component (border, caption ..). As soon as the mouse button released the animation goes on. // Drawing Scene void TMainForm::DrawGLScene() { …
Gestalt
  • 1
  • 2
0
votes
1 answer

WM_PAINT Bitblitting multiple times?

This is for C++ - win32. Basically I've loaded an image (bmp) into a HBITMAP from a file and bitblitted it to the device context for the main window. How would I call it again in case I want to change the image? I've called InvalidateRectangle() and…
user1255454
  • 669
  • 1
  • 8
  • 18
0
votes
1 answer

How to control the painting of the player

I am trying to draw something on a live video. The best way to do that in my opinion is to handle the WM_PIANT event. My purpose is to make the player draw first and after that the application. That way I will be able to draw on the video. It means…
Matan Givoni
  • 1,080
  • 12
  • 34
0
votes
3 answers

What could cause my C++ win32 app to run in the background?

I have been working on this app for at least 3-4 months and just recently it hasn't been working. It started today, because yesterday it was running fine and smooth. Now it runs, but the window doesn't become visible(I checked the process list in…
Joseph Meadows
  • 160
  • 2
  • 8
-1
votes
0 answers

WM_PAINT not triggered on runtime created component

I created a simple little unit that gives the basic TEdit component the ability to display a colorizable border. Essentially, it is: type TEdit = class(StdCtrls.TEdit) private FBorderColor: TColor; FUseCustomColor: boolean; procedure…
Needback
  • 15
  • 2
-1
votes
1 answer

How to read content of WM_PAINT message?

My goal is to screen-scrape a portion of a program which constantly updates with new text. I have tried OCR with Tesseract but I believe it would be much more efficient to somehow intercept the text if possible. I have attempted using the…
Ethan Kershner
  • 121
  • 3
  • 13