Jump to content
View in the app

A better way to browse. Learn more.

Tuts 4 You

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to create a WinAPI menu in MASM32 without using rc resource files

Featured Replies

Posted

Hello! i've been looking for a way to add a menu using WinAPI within the same .asm file, without using resource (.rc) files

It can be done in C, like explained in this tutorial http://zetcode.com/gui/winapi/menus/

MASM32's User.lib has the same function prototypes in there (CreateMenu, AppendMenuW, SetMenu)

This is for two reasons, one is because i'd like them not to be edited/spoted using Resource Editors, the other is that i want to keep everything on one .asm source file (as what i want to do is small enough)

I've not seen anyone documenting how to do this before in MASM32 (or even other Win32-targeted compilers) and ran out of ideas trying, any kind of help is very appreciated!

thanks beforehand! :D

  • Author

After a lot of research i could figure it out and ported everything that tutorial shows to MASM32, i hadn't cleaned the source nor commented it but i think it is readable enough, though, if anyone got a question please tell me in a comment!

All options emit a sound (except exit :) ) This is how it looks like:

Zd20rNn.gif

it's all just one .asm file:

https://pastebin.com/raw/Sx2NJHr6

you can download it, save it as main.asm, and compile it in MASM32 with these both commands (assuming you have MASM32 installed in C:\):

    C:\masm32\bin\ml.exe /c /coff /nologo main.asm

to assemble and

    C:\masm32\bin\link.exe /nologo /subsystem:windows main.obj

to link

i hope it may be of help to anyone! = 3

edit: attached the exe and asm files if that's better :D

masm32 menu without rc.zip

Edited by ViLXDRYAD

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.