From a4d2315ee4ca3f6177b4fb2526bed2feff3d89be Mon Sep 17 00:00:00 2001
From: lifan <2308045698@qq.com>
Date: 星期三, 22 十月 2025 16:52:58 +0800
Subject: [PATCH] update
---
jrj/xframe/win32/win.hpp | 42 +++++++++++++++++++++++++++---------------
1 files changed, 27 insertions(+), 15 deletions(-)
diff --git a/jrj/xframe/win32/win.hpp b/jrj/xframe/win32/win.hpp
index e32f9d2..145e03a 100644
--- a/jrj/xframe/win32/win.hpp
+++ b/jrj/xframe/win32/win.hpp
@@ -2,6 +2,7 @@
#include "system/base.hpp"
+#ifdef _XWIN
typedef struct _GUID {
unsigned long Data1;
unsigned short Data2;
@@ -29,18 +30,12 @@
#define WINAPI __stdcall
-#define SendMessage SendMessageW
-#define PostMessage PostMessageW
-#define GetWindowLong GetWindowLongW
-#define SetWindowLong SetWindowLongW
-#define MessageBox MessageBoxW
-
extern "C"
{
void WINAPI SysFreeString(BSTR str);//OleAut32.dll
- void * WINAPI LoadLibraryW(const wchar_t* lpText);
+ HMODULE WINAPI LoadLibraryW(const wchar_t* lpText);
bool WINAPI FreeLibrary(void * hModule);
- void * WINAPI GetProcAddressW(void* hModule, const char* lpText);
+ void * WINAPI GetProcAddressW(HMODULE hModule, const char* lpText);
LPARAM WINAPI GetPropW(HWND hWnd,string lpString);
@@ -66,8 +61,8 @@
bool WINAPI AnimateWindow(HWND hWnd,int dwTime,int dwFlags) ;//native from "user32.dll" alias "AnimateWindow";
int WINAPI GetKeyState(int nVirtKey) ;//native from "user32.dll" alias "GetKeyState";
- int WINAPI SetWindowLong(HWND hWnd, int nIndex, int dwNewLong) ;//native from "user32.dll" alias "SetWindowLongW";
- LPARAM WINAPI GetWindowLong(HWND hWnd, int nIndex) ;//native from "user32.dll" alias "GetWindowLongW";
+ int WINAPI SetWindowLongW(HWND hWnd, int nIndex, int dwNewLong) ;//native from "user32.dll" alias "SetWindowLongW";
+ LPARAM WINAPI GetWindowLongW(HWND hWnd, int nIndex) ;//native from "user32.dll" alias "GetWindowLongW";
int WINAPI GetClientRect(HWND hWnd, xrect & lpRect) ;//native from "user32.dll" alias "GetClientRect";
int WINAPI GetWindowRect(HWND hWnd, xrect & lpRect) ;//native from "user32.dll" alias "GetWindowRect";
int WINAPI MoveWindow(HWND hWnd, int X, int Y, int nWidth, int nHeight, bool bRepaint) ;//native from "user32.dll" alias "MoveWindow";
@@ -91,7 +86,7 @@
int WINAPI DestroyWindow(HWND hWnd) ;//native from "user32.dll" alias "DestroyWindow";
HMENU WINAPI CreatePopupMenu() ;//native from "user32.dll" alias "CreatePopupMenu";
bool WINAPI AppendMenuW(HMENU hMenu, int uFlags, int uIDNewltem, string lpNewltem) ;//native from "user32.dll" alias "AppendMenuW";
- bool WINAPI TrackPopupMenu(HMENU hMenu, int uFlags, int x, int y, int nReserved, HWND hWnd, xrect prcRect) ;//native from "user32.dll" alias "TrackPopupMenu";
+ bool WINAPI TrackPopupMenu(HMENU hMenu, int uFlags, int x, int y, int nReserved, HWND hWnd, LPRECT prcRect) ;//native from "user32.dll" alias "TrackPopupMenu";
//int WINAPI CallWindowProc(int OldWProc,HWND hWnd,int uMsg,param wParam,param lParam) ;//native from "user32.dll" alias "CallWindowProcW";
int WINAPI InvalidateRect(HWND hWnd,xrect * lpRect, bool bErase) ;//native from "user32.dll" alias "InvalidateRect";
int WINAPI Sleep(int dwMilliseconds) ;//native from "kernel32.dll" alias "Sleep";
@@ -104,16 +99,32 @@
int WINAPI ShellExecuteW(HWND hWnd, string lpOperation, string lpFile, string lpParameters, string lpDirectory, int nShowCmd) ;//native from "shell32.dll" alias "ShellExecuteW";
int WINAPI DeleteFile(string lpFileName) ;//native from "Shlwapi.dll" alias "DeleteFileW";
bool WINAPI PathFileExists(string lpFileName) ;//native from "shlwapi.dll" alias "PathFileExistsW";
- int WINAPI CreateDirectory(string lpFileName, string lpFileAttributes) ;//native from "kernel32.dll" alias "CreateDirectoryW";
+ int WINAPI CreateDirectoryW(string lpFileName, void* lpFileAttributes) ;//native from "kernel32.dll" alias "CreateDirectoryW";
//bool WINAPI SystemParametersinfo(int uiAction,int uiParam,param pvParam,int fWinlni) ;//native from "user32.dll" alias "SystemParametersinfo";
int WINAPI GetSystemMetrics(int nIndex) ;//native from "user32.dll" alias "GetSystemMetrics";
HWND WINAPI FindWindowW(string lpClassName, string lpWindowName);//native from "user32.dll" alias "FindWindowW";
int WINAPI GetTempPathW(int NAME_LEN,string & OutPath) ;//native from "kernel32.dll" alias "GetTempPathW";
- int WINAPI GetModuleHandleW(string lpModuleName) ;//native from "kernel32.dll" alias "GetModuleHandleW";
- int WINAPI GetModuleFileName(int hModule ,string & lpFileName ,int nSize ) ;//native from "kernel32.dll" alias "GetModuleFileName";
+ HMODULE WINAPI GetModuleHandleW(string lpModuleName) ;//native from "kernel32.dll" alias "GetModuleHandleW";
+ int WINAPI GetModuleFileNameW(HMODULE hModule ,string lpFileName, int nSize);//native from "kernel32.dll" alias "GetModuleFileNameW";
void WINAPI GetLocalTime(SYSTEMTIME& lpSystemTime) ;//native from "kernel32.dll" alias "GetLocalTime";
+ int WINAPI PathRemoveFileSpecW(string lpFileName);// native from "shlwapi.dll" alias "PathRemoveFileSpecW";
+ int WINAPI PathRemoveExtensionW(string lpFileName);// native from "shlwapi.dll" alias "PathRemoveExtensionW";
+
}
+#define SendMessage SendMessageW
+#define PostMessage PostMessageW
+#define GetWindowLong GetWindowLongW
+#define SetWindowLong SetWindowLongW
+#define MessageBox MessageBoxW
+#define GetModuleFileName GetModuleFileNameW
+#define PathRemoveFileSpec PathRemoveFileSpecW
+#define SetWindowText SetWindowTextW
+#define GetWindowText GetWindowTextW
+#define AppendMenu AppendMenuW
+#define FindWindowEx FindWindowExW
+#define CreateDirectory CreateDirectoryW
+#endif
#if 0
namespace win32
@@ -190,8 +201,9 @@
HWND FindWindowW(string lpClassName, string lpWindowName);//native from "user32.dll" alias "FindWindowW";
int GetTempPathW(int NAME_LEN,string & OutPath) ;//native from "kernel32.dll" alias "GetTempPathW";
- int GetModuleHandleW(string lpModuleName) ;//native from "kernel32.dll" alias "GetModuleHandleW";
+ HMODULE GetModuleHandleW(string lpModuleName) ;//native from "kernel32.dll" alias "GetModuleHandleW";
int GetModuleFileName(int hModule ,string & lpFileName ,int nSize ) ;//native from "kernel32.dll" alias "GetModuleFileName";
void GetLocalTime(SYSTEMTIME& lpSystemTime) ;//native from "kernel32.dll" alias "GetLocalTime";
+
}
#endif
\ No newline at end of file
--
Gitblit v1.9.3