Hello,
as a last exercise I created FindAndReplace as an excutable with resources in the exe file. For this project I created a subfolder \OxygenBasic\Projects\FindAndReplace. The latest Oxide is used.
To create the exe these steps are necessary:
Open Oxide, drag and drop FindAndReplace5.proj to the left panel. Double-Click on <[FindAndReplace5.o2bas].
Select Compile->Independent Binary32
Select ProjectUtil>Compile .rc and link to exe
Select ProjectUtil>Run Executable (in batch mode) or open FindAndReplace.exe directly in the directory.
BTW: The find / replace dialogs should be displayed in the native language of the OS if my assumptions are correct.
This application is derived from FindAndReplace4 where I used and extended a resource dll. I only needed three places in the .o2bas file to link the .rc file directly to the exe:
sys hResources = GetModuleHandle null
/*
sys hResources = loadlibrary "FRDll.dll"
if not hResources then
print "Error: FRDll.dll not found!"
end if
*/
For the WndClass wc structure:
...
wc.lpszMenuName = IDR_Mainmenu 'null
...
and last but least:
hwnd = CreateWindowEx 0,wc.lpszClassName,"Find and FindReplace",WS_OVERLAPPEDWINDOW,
Wtx,Wty,Wwd,Wht,
0,
null, 'LoadMenu(hResources, IDR_MAINMENU),
inst,0
So it should be rather easy to use either a resource dll or link resources directly to an exe file.
Roland
.