NO

Recent Posts

Pages: 1 ... 8 9 [10]
91
User contributions / Re: Enable Dark Mode for Title bar
« Last post by John Z on February 04, 2024, 08:10:41 AM »
Thanks WiiLF23!

I've got a fairly decent Dark Mode toggle.
Since I had previously coded for 5 custom user defined
themes it was not a big leap to add a Dark Mode.
I looked at a Menu in dark mode, easy to do, but decided
not.  So I left the main dialog frame, menu, toolbar and
status bar as is.

I completed a white IBEAM which works well in DarkMode.
Started on the white cursor bar but was having problems, it
showed on the main form but not in the edit boxes. Probably
wrong handle or something. Still looking :)

Thanks very much,
John Z
92
User contributions / Re: Enable Dark Mode for Title bar
« Last post by WiiLF23 on February 04, 2024, 01:37:22 AM »
Hi John Z, correct you will need to invert the cursor color and called SetCursor(...) for the darkmode conditional. I do this on [X] close icons on custom drawn elements in my controls.

I havent implemented this into the main application yet, as demo is still in project folder elsewhere. I set it and left it.

Since that time, I have figured out how to completely darken/customize TabControl, TreeView, etc.


You can see here it is easily possible to draw rows and states in TreeView (took me an hour). Also, customizing dark windows is also very easy as this example shows a splash tutorial on a one-time timer.



^ This is just a BMP within a dialog window. But there is a lot of control logic for the window, drag event, close/mouseover, capture handling, etc. It works perfectly fine. Close button turns red with WM_MOUSEMOVE etc (native button control).

This all combined, can produce a much better dark mode experience - along with the tab drawing.

IntroDialog.zip will get you started with the splash feature.
93
Assembly discussions / Re: Poasm macros in the Masm32 package
« Last post by jj2007 on February 04, 2024, 01:23:47 AM »
You are receiving those warnings because your version of Poasm located in \masm32\bin\ is probably old.

Hi Erol,

Thanks, that was my suspicion, too. I vaguely remember that I kept the older version because the latest polink no longer produced the symbol format needed for debugging with Olly.
94
Assembly discussions / Re: Calling a C++ function from Poasm
« Last post by WiiLF23 on February 03, 2024, 11:57:39 PM »
Why not with C  ;)
Code: [Select]
void __stdcall  ExitProcess( unsigned int uExitCode);
int __cdecl printf(const char * format, ...);
#pragma comment(lib, "msvcrt.lib")
// void formula::GetResult(int t)
// void ?GetResult@formula@@QEAAXH@Z(long long, long long)
#pragma comment(linker, "-alternatename:formula_GetResult=?GetResult@formula@@QEAAXH@Z")
void formula_GetResult(void* this, int t);
// int formula::calc(int a, int b, int c, int d, int e)
// int ?calc@formula@@QEAAHHHHHH@Z(int a, int b, int c, int d, int e)
int formula_calc(void* this, int a, int b, int c, int d, int e);
#pragma comment(linker, "-alternatename:formula_calc=?calc@formula@@QEAAHHHHHH@Z")
void __cdecl mainCRTStartup(void)
{
int x = formula_calc(0,2,4,6,8,10);
formula_GetResult(0,x);
ExitProcess(0);
}

I convert everything in this topic category to C. Its generally code already available, uses common techniques etc.
95
Chit-Chat / Code Signing
« Last post by WiiLF23 on February 03, 2024, 11:35:47 PM »
Has anyone successfully code signed (or regularly code sign each build)? I am looking to purchase a Comodo Authenticode certificate in a month or 2, and knowing the process very well I am left with this question regarding the IDE / compiler.

And does it add delay to the compilation time? Just curious.

Thanks everyone!
96
Assembly discussions / Re: Poasm macros in the Masm32 package
« Last post by Vortex on February 03, 2024, 07:13:38 PM »
Hi Jochen,

Code: [Select]
\masm32\bin\PoAsm /c /coff /AIA32 tmp_file.asm
You are receiving those warnings because your version of Poasm located in \masm32\bin\ is probably old. You should download and use the latest version supplied with Pelles C :

Quote
For 64-bit Windows 7/8/10 host, targeting 32-bit or 64-bit Windows Vista/7/8/10. New
( Should work on Windows 11 too, but I have no means to verify that... )   12.00   May 19, 2023
http://www.smorgasbordet.com/pellesc/download.htm

No need of the options /c and /coff. Poasm can produce only MS COFF object modules and it does not pass the execution flow to any linker.

I can reproduce the problem :

Code: [Select]
G:\masm32\bin\poasm.exe /AIA32 MacroTest.asm
MacroTest.asm(16): warning: No support for: 'PROLOGUE'.
MacroTest.asm(17): warning: No support for: 'EPILOGUE'.
MacroTest.asm(38): warning: No support for: 'PROLOGUE'.
MacroTest.asm(39): warning: No support for: 'EPILOGUE'.

Switching to the latest version, Poasm V12 :

Code: [Select]
\PellesC\bin\poasm.exe /AIA32 MacroTest.asm
Poasm assembles the source code without any problem.

Two different versions of Poasm, this one supplied with the Masm32 package :

Code: [Select]
G:\masm32\bin\poasm.exe
Pelles Macro Assembler, Version 6.50.0
Copyright (c) Pelle Orinius 2005-2011

The latest release :

Code: [Select]
\PellesC\bin\poasm.exe
Pelles Macro Assembler, Version 12.00.1
Copyright (c) Pelle Orinius 2005-2023
97
Assembly discussions / Re: Poasm macros in the Masm32 package
« Last post by jj2007 on February 03, 2024, 12:18:08 PM »
Hi Erol,

My batch file is an 11kB monster, but the one line that interests is
\masm32\bin\PoAsm /c /coff /AIA32 tmp_file.asm

Looks pretty harmless, right? No idea where the prologue & epilogue warnings come from 8)
Especially since I use the same identical line directly from the console, I only get the /c and /coff warnings...
98
Assembly discussions / Re: Poasm macros in the Masm32 package
« Last post by Vortex on February 03, 2024, 11:33:14 AM »
Hi Jochen,

Could post your batch file building the executable or your IDE options? Maybe, I can try them.
99
Assembly discussions / Re: Poasm macros in the Masm32 package
« Last post by jj2007 on February 03, 2024, 11:27:59 AM »
Thanks, Erol.

"Poasm supports the prologue and epilogue macros." - yes it does, but why then the warnings when using my standard MASM options? Not a problem, just a bit weird.
100
Assembly discussions / Re: Poasm macros in the Masm32 package
« Last post by Vortex on February 03, 2024, 11:16:48 AM »
Hi Jochen,

I am using the latest version of Poasm :

Quote
Pelles Macro Assembler, Version 12.00.1
Copyright (c) Pelle Orinius 2005-2023

Syntax:
POASM [options] srcfile[.asm]

Options:
/A<name>            Select architecture: AMD64 (default) or IA32
/D<name>[=<value>]  Define a symbol (with optional value)

/AIA32 means Intel Architecture 32-bit.

Poasm supports the prologue and epilogue macros. Reading the manual :

Quote
User-defined prologue and epilogue macro (IA32) [8.00]
 
Purpose:
Macros for user-defined prologue and epilogue code for a PROC.

Syntax prologue macro:
name MACRO procname , flags , parambytes , localbytes , <reglist> [ , prologue-arg : VARARG ]

    [ body ]

    EXITM <localbytes>
ENDM

Syntax epilogue macro:
name MACRO procname , flags , parambytes , localbytes , <reglist> [ , prologue-arg : VARARG ]

    [ body ]

ENDM

Pages: 1 ... 8 9 [10]