Josbe Posted September 28, 2004 Posted September 28, 2004 That's what happens when you try and upload 2 megs of stuff over dialup.... Try again. <{POST_SNAPBACK}>Thank you. AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta
trids Posted September 28, 2004 Posted September 28, 2004 I've been watching non-GUI related posts till now ( :"> ) so I'm a bit out of the loop in this area .. but did someone say something about trayicon menus .. Will we be able to change the menu on the fly? Specifically: to modify the menu depending on events at runtime?Here's hoping
SlimShady Posted September 28, 2004 Posted September 28, 2004 Will we be able to change the menu on the fly? Specifically: to modify the menu depending on events at runtime?That would be great!
Holger Posted September 28, 2004 Posted September 28, 2004 I'm working at the moment on GUI_HIDE and GUI_SHOW for "menus" but ONLY for MENU's, menuitem is not possible at the moment (maybe never...) Cause there is also a problem with the 'first' keyboard-input. At the moment there is already GUICtrlSetState() for menuitems available or did you mean something else? ...so long... Old project:GUI/Tray menu with icons and colors Other old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView
Administrators Jon Posted September 28, 2004 Author Administrators Posted September 28, 2004 (edited) I'm working at the moment on GUI_HIDE and GUI_SHOW for "menus" but ONLY for MENU's, menuitem is not possible at the moment (maybe never...) Cause there is also a problem with the 'first' keyboard-input. At the moment there is already GUICtrlSetState() for menuitems available or did you mean something else? ...so long... I think he means adding and removing items from menus. Adding is easy, but at the moment as you know removing controls isn't possible due to the way they are accessed and stored (for speed). I'll change the code so that removing controls is possible and then we can see if we can sort something out for menus. I was going to make it possible to delete controls tomorrow anyway. Edited September 28, 2004 by Jon Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
Holger Posted September 28, 2004 Posted September 28, 2004 @Jon: really great Old project:GUI/Tray menu with icons and colors Other old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView
Holger Posted September 28, 2004 Posted September 28, 2004 (edited) @Jon: could you please take a look at CreateMENUITEM? I think there is a small bug at the beginning: ... if (nSubGlobalID == -1) hMenu = lpWin->hMenu; else { ... Maybe it should be: ... if (nSubGlobalID == -1) lpCtrl->hMenu = lpWin->hMenu; else { ... cause hMenu alone is never used in this function. Regards Holger Edited September 28, 2004 by Holger Old project:GUI/Tray menu with icons and colors Other old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView
SlimShady Posted September 29, 2004 Posted September 29, 2004 (edited) I saw in the changelog that you added ControlGethandle but it's not documented. And I really would like to see the source of AutoIt3 (unstable version). Did you or can you upload it somewhere? Edited September 29, 2004 by SlimShady
Administrators Jon Posted September 29, 2004 Author Administrators Posted September 29, 2004 I saw in the changelog that you added ControlGethandle but it's not documented.And I really would like to see the source of AutoIt3 (unstable version).Did you or can you upload it somewhere?I'd forgotten all about that function. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
Administrators Jon Posted September 29, 2004 Author Administrators Posted September 29, 2004 (edited) Updated with some fixes from JP and GuiCtrlDelete() GuiCtrlDelete() works on most the functions except the tree/menu controls... Devs: The framework has been added so that controls can be deleted and the memory for controls is only allocated when required. Controls ID are sequential until the maximum number of controls have been created at which point IDs are recycled. Edited September 29, 2004 by Jon Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
Administrators Jon Posted September 29, 2004 Author Administrators Posted September 29, 2004 Updated with some more JP bugfixes. Also fixed a GDI leak The maximum number of controls per window has been raised to 4096 and each control only uses up memory when it is created Yes, 4096 is a stupidly high number but as it doesn't affect performance what the hell Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
Holger Posted September 29, 2004 Posted September 29, 2004 (edited) @Jon: how about this addition/change to GUICtrlDelete()? expandcollapse popup//////////////////////////////////////////////////////////////////////////////////////////////// // CtrlDelete() // //////////////////////////////////////////////////////////////////////////////////////////////// int CGuiBox::CtrlDelete(int nGlobalID) { int nWinIdx, nCtrlIdx, i; if (GlobalIDtoCtrlIndex(nGlobalID, nWinIdx, nCtrlIdx) == false) return 0; // Control not used // Some quick access pointers GUIWINDOW *lpWin = m_Windows[nWinIdx]; GUICONTROL *lpCtrl = lpWin->Ctrl[nCtrlIdx]; switch (lpCtrl->cType) { case AUT_GUI_CONTEXTMENU: return 0; // Can't delete these yet case AUT_GUI_MENUITEM: case AUT_GUI_MENU: if (lpCtrl->cType == AUT_GUI_MENU) for (i=AUT_GUI_FIRSTCONTROL;i<lpWin->nMaxCtrl;++i) if (lpWin->Ctrl[i]->hMenu == lpCtrl->hMenu && lpWin->Ctrl[i]->cType == AUT_GUI_MENUITEM) DeleteCtrlIndex(lpWin, i); if (!DeleteMenu(lpCtrl->hMenu,nGlobalID,MF_BYCOMMAND)) DeleteMenu(lpWin->hMenu,nGlobalID,MF_BYCOMMAND); DrawMenuBar(lpWin->hWnd); break; case AUT_GUI_TREEVIEWITEM: SendMessage(lpCtrl->hBuddy,TVM_DELETEITEM,0,(LPARAM)(HTREEITEM)lpCtrl->hItem); break; case AUT_GUI_TREEVIEW: if (lpCtrl->hTvIml != NULL) ImageList_Destroy(lpCtrl->hTvIml); for (i=AUT_GUI_FIRSTCONTROL;i<lpWin->nMaxCtrl;++i) if (lpWin->Ctrl[i]->hBuddy == lpCtrl->hWnd && lpWin->Ctrl[i]->cType == AUT_GUI_TREEVIEWITEM) DeleteCtrlIndex(lpWin, i); // cause treeview has normal window handle we run through default: // For controls that just need a simple DestroyWindow() on their handle // Delete the font if (lpCtrl->hFont != NULL) DeleteObject(lpCtrl->hFont); DestroyWindow(lpCtrl->hWnd); break; } // The control has been deleted, now delete the control structure memory DeleteCtrlIndex(lpWin, nCtrlIdx); return 1; } // CtrlDelete() Regards Holger Edited September 29, 2004 by Holger Old project:GUI/Tray menu with icons and colors Other old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView
Administrators Jon Posted September 30, 2004 Author Administrators Posted September 30, 2004 Cheers,One thing to note, now that control memory is allocated on the fly you have to check for the condition that lpWin->Ctrl != NULL. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
this-is-me Posted September 30, 2004 Posted September 30, 2004 (edited) @jon, I have been using the controlcommand LV_ commands for while with great success, and would like to know if you could do any on the TV_ commands. I have had no problems with getting info on the listviews, but would like to see at least TV_SelectItem ItemName Thanks. Edited September 30, 2004 by this-is-me Who else would I be?
Administrators Jon Posted September 30, 2004 Author Administrators Posted September 30, 2004 @jon, I have been using the controlcommand LV_ commands for while with great success, and would like to know if you could do any on the TV_ commands. I have had no problems with getting info on the listviews, but would like to see at least TV_SelectItem ItemNameThanks.It's planned, yeah. When, I have no idea. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
this-is-me Posted September 30, 2004 Posted September 30, 2004 Another long overdue addition, IMHO, is unlimited optional parameters to user-definded functions. Who else would I be?
redndahead Posted September 30, 2004 Posted September 30, 2004 @Jon: In your lovely spare time have you or anybody submitted to you a way of getting the text from a slected treeview item? red
this-is-me Posted September 30, 2004 Posted September 30, 2004 @Lar, lol. If I new c++ I would certainly try to submit the code to help out on this... Can you point me to any good resources on learning it? That way others could bug me about progress on autoit as well. Who else would I be?
Valik Posted September 30, 2004 Posted September 30, 2004 Jon, I'm sure you were just waiting on somebody to ask this...How about setting up events for the built-in events like closing and minimizing? GuiSetOnEvent($GUI_EVENT_ID, "function"), perhaps?
trids Posted September 30, 2004 Posted September 30, 2004 I think he means adding and removing items from menus. Adding is easy, but at the moment as you know removing controls isn't possible due to the way they are accessed and stored (for speed). I'll change the code so that removing controls is possible and then we can see if we can sort something out for menus. I was going to make it possible to delete controls tomorrow anyway.<{POST_SNAPBACK}>Here's what I was thinking in more detail ... Tray Icon Interface
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now