Questions tagged [win32gui]

NOT FOR GENERAL WIN32 PROGRAMMING QUESTIONS (use [winapi])! This is ONLY for questions about the "Win32GUI" library, which is a C++ library for Win32 GUI programming.

Win32GUI is a C++ generic library for Win32 GUI programming.

It features real GUI RAII (Resources Acquisition Is Initialization), event handling, easy manipulation of standard controls, thread-safety and simple menu handling.

865 questions
-1
votes
1 answer

MDI child window creation failing

I have an MDI app, 2 different classes for the child windows. My problem is I can't create an instance of the 2nd if the first is already on screen, but I can do it the other way; if on case ID_OPEN_NEW in WndProc i change the class name to…
cool mr croc
  • 725
  • 1
  • 13
  • 33
-1
votes
1 answer

How to add WINAPI code to MFC?

I had to combine MFC and WinAPI: add WINAPI code to MFC, the following are MFC and WinAPI code: MFC code void MyMFCView::OnCreate(LPCREATESTRUCT lpCreateStruct) { ...... } WinAPI code LRESULT CALLBACK Win32Fun(HWND hwnd, UINT msg, WPARAM wParam,…
-1
votes
2 answers

Continuously running code in Win32 app

I have a working GUI and now need to add some code that will need to run continuously and update the GUI with data. Where should this code go? I know that it should not go into the message loop because it might block incoming messages to the…
-1
votes
2 answers

Error with WM_TIMER in WinAPI

int wmId, wmEvent; PAINTSTRUCT ps; HDC hdc; HBRUSH brush; HBRUSH hBrush; HPEN hPen; static int dX[3] , dY[3] ; static int x[3], y[3], oldX[3], oldY[3]; switch (message) { case WM_CREATE: SetTimer(hWnd, 1, 3, NULL); Beep(750, 300); for…
user3883921
  • 51
  • 1
  • 2
  • 7
-1
votes
1 answer

Why can't I get the RightMouseButton Input?

I am creating an Bezier curve in WinApi with C++ and my problem is that my right Button is not working. This is my code: if (wParam & MK_LBUTTON) { HGDIOBJ original = NULL; //Saving the original object original =…
Nicholas
  • 3,529
  • 2
  • 23
  • 31
-1
votes
1 answer

Win32 - cannot trigger WM_PAINT message with RedrawWindow()

I am trying to trigger a WM_PAINT message form WM_TIMER; the timer works, but RedrawWindow() function does not seem to do anything. What am I doing wrong? Here is my Callback function: LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam,…
Cristi
  • 1,195
  • 6
  • 17
  • 24
-1
votes
1 answer

Set opacity of a form inside a transparent form

I have scenario in which BaseForm needs to be transparent and have panel inside it 1/4 height of the form and should be opaque (which has some buttons and textbox). So I had set the transparent key to BackColor for the BaseFrom and for the panel I…
ramindar
  • 53
  • 5
-1
votes
2 answers

LPCWSTR Error - C++

I'm trying to draw text to a window. Some enough, two things I'm wondering. Why can the tutorial I'm using not put an L"String Here" and I have to? I'm confused about that, anyway back to the main point, I;m trying to draw text and I'm getting an…
Jordan Schnur
  • 1,225
  • 3
  • 15
  • 30
-1
votes
1 answer

Using DLL in C++ Win32 applicaiton

I have the library called Serial.dll that containts the file Serial.def that looks like this: EXPORTS ValidateSerial GenerateSerial I want to import the function GenerateSerial in my C++ Win32 application. I searched on the internet topics…
Victor
  • 13,914
  • 19
  • 78
  • 147
-2
votes
1 answer

C++ Code is throwing std::bad_alloc, i am trying to receive screenshots through socket and display to a gui window win32api

C++ Win32Api GUI, I Am trying to display received screenshots on server from client. I am trying to create a Remote Desktop Viewer. Client is capturing screenshots and then sending them to the server, where i am trying to receive and display to a…
Rocka
  • 59
  • 7
-2
votes
1 answer

Create Win32 Window using C#

so im currently making an custom rendered but I cannot understand how to make a win32 window on c#. I need one because its more optimized, way less messier and suports DirectX accelerated rendering than winforms and wpf. What i already…
DALVES2012
  • 27
  • 5
-2
votes
1 answer

Why GetDC function does not works?

I am creating a game with the Win32 API and tried to draw a button by myself with this following code: HWND button = CreateWindow("BUTTON", "", WS_CHILD | WS_VISIBLE | BS_OWNERDRAW, 100, 100, 250, 40, hwnd, NULL, instance, NULL); HDC dc =…
-2
votes
1 answer

Why PyHANDLE is useless in GetWindowText?

I used win32process.CreateProcess function created a process: handle = win32process.CreateProcess('LabMax.exe', '', None, None, 0, win32process.CREATE_NO_WINDOW, None, None,…
-2
votes
1 answer

How to return all output from if in with python

I am trying to return the output of all windows locations based on names, which I have done. However for some reason I can't get the results returned as 1 line, a list of tuples etc. I am getting the output returned in separate lines (which I then…
-2
votes
1 answer

How to increase bitmap pixel size?

I'm struggling to find the way to increase pixel sizes in a win32 bitmap. Is there any way to do it? I made a small win32 program below. When you run it, you should get a window with a very tiny red dot in the center. You can use up, down, left, and…
Ray Siplao
  • 199
  • 8