Questions tagged [createwindowex]
The createwindowex tag has no usage guidance.
37
questions
1
vote
1answer
45 views
'BeginDraw' in conjunction with D2D1 causes an error
I'm trying to clear the background of a window created with CreateWindowEx with the code separated into separate classes, with the use of D2D1. Here's the code.
LRESULT CALLBACK WndProc(HWND hwnd, ...
0
votes
1answer
81 views
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 ...
-2
votes
1answer
400 views
Win32 API - HWND “{unused = ???} Unable to read memory” error
My project is C++ Windows Desktop Wizard AKA Win32 API project.
In function WinMain(...) I'm creating my window:
hWnd = CreateWindowEx(NULL, _T("DesktopApp"), _T("Hi, I'm window"), ...
0
votes
0answers
65 views
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 ...
2
votes
1answer
155 views
CreateWindowEx creates old (Windows 7) style border on Windows 10
Whenever I create a window with CreateWindowEx(...) (exact parameters can be found in the code below), it shows up like an old style window:
Only when I start it on a remote desktop, close the ...
0
votes
0answers
47 views
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:
...
0
votes
1answer
67 views
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(...
0
votes
0answers
86 views
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:
...
0
votes
1answer
386 views
Show taskbar button when using WS_EX_TOOLWINDOW
Is it possible to display the taskbar button when WS_EX_TOOLWINDOW flag is used in CreateWindowEx?
1
vote
0answers
669 views
In WinAPI, how to make a stretchable OpenGL window with correct mouse, trapped properly for games?
I have read a lot of Stack Overflow over the years when struggling with making sense of Microsoft Windows' strange world of CreateWindowEx() .. etc. This question, when originally asked was "What is ...
0
votes
1answer
229 views
How create a screenlocker similar to Windows UAC?
I'm trying to create a screen locker, similar to Windows UAC, like shown in this tutorial. I am having difficulty creating the background maximized window, with reduced light, and a screenshot of the ...
1
vote
1answer
553 views
WinAPI CreateWindow WS_POPUP resize flickering
I'm creating a window with no borders (WS_POPUP in CreateWindow) and need to resize it when mouse is over and change back when mouse is out of the application. It works OK, but it flickers when I ...
0
votes
1answer
567 views
Failed CreateWindowEx. How do I get my window (with the button) to actually pop up for once?
I can only assume most of this works because I can't get past the CreateWindowEx check.
If someone would double check all of my fun button code that would be great too.
#include <windows.h>
#...
3
votes
1answer
381 views
Why I don't see a question mark when I use WS_EX_CONTEXTHELP?
I am learning WinAPI. MSDN:
WS_EX_CONTEXTHELP
The title bar of the window includes a question
mark. When the user clicks the question mark, the cursor changes to a
question mark with a ...
6
votes
2answers
4k views
Specifying a Window Procedure for child Windows
I would like to know if its possible to specify a WndProc for a Child Window created by CreateWindowEx.
I have created a Window Class, the Main Window, the Window Procedure and a Message Loop already....
1
vote
2answers
851 views
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 ...
1
vote
1answer
1k views
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 ...
3
votes
1answer
2k views
How do I obtain the HINSTANCE for the CreateWindowEX function when using it outside of WinMain?
I am trying to create a popup window when I click a button on my main window, and I am using the CreateWindowEX function for that purpose. However, the CreateWindowEx function recieves the HINSTANCE ...
1
vote
1answer
982 views
ES_NUMBER, ES_UPPERCASE and ES_LOWERCASE styles stopped working for Win32 API edit control [closed]
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 ...
0
votes
2answers
1k views
WinAPI FindWindow
I am building a win32 application in visual studio 2012. I have 4 disabled buttons created with the following code:
HWND hWndButton=CreateWindowEx(NULL,
L"BUTTON",
L"APP1",
...
0
votes
1answer
1k views
Displaying Int Variable in LPCSTR CreateWindowEx function
So i am making a basic tic tac toe game as my first program in win32 (just for fun to learn more, no school assignment or anything). I have most of the UI done and the basic gameplay such as clicking ...
-1
votes
1answer
1k views
Why does uninitialised return value cause Invalid Window Handle err in CreateWindowEx?
Edit- Added code to do with m_hWndClient and the WndProc that were not originally included. In an attempt to be brief I had incorrectly assumed it was unrelated.
After the following is run
HWND ...
0
votes
1answer
550 views
Successful build with createWindowEx, window still won't appear
I'm trying to learn some windows and directX programming and I was messing around trying some different things. When suddently my the windows stopped appearing, even tho it was a successful build. I ...
0
votes
1answer
1k views
Applying Windows theme to custom control with WS_BORDER style
I have a custom control created using CreateWindowEx with the WS_BORDER style. Everything works fine apart from the border appearing in a different colour to other controls in the dialog box. The ...
4
votes
1answer
3k views
CreateWindowEx failing
I'm following the NeHe gamedev tutorials (while altering them to be OO) and I've run into a problem with the CreateWindowEx demo (http://nehe.gamedev.net/tutorial/creating_an_opengl_window_(win32)/...
0
votes
2answers
338 views
Where is CreateWindowEx()? [closed]
I'm trying to understand how winapi works. I just started on writing my first few apps. Now I am curious about the function "CreateWindowEx()" I wish to know what is written inside this function, but ...
0
votes
1answer
322 views
CreateWindowsEx() failing with Breakpoint triggered
I've got an issue with opening an OpenGL window from my application.
I am using a 64bit console application, and from within that console I want to open another window for OpenGL to draw into.
The ...
0
votes
1answer
901 views
Cannot create window (CreateWindowEx) with existing child class
I have a parent window and a few child windows attached to this. With SpyXX I can see the children all have a certain style class, lets say ChildWindowClass.
When I create the window with the name of ...
2
votes
1answer
6k views
CreateWindowEx returns NULL
The following is a portion of my code. Every time I run the program, CreateWindowEx of the SPanel returns NULL, triggering an error. Can anyone see what is wrong with this piece of code?
SPanelProc ...
2
votes
1answer
1k views
How to call CreateWindowEx from Ruby?
I have the following code which is fine if I give invalid parameters (though, obviously doesn't work), but whenever I give accurate parameters, ruby segfaults. I'm inclined to believe that this is a ...
5
votes
2answers
6k views
Creating a window using CreateWindowEx without an icon
With C#, I was easily able to get the effect I wanted:
However, I'm having trouble doing the same thing using the Win32 API in C. I don't know how to create a window that has no icon (at all), but ...
36
votes
1answer
23k views
WinAPI: Create a window with a specified client area size
I was wondering how can I create a window using Win32 API with a specific client area size.
When trying to create a window using the following piece of code, the entire window is 640x480, with the ...
2
votes
0answers
1k views
Why does CreateWindowEx not work as expected?
I followed the tutorial at:
http://www.winprog.org/tutorial/simple_window.html
I have a reasonable understanding of what everything in the tutorial is doing and my test program works. I have tried to ...
0
votes
1answer
904 views
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 ...
0
votes
1answer
622 views
How to create a Microsoft Windows Child window using JNA
I have spent some time trying to create a child window of an existing window by using the following piece of code on JNA (Java Native Access) but I guess it is pretty much the same with every other ...
1
vote
1answer
2k views
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 ...
6
votes
3answers
4k views
How do you get CreateWindowEx() to create the window on a specific monitor?
I've determined that I can use GetSystemMetrics(SM_CMONITORS) to query the number of attached monitors, but is there any way to control what monitor CreateWindowEx() uses for the window?