Comments (5)
Hi @rofl0r,
It would not be a big deal to implement WNDCLASSEX, its just an expanded window class structure that has a few more fields (like hIconSm to support small icons as well as normal icons), that aren't used by Microwindows anyways.
For now, probably easier to just edit simple_window.c and change all WNDCLASSEX to WNDCLASS, and then the following:
//wc.cbSize = sizeof(WNDCLASSEX);
//wc.hIconSm = LoadIcon(NULL, IDI_APPLICATION);
if(!RegisterClassEx(&wc)) -> change to RegisterClass
That should compile and run.
from microwindows.
thanks for your suggestion.
now i get
simple_window.c: In function 'WinMain':
simple_window.c:36:15: warning: implicit declaration of function 'LoadIcon' [-Wimplicit-function-declaration]
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
^~~~~~~~
simple_window.c:36:30: error: 'IDI_APPLICATION' undeclared (first use in this function)
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
^~~~~~~~~~~~~~~
simple_window.c:36:30: note: each undeclared identifier is reported only once for each function it appears in
simple_window.c:37:17: warning: implicit declaration of function 'LoadCursor' [-Wimplicit-function-declaration]
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
^~~~~~~~~~
simple_window.c:37:34: error: 'IDC_ARROW' undeclared (first use in this function)
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
^~~~~~~~~
trying to disable those too...
from microwindows.
Just change
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
to
wc.hCursor = 0; //LoadCursor(NULL, IDC_ARROW);
for now, same with LoadIcon.
from microwindows.
thanks, that works and i get a working window. cool stuff!
regarding cursor: the default cursor which is almost horizontal in shape looks really 80ies, like in openmotif.
is it possible to use the standard X11 cursor instead, or at least a windows-xp style cursor ?
from microwindows.
The (80's style) Win32 cursor is declared in src/mwin/winmain.c:
static MWCURSOR arrow = { /* default arrow cursor*/
16, 16,
0, 0,
RGB(255, 255, 255), RGB(0, 0, 0),
{ 0xe000, 0x9800, 0x8600, 0x4180,
0x4060, 0x2018, 0x2004, 0x107c,
0x1020, 0x0910, 0x0988, 0x0544,
0x0522, 0x0211, 0x000a, 0x0004 },
{ 0xe000, 0xf800, 0xfe00, 0x7f80,
0x7fe0, 0x3ff8, 0x3ffc, 0x1ffc,
0x1fe0, 0x0ff0, 0x0ff8, 0x077c,
0x073e, 0x021f, 0x000e, 0x0004 }
};
You can look up the format of MWCURSOR in include/mwtypes.h, but basically its a 16x16 bitmap, with the first array being the cursor bits, and the second array being the mask bits. If you rearrange those hex numbers into a better column, or even better yet, arrange them as C binary numbers (0111111000111b, etc), you should be able to visually play with a replacement cursor.
from microwindows.
Related Issues (20)
- libxcb support? HOT 1
- Porting to sel4 HOT 1
- GrCopyArea all 0s HOT 12
- Window border glitches after resize HOT 4
- Next Update? HOT 2
- Error running nano-X on linux framebuffer HOT 1
- I am so confused! HOT 3
- Question on keyboard event devices in linux HOT 5
- Strange gtk 1.2.10 behaviors with nano-X HOT 5
- How to switch from 16bit to 32bit colors HOT 16
- endian.h HOT 4
- Present to the future challenge HOT 2
- cosmopolitan binaries experiment? HOT 4
- Doc has dead links
- Linker Error with GCC 11 HOT 5
- microwindows on 64bit ARM HOT 6
- NanoX on Microsoft Windows HOT 1
- Load and display bitmaps at runtime HOT 5
- 'ft2build.h' file not found HOT 1
- wasm: hide window content while dragging ? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from microwindows.