Max Winapi 2
#81
Posted 16 January 2009 - 06:53 PM
#82
Posted 16 January 2009 - 07:01 PM
I'm not impatient or newbish. I'm just a bit overwhelmed by 460 functions. I would probably only use around 10 anyways
Right, so like every other programming language, the best way to go about it is to use the example(s) given, and work from that. Work from the gmds there.
#83
Posted 20 January 2009 - 09:07 PM
EDIT: Sorry, its not the rich edit(although, when text is added to the rich edit, the rich edit commands are text.) It is the button. I cannot figure out how to click the button!
Edited by cswenson1, 21 January 2009 - 12:36 AM.
#84
Posted 22 January 2009 - 03:52 AM
[codebox]
//Create Event of Properties Window Object
//Init API Max 2//
API_Define_Styles();
//Create Window//
wndProperties=API_Window_Create(window_handle(),di
splay_get_width()/2-150,display_get_height()/2-212,300,425);
//Set Command Check//
API_Check_Set(1,wndProperties);
//Set Window Caption//
API_Window_SetText(wndProperties,"Properties");
//Create Tab Set//
tabProperties=API_Tab_Create(wndProperties,8,8,284
,350);
tabHandle=API_Control_GetHandle(tabProperties);
//Insert Each Tab into the Set//
API_Tab_InsertItem(tabProperties,0,"General");
API_Tab_InsertItem(tabProperties,1,"Graph");
//Draw in Font Tab//
API_Control_SetAutoTab(0);
//Font Name Label//
labelFontName=API_Button_Create(tabHandle,8,35,150
,55,BS_GROUPBOX);//*note label = Groupbox Control Button
API_Control_SetText(labelFontName,"Font Name:");
//Font Name Combobox//
comboFontName = API_Combobox_Create(tabHandle,16,60,125,20,CBS_HAS
STRINGS|CBS_AUTOHSCROLL|CBS_DROPDOWNLIST);
API_Combobox_AddString(comboFontName,"Arial");
API_Combobox_AddString(comboFontName,"Comic Sans MS");
API_Combobox_AddString(comboFontName,"Times New Roman");
API_Combobox_SetSel(comboFontName,API_Combobox_Fin
dString(comboFontName,docFontName));
//Font Size Label//
labelFontSize=API_Button_Create(tabHandle,175,35,9
5,55,BS_GROUPBOX);
API_Control_SetText(labelFontSize,"Font Size:");
//Font Size Combobox//
comboFontSize = API_Combobox_Create(tabHandle,200,60,45,20,CBS_HAS
STRINGS|CBS_DROPDOWNLIST);
API_Combobox_AddString(comboFontSize,"8");
API_Combobox_AddString(comboFontSize,"12");
API_Combobox_AddString(comboFontSize,"14");
API_Combobox_AddString(comboFontSize,"16");
API_Combobox_AddString(comboFontSize,"18");
API_Combobox_AddString(comboFontSize,"20");
API_Combobox_AddString(comboFontSize,"24");
API_Combobox_AddString(comboFontSize,"28");
API_Combobox_AddString(comboFontSize,"32");
API_Combobox_SetSel(comboFontSize,API_Combobox_Fin
dString(comboFontSize,string(docFontSize)));
///Font Style Label//
labelFontStyle=API_Button_Create(tabHandle,8,95,15
0,55,BS_GROUPBOX);//*note label = Groupbox Control Button
API_Control_SetText(labelFontStyle,"Font Style:");
//Font Is Bold Checkbox//
checkFontIsBold=API_Button_Create(tabHandle,25,120
,50,15,BS_AUTOCHECKBOX,WS_EX_WINDOWEDGE);
API_Styling_SetBackColor(checkFontIsBold,c_white);
API_Control_SetText(checkFontIsBold,"Bold");
API_Button_SetCheck(checkFontIsBold,docFontIsBold)
;
//Font Is Italic Checkbox//
checkFontIsItalic=API_Button_Create(tabHandle,100,
120,50,15,BS_AUTOCHECKBOX);
API_Styling_SetBackColor(checkFontIsItalic,c_white
);
API_Control_SetText(checkFontIsItalic,"Italic");
API_Button_SetCheck(checkFontIsItalic,docFontIsIta
lic);
//Font Color Label//
labelFontColor=API_Button_Create(tabHandle,175,95,
95,55,BS_GROUPBOX);
API_Control_SetText(labelFontColor,"Font Color:");
//Font Color//
editFontColor=API_Edit_Create(tabHandle,200,120,45
,20,ES_READONLY,WS_EX_CLIENTEDGE|WS_EX_WINDOWEDGE);
API_Styling_SetBackColor(editFontColor,docTextColo
r);
//Background Color Label//
labelBackColor=API_Button_Create(tabHandle,8,200,1
50,55,BS_GROUPBOX);
API_Control_SetText(labelBackColor,"Background Color:");
//Background Color//
editBackColor=API_Edit_Create(tabHandle,25,225,115
,20,ES_READONLY,WS_EX_CLIENTEDGE|WS_EX_WINDOWEDGE);
API_Styling_SetBackColor(editBackColor,docColor);
//Highlight Color Label//
labelHighlightColor=API_Button_Create(tabHandle,17
5,200,95,55,BS_GROUPBOX);
API_Control_SetText(labelHighlightColor,"Highlight Color:");
//Highlight Color//
editHighlightColor=API_Edit_Create(tabHandle,200,2
25,45,20,ES_READONLY,WS_EX_CLIENTEDGE|WS_EX_WINDOWE
DGE);
API_Styling_SetBackColor(editHighlightColor,docHig
hlightColor);
//Draw in Font Tab//
API_Control_SetAutoTab(1);
//Show Grid Checkbox//
checkShowGrid=API_Button_Create(tabHandle,8,28,70,
15,BS_AUTOCHECKBOX);
API_Styling_SetBackColor(checkShowGrid,c_white);
API_Control_SetText(checkShowGrid,"Show Grid");
API_Button_SetCheck(checkShowGrid,docGraphGrid);
//Show Grid Checkbox//
checkSnapGrid=API_Button_Create(tabHandle,80,28,80
,15,BS_AUTOCHECKBOX);
API_Styling_SetBackColor(checkSnapGrid,c_white);
API_Control_SetText(checkSnapGrid,"Snap to Grid");
API_Button_SetCheck(checkSnapGrid,docGraphSnap);
//Trace Checkbox//
checkTrace=API_Button_Create(tabHandle,170,28,80,1
5,BS_AUTOCHECKBOX);
API_Styling_SetBackColor(checkTrace,c_white);
API_Control_SetText(checkTrace,"Trace Graphs");
API_Button_SetCheck(checkTrace,docTraceMode);
//Close Button//
buttonClose=API_Button_Create(wndProperties,240,36
5,50,25);
API_Control_SetText(buttonClose,"Close");
API_Tab_SetCurSel(tabProperties,0);
API_Tab_SetCurFocus(tabProperties,0);
API_Window_Redraw(tabHandle);[/codebox]
if you need the step event code, ill add it, but id rather not
Edited by margoose, 22 January 2009 - 03:54 AM.
#85
Posted 26 January 2009 - 11:08 PM
but thing is where is hobbel, no one is gonna fix up these bugs are they?!?!?
#86
Posted 27 January 2009 - 03:20 AM
#87
Posted 27 January 2009 - 02:39 PM
if person_exists(Hobbel)
{
execute_string("please reply to this thread and fix up max win api2")
}
#88
Posted 19 July 2009 - 10:07 AM
#89
Posted 02 November 2009 - 01:57 PM
It says the file is damaged or invalid file size.
#90
Posted 02 November 2009 - 02:19 PM
I can't download it.
It says the file is damaged or invalid file size.
It's a server error.
I'll reupload it in about a hour.
#91
Posted 16 November 2009 - 04:40 PM
#92
Posted 21 November 2009 - 03:41 PM
Dammned ws_tabstop... and ws_group...
I need a little help from my friends..
some examle code... maybe... just maybe...
or little magic dust, tip, other trick.... I don't care..
Edited by zmaj, 21 November 2009 - 03:43 PM.
#93
Posted 23 November 2009 - 11:40 PM
Additional information:
I had to be sure whether the problem is with loading bitmaps, so I tried the other function: API_Styling_SetBackBitmap, and it works well.
Button = API_Button_Create(Win2,5,5,100,30);
Bitmap = API_Resource_LoadBitmap("awd.bmp");
API_Button_SetImage(Button, 0, Bitmap);
Edited by johnjoe, 23 November 2009 - 11:44 PM.
#94
Posted 25 November 2009 - 05:29 PM
#95
Posted 12 January 2010 - 03:53 AM
*EDIT* And today it's working again.
Edited by T-Bird, 13 January 2010 - 12:27 AM.
#96
Posted 16 February 2010 - 07:28 PM
#97
Posted 16 February 2010 - 08:25 PM
http://www.mediafire.com/?bymzmtnmjt1
#98
Posted 06 April 2010 - 03:56 AM
#99
Posted 07 April 2010 - 05:35 PM
I can get it to display, but can't figure out how to retrieve the button input from it.
#100
Posted 08 April 2010 - 07:18 AM
Hey there. Does anyone know how to register the input from a API_Dialog_MessageBox?
I can get it to display, but can't figure out how to retrieve the button input from it.
You have to use a variable to store it's return-value. Do like this:
dialog = API_Dialog_MessageBox(//Function parameters); // Now dialog will contain the return-value from API_Dialog_MessageBox(); Of course, you have to change "// Function parameters" to the correct parameters for the function.
// This is just for viewing the output
show_message("Output: " + string(dialog));I hope it helped! It was quite some time since I used MW2 last, but once I used it alot, so I think I still know how to do it!
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











