Jump to content


Photo

Max Winapi - My Windows Controls Dll


  • Please log in to reply
376 replies to this topic

#361 Hockeyflyers

Hockeyflyers

    Hockeyplayer Games

  • New Member
  • 1108 posts
  • Version:Unknown

Posted 25 June 2008 - 12:54 PM

Code shoudld look something like this: myButton=API_Button_Create(.....);


It does. But when I run it in debug mode, myButton has the same value as anotherButton.
  • 0

#362 alexw

alexw

    GMC Member

  • New Member
  • 103 posts

Posted 29 June 2008 - 12:13 PM

Hey,

Is it possible to add an hide window function to this dll.
So that u can click on the tray icon to restore it.

I also appricated that u can make an menu when u click on the tray icon.

Thanks,
Alexw
  • 0

#363 Iruka

Iruka

    KopyKon - Kitso

  • GMC Member
  • 310 posts

Posted 10 July 2008 - 09:12 PM

Hello, I have a problem that is quite perplexing, well to me. I have followed the example to a T. Though when I press a button, nothing happens. Here is my code:

regt = API_Button_Create(window_handle(),x+40,y+440,110,2
1,BS_CENTER,false);
API_Control_SetText(regt,"Click Me!");


cmd = API_Check_Command(1);
if (cmd == regt)
{
show_message("You clicked me!");
}


Note I did not call the Dll, this is simply because I am using the Extension.

As you can see, this is EXACTLY like the example. So what is wrong?

Please reply,
-Iruka
  • 0

#364 callum

callum

    GMC Member

  • New Member
  • 176 posts

Posted 10 July 2008 - 09:44 PM

you forgot to add after you create the button

API_Check_Set(1,window_handle());
  • 0

#365 Iruka

Iruka

    KopyKon - Kitso

  • GMC Member
  • 310 posts

Posted 10 July 2008 - 10:00 PM

you forgot to add after you create the button

API_Check_Set(1,window_handle());


Wow, how did I miss that? Well, thank you. You were most helpful.

Thanks,
-Iruka
  • 0

#366 molloyboy08

molloyboy08

    pyr0t3chnic

  • New Member
  • 473 posts

Posted 17 July 2008 - 10:09 PM

Okay I'll post a few questions: All deal with the listview...
When you click on something in it only the 1st (column 0) is able to be selected. Is their any way to change that?
ie:
select the whole row instead of just that column?
select an item in a different column?
make a different column the one that highlights?

I ask because only the 0 based items are selectable at the moment and I would like to select differently, and edit a different one. Ideally I want answers to as much of them as possible even if the answer is no. I figure someone is bound to know. (Just don't tell me in the help file because its giving me problems lol)

edit: It seems my little break from gamemaker and this dll have made me rusty and forgetful, how do I process clicks and stuff on a listview?

Edited by molloyboy08, 17 July 2008 - 10:30 PM.

  • 0

#367 Todi

Todi

    GMC Member

  • New Member
  • 29 posts

Posted 27 July 2008 - 03:34 AM

Hello ppl,

I'm use this DLL for a while, and short time ago I, finally, was find the control that like a "label" in Delphi, is the Static Control. Well, when I use this control a problem occur, the controls not appear with the text that I wrote.

Somebody already would have this problem?
I'd like to know, how solve it.

Thanks for your answers!

Cordially,

Edited by Todi, 27 July 2008 - 03:36 AM.

  • 0

#368 allan124

allan124

    GMC Member

  • New Member
  • 4 posts

Posted 01 October 2008 - 11:35 PM

can someone show me the script to make a combobox that does a different function depending on what is selected. e.g a variable value is changed.

Edited by allan124, 01 October 2008 - 11:36 PM.

  • 0

#369 ari_aaron

ari_aaron

    GMC Member

  • New Member
  • 295 posts

Posted 31 January 2010 - 03:35 AM

The latest version is at http://allocated.nl/gmdlls/maxwinapi2/ or http://allocated.nl/gmdlls/maxwinapi/ , as linked in the first post?


Also, are any of the GEX's for this latest version (that fixes GM window sizing issues)?
  • 0

#370 contactnero

contactnero

    GMC Member

  • GMC Member
  • 12 posts

Posted 03 November 2011 - 06:27 PM

how can i scroll down a treeview?
API_Scroll_SetPos (list, 1, 999); does not work...
  • 0

#371 creepers9164

creepers9164

    GMC Member

  • GMC Member
  • 74 posts
  • Version:GM8

Posted 09 November 2011 - 01:42 PM

It seems as when I try to download this, I am asked for a password. :confused:
  • 1

#372 DefuzionGames

DefuzionGames

    GMC Member

  • GMC Member
  • 1435 posts
  • Version:Unknown

Posted 08 February 2012 - 09:01 PM

uising the listbox under v2 how do i get the TEXT of the selected string/item in the listbox??

alll the function seem to return a zero based index
  • 0

#373 Master-Code

Master-Code

    GMC Member

  • GMC Member
  • 2 posts

Posted 08 July 2012 - 12:09 PM

If I'm using the API_Controls_EnableAgw function to place the controls in the game window, what do I put for 'Real Parent Handle' when making a checkbox?

Thanks! ;)


You would pass it the window_handle, which you can get with the GM method window_handle();

But actually GM windows are known to cause something like

Posted Image

as per http://gmc.yoyogames...&...t&p=1859617 apparently due to the way the DLL interacts with GM Windows which use DirectX. http://gmc.yoyogames...&...t&p=1860396 explains it roughly.

Point is, it would be better to create a new window using the dll.

What I recommend is the following in the create event:

global.window[0] = window_handle();
API_Window_Show(global.window[0],SW_HIDE);


W = room_width;
H = room_height;
X = window_client_left-5;
Y = window_client_top-32;
	
global.window[1] = API_Window_Create(X,Y,W,H,WS_CAPTION|WS_POPUPWINDOW|WS_SYSMENU|W
S_MAXIMIZEBOX|WS_MINIMIZEBOX,false);

API_Check_Set(1,global.window[1]);

This will create a new MaxWinAPI window, and hide the GM window (so you don't have an unnecessary window if you don't use it). The reason I passed global.window[1] "false" for the parent, is that I don't want them to be related. In other words, me making global.window[0] (the GM window) hidden has no effect on global.window[1] (the actual game window, that the DLL created). The code also puts the new window in the same place (approximately) the GM window would have been, and makes it the same size as the room. Thus you have a dll-created window that is a near perfect replacement for the GM-made one.

Don't forget to put

if(API_Check_Quit(1) || keyboard_check_direct(vk_escape))	
{
	game_end();
}

in the Step event. This will end the game if the window you created was closed, or if ESC was pressed.


This returns error for me...

___________________________________________
ERROR in
action number 1
of Create Event
for object Controller:

Error in code at line 8:
   X = window_client_left-5;
       ^
at position 6: Unknown variable window_client_left

  • 0

#374 ThePC007

ThePC007

    Chickenator

  • GMC Member
  • 558 posts
  • Version:GM:Studio

Posted 13 October 2013 - 05:29 PM

Why did you delete the download links? 


  • 0

#375 DonPotenzo

DonPotenzo

    GMC Member

  • New Member
  • 12 posts
  • Version:None

Posted 14 October 2013 - 02:52 AM

http://gamemaker.cc/...d/maxwinapi.php

http://gamemaker.cc/.../maxwinapi2.php

 

Kind Regards


  • 0

#376 Nahuel3d

Nahuel3d

    GMC Member

  • GMC Member
  • 86 posts
  • Version:GM:Studio

Posted 20 October 2013 - 12:16 AM

Thank you!


  • 0

#377 rockyfelle185

rockyfelle185

    GMC Member

  • GMC Member
  • 981 posts
  • Version:GM8

Posted 02 May 2014 - 01:36 PM

Well, sort of an old bump, but since this is the only winapi I guess I have no choice ;p In the example gmk, all API-windows stays on top, allways, not really optimal, anyone have more info on this?


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users