[WIP] Get SRO Source Code - by re-writing it

06/10/2020 16:48 b0ykoe#166
Quote:
Originally Posted by ZeonNETWORK View Post
@[Only registered and activated users can see links. Click Here To Register...]
it's not possible yet to unregister/replace a class yet?
for example replace the new underbar with the old one
there is actually a feature for it in it.

here you can find the ressources for the client: [Only registered and activated users can see links. Click Here To Register...]

here you can find the ifdefine
[Only registered and activated users can see links. Click Here To Register...]

and you simply have to add the following code in "source\DevKit_DLL\CMakeLists.txt"

Code:
option(CONFIG_OLD_UNDERBAR "Turn the old EXP Bar ON/OFF" OFF)

if (CONFIG_OLD_UNDERBAR)
    add_definitions(-DCONFIG_OLD_UNDERBAR)
endif()
in the end you can use the cmake compiler flags to turn it off and on :)
06/10/2020 18:44 ZeonNETWORK#167
Quote:
Originally Posted by b0ykoe View Post
there is actually a feature for it in it.

here you can find the ressources for the client: [Only registered and activated users can see links. Click Here To Register...]

here you can find the ifdefine
[Only registered and activated users can see links. Click Here To Register...]

and you simply have to add the following code in "source\DevKit_DLL\CMakeLists.txt"

Code:
option(CONFIG_OLD_UNDERBAR "Turn the old EXP Bar ON/OFF" OFF)

if (CONFIG_OLD_UNDERBAR)
    add_definitions(-DCONFIG_OLD_UNDERBAR)
endif()
in the end you can use the cmake compiler flags to turn it off and on :)
Thanks but i meant the actual way to replace the example .. there're many examples like for ex item mall

+ the 2dt files still bugged with the coordinates of Pet's controls
+ it doesn't have the control for hide/show pets control so we can't say it's fully functional Old underbar

that's why i'm thinking of override/replace
06/11/2020 01:06 Hercules*#168
Quote:
Originally Posted by ZeonNETWORK View Post
Thanks but i meant the actual way to replace the example .. there're many examples like for ex item mall

+ the 2dt files still bugged with the coordinates of Pet's controls
+ it doesn't have the control for hide/show pets control so we can't say it's fully functional Old underbar

that's why i'm thinking of override/replace
there is already override func
check IFChatViewer

DllMain.cpp
Code:
#ifdef CONFIG_CHATVIEWER
        OverrideObject<CIFChatViewer, 0x00EEC168>();
#endif // CONFIG_CHATVIEWER
06/28/2020 10:45 hadescik#169
How can I hide the CIFCloseButton on the ginterface?
How do I ensure that the window I created does not move (i want to cancel draggable)?
06/28/2020 14:05 florian0#170
Quote:
Originally Posted by hadescik View Post
How can I hide the CIFCloseButton on the ginterface?
How do I ensure that the window I created does not move (i want to cancel draggable)?
The button, the title and the handle-bar are part of CIFMainFrame. You can access the members and call ShowGWnd(false) in the OnCreate function of your own window. When you hide the dragable area, you can't drag the window.

[Only registered and activated users can see links. Click Here To Register...]
07/08/2020 21:13 hadescik#171
i tried but i got crash.

m_IRM.GetResObj(2, 1)->ShowGWnd(false);
07/09/2020 21:33 florian0#172
Quote:
Originally Posted by hadescik View Post
i tried but i got crash.

m_IRM.GetResObj(2, 1)->ShowGWnd(false);
Better use the member of CIFMainFrame

Code:
m_close->ShowGWnd(false);
You have to declare m_close as protected in order to access it.
07/10/2020 06:41 thaidu0ngpr0#173
can you share src runing on visual studio 2010
i can't make it run on visual studio 2010

who can upload src after build it on vs 2017 or 2015 or 2019?

Quote:
Originally Posted by florian0 View Post
Better use the member of CIFMainFrame

Code:
m_close->ShowGWnd(false);
You have to declare m_close as protected in order to access it.
Quote:
Originally Posted by concucu View Post
Bro. How to fix the position, even if the screen size is changed?
bác share src cho e với , e cài mãi chả được , thử đủ visual 2010-2019 vẫn lỗi
07/10/2020 10:46 florian0#174
Quote:
Originally Posted by thaidu0ngpr0 View Post
can you share src runing on visual studio 2010
i can't make it run on visual studio 2010

who can upload src after build it on vs 2017 or 2015 or 2019?
You can use CMake to generate project files for any Visual Studio Version. Just change the make_project_vs2010.cmd. Change Visual Studio 2010 to any of the valid generators listed here:
[Only registered and activated users can see links. Click Here To Register...]

Sharing generated project files is not a good idea. These are usually generated for a specific configuration. Paths might be hardcoded. CMake might be called during the build process to generate intermediate files. You will also have a really hard time integrating newer versions into your project files.

CMake makes your life easier. Please set up the build environment as described in the documentation: [Only registered and activated users can see links. Click Here To Register...]
I made guides with a lot of screenshots. You can follow along every step. Feel free to ask if you got stuck.
07/10/2020 14:05 thaidu0ngpr0#175
Quote:
Originally Posted by florian0 View Post
You can use CMake to generate project files for any Visual Studio Version. Just change the make_project_vs2010.cmd. Change Visual Studio 2010 to any of the valid generators listed here:
[Only registered and activated users can see links. Click Here To Register...]

Sharing generated project files is not a good idea. These are usually generated for a specific configuration. Paths might be hardcoded. CMake might be called during the build process to generate intermediate files. You will also have a really hard time integrating newer versions into your project files.

CMake makes your life easier. Please set up the build environment as described in the documentation: [Only registered and activated users can see links. Click Here To Register...]
I made guides with a lot of screenshots. You can follow along every step. Feel free to ask if you got stuck.
I tried many different ways but it still didn't work
07/10/2020 14:34 florian0#176
Quote:
Originally Posted by thaidu0ngpr0 View Post
I tried many different ways but it still didn't work
Without any hint whats going wrong, I can't help you. So far, everyone who had a problem usually did a mistake during installation. Being it not installing VS2005, ticking the wrong option in the CMake-installer or not using Git for downloading.
If you followed every step as described, please report the error message or (mis-)behavior you get. I'm sure we can get that sorted.
07/11/2020 04:53 thaidu0ngpr0#177
Quote:
Originally Posted by florian0 View Post
Without any hint whats going wrong, I can't help you. So far, everyone who had a problem usually did a mistake during installation. Being it not installing VS2005, ticking the wrong option in the CMake-installer or not using Git for downloading.
If you followed every step as described, please report the error message or (mis-)behavior you get. I'm sure we can get that sorted.
do you have cmake version support visual studio 2005?
07/11/2020 13:02 florian0#178
Quote:
Originally Posted by thaidu0ngpr0 View Post
do you have cmake version support visual studio 2005?
I never thought anybody would, out of the endless options of IDEs to use, actually want to use Visual Studio 2005 ...

There are two ways to accomplish this:

1. Use an older CMake Version. CMake dropped the Visual Studio 2005 generator in 3.12, so any previous version will still have it. BUT! SRO_DevKit depends on 3.12 because it has add_compile_definitions, which makes it easier to add defines to the command line. You have to change all occurrences to add_definitions instead.

07/20/2020 19:43 hadescik#179
I want to access the CIFflorian0 object from the outside and apply SetText to the CIFStatic fields inside, but I could not access it from the outside.

How can I access the CIFflorian0 instance from outside?
07/20/2020 23:44 florian0#180
Quote:
Originally Posted by hadescik View Post
I want to access the CIFflorian0 object from the outside and apply SetText to the CIFStatic fields inside, but I could not access it from the outside.

How can I access the CIFflorian0 instance from outside?
You can get a pointer to the window (and other windows) with m_IRM of CGInterface.

Code:
CIFflorian0 *pWnd = g_pCGInterface->m_IRM.GetResObj<CIFflorian0>(1338, 1);
However, I would recommend to make a function for retrieving the pointer instead of using m_IRM directly.

Code:
CIFflorian0 *pWnd = g_pCGInterface->GetFlorian0Window();
Code:
CIFflorian0 *CGInterface::GetFlorian0Window() {
  return m_IRM.GetResObj<CIFflorian0>(1338, 1);
}
Now you have a pointer to the window and you can access all the members of the window with it.

You can get a pointer to the controls with m_IRM of the Window.

Code:
CIFflorian0 *pWnd = g_pCGInterface->GetFlorian0Window();

CIFStatic *pLabel = pWnd->m_IRM.GetResObj<CIFStatic>(1234, 1);
pLabel->SetText(L"Hello World");
However, I would recommend hiding this functionality inside another function so the code stays readable.

Code:
CIFflorian0 *pWnd = g_pCGInterface->GetFlorian0Window();

pWnd->SetLabelText(L"Hello World");
Code:
void CIFflorian0::SetLabelText(const wchar_t *text) {
  m_IRM.GetResObj<CIFStatic>(1234, 1)->SetText(text);
}
If you're using the controls on the window frequently, you can save time by storing the pointer to the control in the class instead of calling GetResObj every time. An example can be found here: [Only registered and activated users can see links. Click Here To Register...]