@Shortline
Try and avoid multi-line edit boxes in this dll, there's quite a few issues.
Thanks Krisando. Any chance you can recommend a dll or gex that handles multi-line edit boxes?
Posted 28 November 2010 - 01:32 AM
@Shortline
Try and avoid multi-line edit boxes in this dll, there's quite a few issues.
Posted 28 November 2010 - 01:56 AM
Sorry, haven't really looked into other alternatives for it. Most uses requiring multi-lines (coding, custom syntax) I can do just by opening a file with a common editor or by embedding it in the Window. Since It's rich text you may be able to insert a new line character, or new line tag (Many rich text interpreters work with standard html formatting tags). Sorry couldn't be of more help.
@Shortline
Try and avoid multi-line edit boxes in this dll, there's quite a few issues.
Thanks Krisando. Any chance you can recommend a dll or gex that handles multi-line edit boxes?
Posted 09 December 2010 - 03:57 AM
While there are a few issues with multi-line edit boxes, they are all just the control not clearing the background and re-redering itself when needed. An easy fix for this is whenever you recieve a check message from the control (regardless of whether anything actually changed), just store the current selection, select everything which forces a redraw, and then reset the selection (which forces another redraw). This little work-around is short, works well, and is the only simple solution I have found.Sorry, haven't really looked into other alternatives for it. Most uses requiring multi-lines (coding, custom syntax) I can do just by opening a file with a common editor or by embedding it in the Window. Since It's rich text you may be able to insert a new line character, or new line tag (Many rich text interpreters work with standard html formatting tags). Sorry couldn't be of more help.
Thanks Krisando. Any chance you can recommend a dll or gex that handles multi-line edit boxes?
@Shortline
Try and avoid multi-line edit boxes in this dll, there's quite a few issues.
var_temp[0] = API_Edit_GetSel(var_edit_awards, 0); var_temp[1] = API_Edit_GetSel(var_edit_awards, 1); API_Edit_SetSel(var_edit_awards, 0, string_length(API_Control_GetText(var_edit_awards))); API_Edit_SetSel(var_edit_awards, var_temp[0], var_temp[1]);
Edited by LaLaLa, 05 May 2011 - 11:25 PM.
Posted 09 December 2010 - 10:09 PM
While there are a few issues with multi-line edit boxes, they are all just the control not clearing the background and re-redering itself when needed. An easy fix for this is whenever you recieve a check from the control (regardless of whether anything actually changed), just store the current selection, select everything which forces a redraw, and then reset the selection (which forces another redraw). This little workaround is short, works well, and is the only simple solution I have found. The only "issue" is that the text flashes somewhat when typing a lot repeatedly, such as holding down a key or deleting a bunch of stuff, but it's still okay. Anyway, here is the code I use:
var_temp[0]=API_Edit_GetSel(var_edit_awards,0); var_temp[1]=API_Edit_GetSel(var_edit_awards,1); API_Edit_SetSel(var_edit_awards,0,string_length(API_Control_GetText(var_edit_awards))); API_Edit_SetSel(var_edit_awards,var_temp[0],var_temp[1]);
Posted 10 January 2011 - 08:51 PM
Listview1 = API_Listview_Create (win,10,150,room_width-20,300,LVS_REPORT,WS_EX_CLIENTEDGE);
API_Listview_SetExtendedStyle (Listview1,LVS_EX_FULLROWSELECT);
API_Listview_InsertColumnText (Listview1,0,100,"Firstname");
API_Listview_InsertColumnText (Listview1,1,100,"Lastname");
API_Listview_InsertColumnText (Listview1,2,100,"CPR-NR");
API_Listview_InsertColumnText (Listview1,3,100,"Phone 1");
API_Listview_InsertColumnText (Listview1,4,100,"Phone 2");
API_Listview_InsertColumnText (Listview1,5,100,"Street");
MySQL_Query (Handle,"SELECT fornavn, efternavn, cprnr, telefon1, telefon2, adresse FROM klienter");
Result = MySQL_ResultStore (Handle);
rows = MySQL_NumRows (Result);
fields = MySQL_NumFields (Result);
iii = 0;
repeat (rows)
{
row = MySQL_RowFetch (Result);
for (i=0;i<fields;i+=1)
{
data = MySQL_RowGetField (row,i);
API_Listview_InsertItemText (Listview1,i,iii,data);
}
iii+=1;
Listview1Antal=iii;
}
MySQL_ResultFree (Result);Object0: StepObject0: Drawi=0;
while(i<Listview1Antal)
{
if (API_Listview_GetSelected(Listview1,i))
{
chosen = i;
}
i+=1;
}
draw_text(10,50,'The chosen user id: '+string(chosen))




Posted 14 January 2011 - 10:03 PM
com = API_Check_Command(1); //Check for new commands /* Menu Commands */ //Show the help file if com == mnuMain_File_Help then show_info();
Posted 19 January 2011 - 01:48 PM
Edited by jlsnews, 19 January 2011 - 01:51 PM.
Posted 20 January 2011 - 04:28 PM
Edited by Fener, 20 January 2011 - 07:12 PM.
Posted 30 January 2011 - 04:05 AM
Posted 01 February 2011 - 02:32 PM
Posted 02 May 2011 - 03:50 PM
API_Init() win=window_handle() API_Check_Set(1, win) test=API_Button_Create(win, 0, 0, 100, 20, BS_NOTIFY) mode=false=Step=
cl=API_Check_Command(1)
if(cl=test)
{
mode=!mode
}
if(mode)
{
API_Control_SetPos(test, mouse_x, mouse_y)
}When the game starts and I move mouse down AND right, I see this:
Edited by Hummer, 03 May 2011 - 01:29 AM.
Posted 02 May 2011 - 09:58 PM
If you'd bothered to download and open the ZIP file from the website, you'd notice that all the documentation is within the Help folder.The link to the online documentation of the functions doesn't work.
Thumbs up if you think Miley Cyrus is hooooooot!!
Edited by LaLaLa, 05 May 2011 - 11:33 PM.
Posted 05 May 2011 - 07:53 AM
Posted 05 May 2011 - 11:03 PM
First, you shouldn't post your question here. Use the Novice and Intermediate Users forum instead.Can you help me? My project stopped with this problem! Please!
Edited by LaLaLa, 05 May 2011 - 11:30 PM.
Posted 05 May 2011 - 11:19 PM
Again:How Do I Open a Text file into the winapi box
You need to read a text file and then set the text of the edit control to that text. In GML, this would be:First, you shouldn't post your question here. Use the Novice and Intermediate Users forum instead.
{
var_edit_textFileDump = API_Edit_Create(window_handle(), 10, 10, 400, 300, ES_MULTILINE | ES_AUTOHSCROLL | ES_AUTOVSCROLL | WS_HSCROLL | WS_VSCROLL, WS_EX_CLIENTEDGE);// Create the large editable control.
var_file_handle = file_text_open_read("C:\File_Name_Here.txt");// Open your text file for reading (replace the name with the file you want to read).
while(!file_text_eof(var_file_handle))// Continue reading line by line until you get to the last line of the file.
{
API_Control_SetText(var_edit_textFileDump, API_Control_GetText(var_edit_textFileDump) + file_text_read_string(var_file_handle) + "
");// Append the next line of text to the edit control's text, along with a line-break.
file_text_readln(var_file_handle);// Move to the next line within the file.
}
file_text_close(var_file_handle);// Close the file once done.
}
Edited by LaLaLa, 05 May 2011 - 11:37 PM.
Posted 05 May 2011 - 11:56 PM
Where is the example code located? Is it in a Draw event?I tried creating a Help menu item to show the game info, show_info(). But I get a series of "Access Violations" to the MaxWinAPI.dll and RICHED20.dll.
Posted 06 May 2011 - 12:47 AM
I'm suprised that you didn't figure this out yourself, considering you were able to create the user interface and that MySQL code. The issue is that when you read the item number that is selected in a listview, it gives you the literal number, starting from 0 at the top and increasing downwards. Obviously this is normally the same as the order in which you create the items, until the user clicks on a column to sort it, which throws everything off.Hey, totally cool dll,
But have a problem with the "API List View",
when I make a user list with columns firstname, lastname, phone, street, etc.
and make some tables with data, i cannot identify which table I have selected.
The only thing I can see is the location of the table in the list.
I need a function like API_Listview_GetData(Real Control ID, column-name) example: API_Listview_GetDataSelected(Listview1,"Firstname");
Edited by LaLaLa, 06 May 2011 - 12:57 AM.
Posted 24 May 2011 - 06:52 PM
Posted 24 May 2011 - 10:20 PM
It's apparent that people don't read other posts before they post. As I said to another individual, you just need to download the actual example (which it sounds like you've done) and open the Help folder in the Zip file, which somehow you didn't see? The online documentation was the exact same thing, just online.Where can I find some documentation so I can know how to use this ? (online documentation link is broken
) The example is too complex
Also, the example isn't that complex. There's just a lot of code because it shows pretty much every control that the DLL can create. Just creating a little application window with some buttons is fairly easy. You only need API_Init(); and API_Button_Create();If you'd bothered to download and open the ZIP file from the website, you'd notice that all the documentation is within the Help folder.
Edited by LaLaLa, 24 May 2011 - 10:23 PM.
Posted 19 June 2011 - 06:30 AM
tab_main = API_Tab_Create(win_main,0,0,300,200) API_Tab_SetMinWidth(tab_main,100) API_Tab_InsertItem(tab_main,0,"TestTab1") API_Tab_InsertItem(tab_main,1,"TestTab2") API_Control_SetAutoTab(0) but_test0 = API_Button_Create(win_main,50,500,100,40,BS_CENTER) API_Control_SetText(but_test0,"Enable List")
Edited by Rhutos, 19 June 2011 - 06:47 PM.
0 members, 0 guests, 0 anonymous users