Sorting out small icon and instance handles.

This commit is contained in:
Brad Nelson
2022-02-20 17:43:46 -08:00
parent 63a7df80b2
commit a82c31c1cb
4 changed files with 33 additions and 15 deletions

View File

@ -12,4 +12,5 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
#define IDI_MAIN_ICON 1001
IDI_MAIN_ICON ICON "out/resources/eforth.ico" IDI_MAIN_ICON ICON "out/resources/eforth.ico"

View File

@ -35,6 +35,7 @@ z" GetTickCount" 0 Kernel32 GetTickCount
z" WaitForSingleObject" 2 Kernel32 WaitForSingleObject z" WaitForSingleObject" 2 Kernel32 WaitForSingleObject
z" GetLastError" 0 Kernel32 GetLastError z" GetLastError" 0 Kernel32 GetLastError
z" GetCommandLineW" 0 Kernel32 GetCommandLineW z" GetCommandLineW" 0 Kernel32 GetCommandLineW
z" GetModuleHandleA" 1 Kernel32 GetModuleHandleA
z" Shell32.dll" dll Shell32 z" Shell32.dll" dll Shell32
z" CommandLineToArgvW" 2 Shell32 CommandLineToArgvW z" CommandLineToArgvW" 2 Shell32 CommandLineToArgvW

View File

@ -17,11 +17,14 @@ also windows also internals
z" MyClass" constant MyClassName z" MyClass" constant MyClassName
z" Test Window" constant MyWindowTitle z" Test Window" constant MyWindowTitle
NULL GetModuleHandleA constant hinst
pad WINDCLASSA erase pad WINDCLASSA erase
WindowProcShim pad ->lpfnWndProc ! WindowProcShim pad ->lpfnWndProc !
DefaultInstance pad ->hInstance ! hinst pad ->hInstance !
MyClassName pad ->lpszClassName ! MyClassName pad ->lpszClassName !
NULL IDC_ARROW LoadCursorA pad ->hCursor ! NULL IDC_ARROW LoadCursorA pad ->hCursor !
hinst IDI_MAIN_ICON LoadIconA pad ->hIcon !
pad RegisterClassA constant myclass pad RegisterClassA constant myclass
create ps PAINTSTRUCT allot create ps PAINTSTRUCT allot
@ -53,7 +56,7 @@ create bar ' foo , ' yield ,
0 myclass MyWindowTitle WS_OVERLAPPEDWINDOW 0 myclass MyWindowTitle WS_OVERLAPPEDWINDOW
CW_USEDEFAULT CW_USEDEFAULT 640 480 CW_USEDEFAULT CW_USEDEFAULT 640 480
NULL NULL DefaultInstance bar CreateWindowExA constant hwnd NULL NULL hinst bar CreateWindowExA constant hwnd
hwnd SW_SHOWMAXIMIZED ShowWindow drop hwnd SW_SHOWMAXIMIZED ShowWindow drop
hwnd SetForegroundWindow drop hwnd SetForegroundWindow drop

View File

@ -89,6 +89,7 @@ WS_OVERLAPPEDWINDOW constant WS_TILEDWINDOW
( General use ) ( General use )
$400000 constant DefaultInstance $400000 constant DefaultInstance
1001 constant IDI_MAIN_ICON
$80000000 constant CW_USEDEFAULT $80000000 constant CW_USEDEFAULT
struct POINT struct POINT
@ -127,21 +128,33 @@ z" FillRect" 3 User32 FillRect
z" PostQuitMessage" 1 User32 PostQuitMessage z" PostQuitMessage" 1 User32 PostQuitMessage
z" LoadCursorA" 2 User32 LoadCursorA z" LoadCursorA" 2 User32 LoadCursorA
32650 constant IDC_APPSTARTING
32512 constant IDC_ARROW 32512 constant IDC_ARROW
32515 constant IDC_CROSS
32649 constant IDC_HAND
32651 constant IDC_HELP
32513 constant IDC_IBEAM 32513 constant IDC_IBEAM
32641 constant IDC_ICON
32648 constant IDC_NO
32640 constant IDC_SIZE
32646 constant IDC_SIZEALL
32643 constant IDC_SIZENESW
32645 constant IDC_SIZENS
32642 constant IDC_SIZENWSE
32644 constant IDC_SIZEWE
32516 constant IDC_UPARROW
32514 constant IDC_WAIT 32514 constant IDC_WAIT
32515 constant IDC_CROSS
32516 constant IDC_UPARROW
32640 constant IDC_SIZE
32641 constant IDC_ICON
32642 constant IDC_SIZENWSE
32643 constant IDC_SIZENESW
32644 constant IDC_SIZEWE
32645 constant IDC_SIZENS
32646 constant IDC_SIZEALL
32648 constant IDC_NO
32649 constant IDC_HAND
32650 constant IDC_APPSTARTING
32651 constant IDC_HELP
z" LoadIconA" 2 User32 LoadIconA
32512 constant IDI_APPLICATION
32513 constant IDI_HAND
32514 constant IDI_QUESTION
32515 constant IDI_EXCLAMATION
32516 constant IDI_ASTERISK
32517 constant IDI_WINLOGO
32518 constant IDI_SHIELD
IDI_EXCLAMATION constant IDI_WARNING
IDI_HAND constant IDI_ERROR
IDI_ASTERISK constant IDI_INFORMATION
only forth definitions only forth definitions