0 registered members (),
1,459
guests, and 9
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: windows functions?
[Re: Espér]
#301141
12/08/09 16:01
12/08/09 16:01
|
Joined: Mar 2008
Posts: 2,247 Baden Württemberg, Germany
Espér
OP
Expert
|
OP
Expert
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
|
ok... got another windows question.... 1.) Is there a way to create a frame or border inside the A7 Window? 2.) Any way to change the layer of the menü so i can show cursor or panels above it? 3.) How to remove a menü/frame/border, if i don´t need it anymore? 4.) How to call a homepage with the standard Browser? I tried:
exec("http://rmxpworld.de", NULL);
But nothing happened thx for all help
Last edited by Espér; 12/08/09 21:03.
|
|
|
Re: windows functions?
[Re: Espér]
#301559
12/11/09 17:22
12/11/09 17:22
|
Joined: Aug 2002
Posts: 164 Houston
Nicholas
Member
|
Member
Joined: Aug 2002
Posts: 164
Houston
|
would you mind posting your new code that doesn't freeze as an example. thanks and to help out I don't think the new exec is actually implemented yet, but this one will work.
function open_url()
{
exec("%PROG_DIR%\\internet explorer\\iexplore.exe","http://www.3dgamestudio.com");
}
Black holes are where God divided by zero.
|
|
|
Re: windows functions?
[Re: Nicholas]
#301563
12/11/09 17:51
12/11/09 17:51
|
Joined: Oct 2007
Posts: 5,210 Ä°stanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,210
Ä°stanbul, Turkey
|
1)i dont get it what do you want exactly?
2)i am not sure but i guess you cant.
3)use according removal function, search on winapi docs.
4)ShellExecute(NULL, "open", "http://www.acknexturk.com", NULL, NULL, SW_SHOWNORMAL);
opens in default browser. dont forget to include windows.h
3333333333
|
|
|
Re: windows functions?
[Re: Rei_Ayanami]
#301576
12/11/09 19:10
12/11/09 19:10
|
Joined: Jul 2007
Posts: 959 nl
flits
User
|
User
Joined: Jul 2007
Posts: 959
nl
|
i am dont get it working very good but here is the thing you can do
headwindow = CreateWindowEx(NULL,"STATIC","",WS_VISIBLE | WS_POPUP,recta.right-200,40,200,60,hWnd,NULL,hInstance,NULL);
hwnd_coll[0] = CreateWindowEx(NULL,"STATIC","you text",WS_VISIBLE | WS_CHILD | WS_BORDER,10,color_offset_y - 25,150,20,headwindow,50,hInstance,"1");
for more info check this: http://msdn.microsoft.com/en-us/library/ms632680(VS.85).aspx
you can swicth the STATIC to BUTTON/COMBOBAOX/EDIT rest didnt test but i cant get it to retreive changements in the windows so you need GetWindowText for that
Last edited by flits; 12/11/09 19:10.
"empty"
|
|
|
Re: windows functions?
[Re: flits]
#301617
12/12/09 02:03
12/12/09 02:03
|
Joined: Aug 2002
Posts: 164 Houston
Nicholas
Member
|
Member
Joined: Aug 2002
Posts: 164
Houston
|
can someone please post (or pm me) a working copy of the code, I'm not sure what Quadraxas meant by returning a 0 and my code keeps freezing and not able to close without ctrl+alt+del please
Black holes are where God divided by zero.
|
|
|
Re: windows functions?
[Re: Nicholas]
#301619
12/12/09 02:16
12/12/09 02:16
|
Joined: Mar 2008
Posts: 2,247 Baden Württemberg, Germany
Espér
OP
Expert
|
OP
Expert
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
|
//-------------------------------------------------------------------------------------------------
// • Einbinden der Scripts
//-------------------------------------------------------------------------------------------------
#include <acknex.h>
#include <default.c>
#include <windows.h>
//-------------------------------------------------------------------------------------------------
// • Einbinden der Pfade
//-------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------
// • Funktionen
//-------------------------------------------------------------------------------------------------
long ScanMessage(UINT message, WPARAM wParam, LPARAM lParam);
function menucreate()
{
long menuheader;
long submenu1;
long submenu12;
HWND hwnd=hWnd;
// CreateMenu(); ist der Befehl dazu, der gibt ein Handle auf das neue Menü zurück
menuheader = CreateMenu();
submenu1 = CreateMenu();
submenu12 = CreateMenu();
// InsertMenu(); ist der Befehl der Menüpunkte erstellt
// InsertMenu(longpointer, Position, Flags, sublongpointer / id, "Anzeigestring");
InsertMenu(submenu1, 1, MF_BYPOSITION|MF_STRING|MF_POPUP, submenu12, "Neu");
InsertMenu(submenu1, 2, MF_BYPOSITION|MF_STRING, 2, "Öffnen");
InsertMenu(submenu1, 3, MF_BYPOSITION|MF_STRING, 3, "Beenden");
InsertMenu(submenu12, 4, MF_BYPOSITION|MF_STRING, 4, "Karte");
InsertMenu(submenu12, 5, MF_BYPOSITION|MF_STRING, 5, "Map");
InsertMenu(submenu12, 6, MF_BYPOSITION|MF_STRING, 6, "Quest");
InsertMenu(menuheader, 0, MF_BYPOSITION|MF_STRING|MF_POPUP, submenu1, "Datei");
SetMenu(hwnd,menuheader);
}
//-------------------------------------------------------------------------------------------------
// • Mainscripts
//-------------------------------------------------------------------------------------------------
function main()
{
fps_max= 60;
video_mode = 8;
video_aspect = 1.777;
level_load(NULL);
wait(3);
menucreate();
on_scanmessage = ScanMessage;
}
//-------------------------------------------------------------------------------------------------
// • Longs
//-------------------------------------------------------------------------------------------------
long ScanMessage(UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message) {
case WM_COMMAND:
switch (wParam) {
case 2:
printf("Es wurde auf 'Öffnen' geklickt");
return(1);
case 3:
printf("Es wurde auf 'Beenden' geklickt");
return(1);
case 4:
printf("Es wurde auf 'Neue Karte' geklickt");
return(1);
case 5:
printf("Es wurde auf 'Neue Map' geklickt");
return(1);
case 6:
printf("Es wurde auf 'Neue Quest' geklickt");
return(1);
default:
return(0);
break;
}
default:
break;
}
}
Have fun..
|
|
|
Re: windows functions?
[Re: Espér]
#301624
12/12/09 04:09
12/12/09 04:09
|
Joined: Aug 2002
Posts: 164 Houston
Nicholas
Member
|
Member
Joined: Aug 2002
Posts: 164
Houston
|
Great, thanks man, I did notice something though, not sure if that script works on your machine, but it kills mine like usual, but with some tweaking I got it to work. 1. switch (WM_COMMAND) { case WM_COMMAND: switch (wParam) { //you have switch (message) this didn't work for me until I changed it back to WM_COMMAND 2. case 2: printf("Es wurde auf 'Neue Map' geklickt"); return(1); //I don't know why this wouldn't work, but case 2 always seems to be for mousing over the window bar or menu and freezes it.. all I did was change the InsertMenu line to not have 2, I also had to mix and match different numbers or the same numbers to make the window title stop being a button, see below for the sample and change my commented lines to see what I mean Here is my updated code in case anyone else has the same problem
//-------------------------------------------------------------------------------------------------
// • Einbinden der Scripts
//-------------------------------------------------------------------------------------------------
#include <acknex.h>
#include <default.c>
#include <windows.h>
//-------------------------------------------------------------------------------------------------
// • Einbinden der Pfade
//-------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------
// • Funktionen
//-------------------------------------------------------------------------------------------------
long ScanMessage(UINT message, WPARAM wParam, LPARAM lParam);
function menucreate()
{
long menuheader;
long submenu1;
long submenu12;
HWND hwnd=hWnd;
// CreateMenu(); ist der Befehl dazu, der gibt ein Handle auf das neue Menü zurück
menuheader = CreateMenu();
submenu1 = CreateMenu();
submenu12 = CreateMenu();
// InsertMenu(); ist der Befehl der Menüpunkte erstellt
// InsertMenu(longpointer, Position, Flags, sublongpointer / id, "Anzeigestring");
InsertMenu(submenu1, 1, MF_BYPOSITION|MF_STRING|MF_POPUP, submenu12, "Neu");
InsertMenu(submenu1, 3, MF_BYPOSITION|MF_STRING, 3, "Öffnen");
InsertMenu(submenu1, 4, MF_BYPOSITION|MF_STRING, 4, "Beenden");
InsertMenu(submenu12, 5, MF_BYPOSITION|MF_STRING, 8, "Karte"); // use different numbers if you have a problem
InsertMenu(submenu12, 6, MF_BYPOSITION|MF_STRING, 6, "Map"); // or use the same if you have a problem, I had to use both methods here
InsertMenu(submenu12, 7, MF_BYPOSITION|MF_STRING, 7, "Quest");
InsertMenu(menuheader, 0, MF_BYPOSITION|MF_STRING|MF_POPUP, submenu1, "Datei");
SetMenu(hwnd,menuheader);
}
//-------------------------------------------------------------------------------------------------
// • Mainscripts
//-------------------------------------------------------------------------------------------------
function main()
{
fps_max= 60;
video_mode = 8;
video_aspect = 1.777;
level_load(NULL);
wait(3);
menucreate();
on_scanmessage = ScanMessage;
}
//-------------------------------------------------------------------------------------------------
// • Longs
//-------------------------------------------------------------------------------------------------
long ScanMessage(UINT message, WPARAM wParam, LPARAM lParam)
{
switch (WM_COMMAND) {
case WM_COMMAND:
switch (wParam) {
case 3:
printf("Öffnen");
return(1);
case 4:
printf("Beenden");
return(1);
case 8:
printf("Es wurde auf 'Neue Karte' geklickt");
return(1);
case 6:
printf("Es wurde auf 'Neue Map' geklickt");
return(1);
case 7:
printf("Es wurde auf 'Neue Quest' geklickt");
return(1);
default:
return(0);
break;
}
default:
break;
}
}
I am using A7.8 on Windows 7 32 bit if you want to know thanks for the help and if I find out how to add the scrollbars and stuff I'll let you know.
Last edited by Nicholas; 12/16/09 14:08.
Black holes are where God divided by zero.
|
|
|
|