Jump to content


Photo

Max Winapi - My Windows Controls Dll


  • Please log in to reply
376 replies to this topic

#351 DefuzionGames

DefuzionGames

    GMC Member

  • GMC Member
  • 1444 posts
  • Version:Unknown

Posted 01 June 2008 - 06:59 PM

how do add scrollbars to the edit control when you have a multiline control. At the moment i have to manually scroll down by selecting and dragging the cursro.

Is it something to do with the flags?
  • 0

#352 callum

callum

    GMC Member

  • New Member
  • 176 posts

Posted 01 June 2008 - 08:47 PM

WS_VSCROLL and WS_HSCROLL you can use in the multiline edit control
  • 0
Extensions: EditBox

#353 DefuzionGames

DefuzionGames

    GMC Member

  • GMC Member
  • 1444 posts
  • Version:Unknown

Posted 02 June 2008 - 10:29 PM

Thanks Callum. It worked
  • 0

#354 Todi

Todi

    GMC Member

  • New Member
  • 29 posts

Posted 09 June 2008 - 11:50 AM

Hello ppl!

I have some doubt about MaxWinAPI, so, i'd like to know if i can turn embedded in main window the controls created by this Dll?
What i mean is no more windows out of the main GM window, but, running in main for use in my games.

Thanks!
  • 0

GrindLabs | PlayFire | facebook | twitter | last.fm
PSN ID: ToujiBR | Steam ID: toujibr


#355 romis69

romis69

    GMC Member

  • New Member
  • 139 posts

Posted 16 June 2008 - 02:34 AM

Hello ppl!

I have some doubt about MaxWinAPI, so, i'd like to know if i can turn embedded in main window the controls created by this Dll?
What i mean is no more windows out of the main GM window, but, running in main for use in my games.

Thanks!


Of course, you can, but as mentioned before, GameMaker and the Windows API handle refresh differently. Please see http://gmc.yoyogames...&...t&p=2654625 for more info.

On a side note, I've noticed that putting an API_DS_AddBitmap-added image into a window will make it go on top of all other cotrols. I'm looking to set it as a background. Does anyone know what I should do?

Also, is way to call a line-break or a tab-break? Dialog boxes treat "#" just as a number sign.

Edited by romis69, 16 June 2008 - 02:54 AM.

  • 0

#356 Hockeyflyers

Hockeyflyers

    Hockeyplayer Games

  • New Member
  • 1108 posts
  • Version:Unknown

Posted 20 June 2008 - 08:52 PM

Can you tell the arguments to the API_Scroll functions?

Can anyone?
  • 0

#357 romis69

romis69

    GMC Member

  • New Member
  • 139 posts

Posted 20 June 2008 - 08:56 PM

Can you tell the arguments to the API_Scroll functions?

Can anyone?


Take a look at the help (.CHM) file that comes with MaxWinAPI.

For example:

Real API_Scrollbar_Create (Real Parent Window Handle, Real X, Real Y, Real Width, Real Height, Real Style Flags );

This function creates a scrollbar control and returns the Control ID of it.


  • 0

#358 Hockeyflyers

Hockeyflyers

    Hockeyplayer Games

  • New Member
  • 1108 posts
  • Version:Unknown

Posted 20 June 2008 - 09:00 PM

Can you tell the arguments to the API_Scroll functions?

Can anyone?


Take a look at the help (.CHM) file that comes with MaxWinAPI.

For example:

Real API_Scrollbar_Create (Real Parent Window Handle, Real X, Real Y, Real Width, Real Height, Real Style Flags );

This function creates a scrollbar control and returns the Control ID of it.

Gee, thanks.

I must've missed that.
  • 0

#359 Hockeyflyers

Hockeyflyers

    Hockeyplayer Games

  • New Member
  • 1108 posts
  • Version:Unknown

Posted 25 June 2008 - 01:18 AM

Hey sorry about the double post, it's been 4 days and I have another question.

I have buttons and they destroy and create themselves constantly depending on what page is viewing and when I click a button nothing happens.
I ran it in debug mode and found out that the buttons have the same number value as other controls, which explains why nothing happens when I click the button. Is there a possible way of getting around that?
  • 0

#360 romis69

romis69

    GMC Member

  • New Member
  • 139 posts

Posted 25 June 2008 - 01:44 AM

Hey sorry about the double post, it's been 4 days and I have another question.

I have buttons and they destroy and create themselves constantly depending on what page is viewing and when I click a button nothing happens.
I ran it in debug mode and found out that the buttons have the same number value as other controls, which explains why nothing happens when I click the button. Is there a possible way of getting around that?


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

#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
The A.S. Clubę has been working on a new project. Called The Golden Century.
In this new game you are going experience to be at war on sea or on land, in the Golden Age.
For more information, check the The Golden Century Homepage.

#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

:: I Use ::
Game Maker 8 Pro | Code::Blocks with GCC/MinGW | Eclipse Galileo with JDK 6 | Bluefish 2
Windows 7 Ultimate | Ubuntu 10.10
Firefox 3.6

* Did I help you? If so, press the Posted Image button in the bottom right corner of the post :P thanks.


#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
Extensions: EditBox

#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

:: I Use ::
Game Maker 8 Pro | Code::Blocks with GCC/MinGW | Eclipse Galileo with JDK 6 | Bluefish 2
Windows 7 Ultimate | Ubuntu 10.10
Firefox 3.6

* Did I help you? If so, press the Posted Image button in the bottom right corner of the post :P thanks.


#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
Returning after a break from gamemaker.
Gamemaker experience: 6,7 both paid. 8 soon to be pro
Programming knowledge: (May be missing a few currently)
C, C#, C++, java, HTML, CSS, Javascript, PHP, ASP.NET, SQL, Visual Basic, Perl, assembly, batch

Temporary sig while I figure out if I have anything worthwhile to put.

#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

GrindLabs | PlayFire | facebook | twitter | last.fm
PSN ID: ToujiBR | Steam ID: toujibr


#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
Still here... on this forum.

#372 DefuzionGames

DefuzionGames

    GMC Member

  • GMC Member
  • 1444 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
  • 963 posts
  • Version:GM:Studio

Posted 13 October 2013 - 05:29 PM

Why did you delete the download links? 


  • 0

#375 DonPotenzo

DonPotenzo

    GMC Member

  • GMC Member
  • 26 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
  • 102 posts
  • Version:GM:Studio

Posted 20 October 2013 - 12:16 AM

Thank you!


  • 0

#377 Rockyfelle

Rockyfelle

    GMC Member

  • GMC Member
  • 1055 posts

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

_UNDEFINED

Sometimes I just wanna giveExkakxWord4.giftoExkakxWord1.gifExkakxWord2.gifuntil itExkakxWord3.gifme

By reading this signature you take full responsibility for any emotional damage/butthurt it might cause you.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users