Questions tagged [createwindowex]
43 questions
1
vote
2 answers
CreateWindowEx shows chinese gibberish instead of original text
I have a problem. I wanted to document my tool development, so instead of mspaint-ing a date on top of screenshot, I wanted to make the window name carry the date and time data. But instead of the string I've got only chinese characters.
Here is my…

Citrus
- 1,162
- 1
- 16
- 38
1
vote
1 answer
C++ Creating Window in other cpp files (not in WinMain)
I have a function that is located in a different cpp file than WinMain is, and when called will create a window. However the windows class for that new window was declared and registered inside of WinMain. Now, when I create the window in the…

CodeBlocks
- 233
- 3
- 5
- 14
1
vote
1 answer
ES_NUMBER, ES_UPPERCASE and ES_LOWERCASE styles stopped working for Win32 API edit control
We have a very old ("legacy") VB6 code used to create the Windows edit control from scratch. It looks like this:
Dim dwStyle As Long
dwStyle = WS_CHILD Or ES_AUTOVSCROLL Or ES_AUTOHSCROLL Or ES_NUMBER Or ES_MULTILINE
m_hwndEdit = CreateWindowExW(0,…

TecMan
- 2,743
- 2
- 30
- 64
1
vote
1 answer
C# creating a sticking windows on desktop with transperancy
Long title, but simple problem.
I am trying to let a window stick to the destop (or pin), I can do this like this:
[DllImport("User32.dll")]
static extern IntPtr FindWindow(String lpClassName, String lpWindowName);
…

Roger Far
- 2,178
- 3
- 36
- 67
0
votes
1 answer
I want to receive messages on a thread other than the ui thread
I'm trying to create a function that detects software signals within a game.
However, my thread is a separate thread from the UI thread and should not affect the UI thread.
I've tested it by creating a message-only window and calling getmessage on…

i like cat
- 135
- 8
0
votes
1 answer
Win32 Window Creation - No Edge Cursors, or cursor hit along edges appears to extremely small
Yes, this is similar to a lot of posts, but none seem to fit. I have been doing this for decades, so I think I am missing some Windows 11 thing. Or, (most likely) I have simply forgotten how to Create Windows as it is not a common thing on large…

Syntactics
- 313
- 4
- 8
0
votes
1 answer
window fails to initiate when specifying a custom class name registered with RegisterClass to CreateWindowEx but only the second time I do it
I'm creating a window that's supposed to contain buttons.
When I create the first window (the container) I use a WNDCLASS to specify a WindowProc callback function to lpfnWndProc and it works as intended. When I do it the second time with a window,…

Ethicist
- 791
- 2
- 7
- 23
0
votes
1 answer
Project Project1.exe raised exception class ERangeError with message 'Range check error'
I'm reading an old Delphi book on Windows API. This is an example from it.
unit Unit1;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,
System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms,…

user130268
- 1,341
- 2
- 12
- 20
0
votes
1 answer
Struggling with the CreatWindow function
I am a beginner and I am trying to code my first game. I was following a tutorial that was made some time ago. This is my code:
#include
//Callback function
LRESULT CALLBACK window_callback(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM…
0
votes
1 answer
Creating static control with WS_EX_COMPOSITED fails
I'm writing a Windows program in C, and I have a static control which contains a graph that you can click and drag the mouse on to select a range. However, the selection range flickers while you're dragging the mouse around. I learned from Googling…

Verpous
- 588
- 3
- 7
0
votes
0 answers
Advantage of setting window data on WM_CREATE
According to Microsoft's docs, the way to set custom Window data is to pass it through the lpParam argument of CreateWindowEx, retrieve it within the window procedure on WM_CREATE, and then set it using SetWindowLongPtr. I was wondering why you'd…
user13366655
0
votes
0 answers
Button creation invalidating Direct2dFactory pointers Windows C++
I am writing a windows App in MS Visual Studio 2017 and having a little trouble using a Direct 2D Factory object and Buttons.
It appears that if I create the direct 2D Factory object first a.k.a.
run:
HRESULT…

blackbird658
- 11
- 1
0
votes
1 answer
Windows Script Host terminates when closing the created window
I created a wrapper function for CreateWindowEx API function and used it from a VBScript. This is the VBScript:
Dim Result, wcx(10) 'VARIANT ARRAY(10) - WNDCLASSEX
wcx(5) = WINAPI.WinAPI_LoadIcon(NULL, 32516) 'hIcon (IDI_INFORMATION)
wcx(6) =…

GTAVLover
- 1,407
- 3
- 22
- 41
0
votes
0 answers
Drawing with SlimDX on window created by CreateWindowEX
What i want to do:
Use CreateWindowEx to make a new transparent, fullscreen window.
Pass the Handle to SlimDx
Draw onto that window with SlimDX
My current code:
This is my CreateWindowEx Function:
Handle =…

iisp33dii
- 1
- 2
0
votes
1 answer
CreateWindowEx fails with error 1407 CLASS_NOT_REGISTERED for the second instance of ActiveX
Hi
I'm working on some legacy code - ATL ActiveX used as "installer" downloads files from the server for later installation.
There is a "progress bar window" that works fine.
The problem is when I start another instance of the ActiveX in the same…

Zaky
- 369
- 6
- 21