3 ms·
Notepad uses bare Win32 API calls. If a 12 year old can handle that in a weekend, I'm Rihanna.
by speed_spread 4y ago
Notepad uses bare Win32 API calls. If a 12 year old can handle that in a weekend, I'm Rihanna.
- codebolt 4y agoI taught myself coding Win32 API in C as a young teenager, nothing magic about it. And Notepad is a very basic app.
- deleted 4y ago[deleted]
- blibble 4y agoit's an edit control inside a window take the standard example of how to create a window and add one more CreateWindow() call
- speed_spread 4y agoAh, simple like this: https://github.com/genuinelucifer/mypad https://github.com/genuinelucifer/mypad I like that part: hEdit = CreateWindowEx ( WS_EX_CLIENTEDGE, /* Extended possibilites for variation */ "EDIT", /* Classname */ "", /* Title Text */ WS_CHILD|WS_VISIBLE|WS_VSCROLL|WS_HSCROLL|ES_MULTILINE|ES_AUTOHSCROLL|ES_AUTOVSCROLL , /* default window */ 1, /* Windows decides the position */ 1, /* where the window ends up on the screen */ 100, /* The programs width */ 100, /* and height in pixels */ hwnd, /* The window is a child-window to hwnd */ (HMENU) IDC_EDIT, /* No menu */ GetModuleHandle(NULL), /* Program Instance handler */ NULL /* No Window Creation data */ );
- blibble 4y agoyes? notepad's entire front end is an edit control slapped onto the barebones minimal Win32 example they wouldn't need to understand all of it, only to make small additions based on modifying what's already there: - adding the edit control (as discussed) - add Open/Save items to the existing example menu - a few lines in the event loop to implement that functionality as a kid I had a "games programming" book that showed how to do everything necessary to do this admittedly kids these days aren't going to be interested in programming for a dead API (Win32)