Help in DLL import

 

Can anyone help me by providing an example of how the following function is used correctly..

#import "user32.dll"
   long CreateWindowEx(uint dwExStyle,uint lpClassName,uint lpWindowName,uint dwStyle,int x,int y,int nWidth,int nHeight,int hWndParent,int hMenu,int hInstance,uint lpParam);
#import

Objective is to create a small window box (like the MessageBox)..
Thanks in advance..

 

I don't know much about creating windows, but it's not going to work. Even if you create a window, you can't receive the events to handle it.

  1. Use MessageBox,
  2. or spawn a standalone executable.
  3. or create an on chart GUI like mine (for MT4): Indicators: 'Money Manager Graphic Tool' indicator by 'takycard' Forum - Page 6
 
pipspider:

Can anyone help me by providing an example of how the following function is used correctly..

Objective is to create a small window box (like the MessageBox)..
Thanks in advance..

@whroeder1's code is a good start. I used it as a pattern back when I did MQL4 code.


Also, this article describes using standard libraries to create a panel. I haven't actually gone through the article yet; it's on my to do list.

https://www.mql5.com/en/articles/2171

 

Thanks guys for your answers.. Appreciate your time.. :)

I saw @kypa use that function to undock the chart in this thread https://www.mql5.com/en/forum/242907

Also I ask from the Service Desk about this, because I couldn't find any previous posts,
They said it is possible, but they cannot help with anything regarding DLLs.. (They said probably have to use DLLs)

I also found this EA that has such a window

fsd

I think in order to do this we have to make a custom DLL from C++ and import it..
But it seems like lot of work.. :D

Anyway guys, Thanks again for your time..

Undock MT5 (and maybe MT4) charts from terminal
Undock MT5 (and maybe MT4) charts from terminal
  • 2018.05.05
  • www.mql5.com
Hello! This is the beginning of the code: Terminal says "cannot find 'CreateWindowsEx' in 'user32.dll'...
 
:)