Edited by romis69, 02 September 2008 - 03:31 PM.
Max Winapi 2
#41
Posted 02 September 2008 - 12:34 AM
#42
Posted 05 September 2008 - 08:38 PM
If you use api_check_set on the window_handle(), the gm window does not recieve mouse clicks always.
Is this normal ?
#43
Posted 06 September 2008 - 02:07 AM
#44
Posted 07 September 2008 - 02:59 PM
How can I make it so that if I resize the parent window (created with WINAPI), all the controls from the window will automaticaly be resized ?
Something like HTML forms when you use 90% insted of 90px .
Is this possible ?
And one more problem. If the window is resizable, how can I prevent the user of making it 0 width and 0 height. A you know by default you can make the window very small. I want to set a minimum width/height, and don't allow the user to make the window smaller than that.
Hope you can help,
Thank you
Edited by digitalwar, 07 September 2008 - 03:23 PM.
#45
Posted 07 September 2008 - 05:27 PM
Seems nice, but it won'y let me download it, it complains that the link is broken/corrupted.
What software are you using? Grab something like 7zip at http://www.7-zip.org/
#46
Posted 07 September 2008 - 06:07 PM
Just use 7-Zip to open this file.
This file is not broken!!
Alexw
#47
Posted 07 September 2008 - 08:39 PM
#48
Posted 08 September 2008 - 07:39 PM
Create a WINAPI window in wich you will add all controls, and use window_set_visible(0) to hide the GM window.
If someone can help me with my problems I posted above, I would appreciate it.
Thank you
Bug Report :
I have a tab that has 3 items. I am using API_Control_SetAutoTab to add controls to the different items of the tab.
In one item I have added a trackbar control. Whenever I move the slider of the trackbar, the items from the Tab Control dissapear. I can still click on them, but they dissapear.
The same thing happens in the default example that comes with MaxWinapi 2.
Also, if I set a buddy to a trackbar, the text of the buddy does not change automaticaly, according with the position of the slider. Is this normal ?
What is the problem ?
Edited by digitalwar, 09 September 2008 - 08:05 PM.
#49
Posted 21 September 2008 - 03:57 PM
If i have already made a program using MaxWinAPI can i then replace the old dll with this new one and replace the old scripts with the new ones and still get the program to work?
Also do the api controls now work better and as normal when drawn directly onto the gm window, because with old one there were problems like when a control was destroyed it still showed on the gm window
Edited by DefuzionGames, 21 September 2008 - 04:00 PM.
#50
Posted 22 September 2008 - 03:34 PM
For exmaple you can use API_Listbox_GetCount ( Real Control ID ) for listboxes so is there a similar function for listviews?
#51
Posted 22 September 2008 - 06:11 PM
for now that function is absent. I am sure nick will add it soon.
Bye
#52
Posted 23 September 2008 - 03:00 AM
This is what we've got:
GUIWin_Init_All() (if you're downloading, replace the old one with this one)
global.GUIwin_tooltip = API_Window_Create(0,0,0,300,250,WS_BORDER,WS_EX_HIDDEN); API_Window_SetText(global.GUIwin_tooltip,"Tooltip"); API_Check_Set(7,global.GUIwin_tooltip); global.GUIwin_popup_start = API_Window_Create(0,0,0,256,220,WS_BORDER,0); API_Window_SetText(global.GUIwin_popup_start,"TODO List"); GUIWin_Init_PopupStart(global.GUIwin_popup_start); API_Check_Set(8,global.GUIwin_popup_start); global.GUIwin_object_properties = API_Window_Create(0,0,0,310,450,WS_BORDER,0); API_Window_SetText(global.GUIwin_object_properties,"Object Properties"); GUIWin_Init_ObjProp(global.GUIwin_object_properties); API_Check_Set(9,global.GUIwin_object_properties); API_Window_Show(global.GUIwin_object_properties,false); global.GUIwin_object_list = API_Window_Create(0,0,200,500,450,WS_BORDER,0); API_Window_SetText(global.GUIwin_object_list,"Object List"); GUIWin_Init_ObjectList(global.GUIwin_object_list); assert(API_Check_Set(10,global.GUIwin_object_list) != 0); //API_Window_Show(global.GUIwin_object_list,false);(assert is a fast function I just made)
And then, every step, we have this guy:
GUIWin_Step_Objectlist()
//HOLY #$&@ WHY THE $#^% DOESN'T THIS WORK!!!!!!
var command1, command2;
command1 = API_Check_Command(10);
if ( command1 == GUIwin_objlist_add_btn )
{
show_message("Event button")
command2 = API_Check_SecondaryCommand(10);
if ( command2 == BN_CLICKED ) {
show_message ("You clicked GUIwin_objlist_add_btn.");
}
}Now, why wouldn't that work? For a full editable, go to the end of this post: http://forum.ultimat...05235&t=7030366
This is perplexing EVERYONE ON THAT FORUM, including me, the one who added the WINApi in the first place.
So yeah, I'm asking for help. What the hell is going on here?
Edit:
Definition of GUIwin_objlist_add_btn inside GUIWin_Init_ObjectList():
// Add button GUIwin_objlist_add_btn = API_Button_Create(argument0,420,50,70,30, 0, 0 ); API_Control_SetText( GUIwin_objlist_add_btn, "Add object" );
Edited by Skarik, 23 September 2008 - 03:01 AM.
#53
Posted 23 September 2008 - 12:24 PM
I cant get the input command to work...
PS. Im using Game Maker 6, maby thats the problem...
And im already trying to find help at this problem since: Jul 20 2008, 04:02 PM
Alexw
Edited by alexw, 23 September 2008 - 01:10 PM.
#54
Posted 23 September 2008 - 03:10 PM
or am i wrong
EDIT:
just noticed in order to get the correct width of the window form created with API you have to subtract the windows X position which for some reason gets added to the width!??
e.g
window_width=(API_Window_GetWidth(mywin)-API_Window_GetX(mywin))
Edited by DefuzionGames, 23 September 2008 - 03:44 PM.
#55
Posted 23 September 2008 - 10:30 PM
Duh. The API_Define_Styles thingy just sets a bunch of local variables.i just realised something. if you use API_init() in an object different to the one form which you call the functions, GM won recognise the constants such WS_BORDER which are defined as LOCAL variables in the object from which API_Init() is called.
Now, is there a fix to my problem above? Please forgive me for being impatient, but this question is rather urgent.
Edit:
I found a problem. The windows which I have a problem with have list views. Anybody have an idea why a listview would prevent me from pressing a button? When checking what control I'm getting in the API_Check_Command, I get 6, which happens to be my listview.
Edit 2:
I got it. The listview editing thingies move focus to the listview. Har har har.
Edited by Skarik, 23 September 2008 - 11:16 PM.
#56
Posted 24 September 2008 - 05:38 PM
IO created a edit control on a window, then tried to destroy it using its id but it did not work!!!!
is it a bug with the dll?
#57
Posted 25 September 2008 - 04:52 PM
Is it me or do you post diffent problems then answer then get stuck for the fun of it. Try reading other posts!is it just me or does the API_Control_Destroy(ID) function not work?
IO created a edit control on a window, then tried to destroy it using its id but it did not work!!!!
is it a bug with the dll?
#58
Posted 25 September 2008 - 07:23 PM
Really useful.
Thanks.
#59
Posted 25 September 2008 - 08:41 PM
#60
Posted 26 September 2008 - 02:44 AM











