Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #8804
| Path | csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | "Urs Eggmann" <Urs.Eggmann@shinternet.ch> |
| Newsgroups | comp.lang.clipper.visual-objects |
| Subject | Re: Deleting menuitem Separator |
| Date | Sat, 12 Dec 2015 22:45:34 +0100 |
| Lines | 99 |
| Message-ID | <dd3is8Fug6bU1@mid.individual.net> (permalink) |
| References | <n4cpa1$hgd$1@ls237.t-com.hr> <n4cua5$jld$1@ls237.t-com.hr> <dd0s0aFa241U1@mid.individual.net> <n4fho1$qkm$1@ls237.t-com.hr> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; format=flowed; charset="Windows-1252"; reply-type=original |
| Content-Transfer-Encoding | 7bit |
| X-Trace | individual.net qEYqN30aCfyxxiKfjYGLqAJ2JDa7WBEx06rkEuXX3e9+27zxBh |
| Cancel-Lock | sha1:YoAt/RkeF4dAbngDeEUOZ74RVgg= |
| X-Priority | 3 |
| X-MSMail-Priority | Normal |
| X-Newsreader | Microsoft Outlook Express 6.00.2900.5931 |
| X-MimeOLE | Produced By Microsoft MimeOLE V6.00.2900.6157 |
| Xref | csiph.com comp.lang.clipper.visual-objects:8804 |
Show key headers only | View raw
Hi Jozo and Phil, Thanks for completing the code. Urs "Jozo" <racunalo@os.t-com.hr> schrieb im Newsbeitrag news:n4fho1$qkm$1@ls237.t-com.hr... > Hi Urs, > > Here is method from Jean-Luc but I have excepted this piece of code > because I don't need it. > > METHOD CleanMenu( ptrMenu ) CLASS Izb > LOCAL wCount AS DWORD, nItemID AS DWORD > LOCAL ptrPopUp AS PTR > LOCAL lSeparator AS LOGIC > LOCAL iIdx AS INT, iCount AS INT > > IF IsNil( ptrMenu ) > ptrMenu := SELF:Handle() > ENDIF > lSeparator := FALSE > wCount := ( GetMenuItemCount( ptrMenu ) - 1 ) // Zero Based > iCount := ( GetMenuItemCount( ptrMenu ) - 1 ) // Zero Based > FOR iIdx := iCount DOWNTO 0 > nItemID := GetMenuItemID( ptrMenu, iIdx ) > DO CASE > // a Sub-Menu > CASE nItemID = 0xFFFFFFFF > ptrPopUp := GetSubMenu( ptrMenu, iIdx ) > IF GetMenuItemCount( ptrPopUp ) < 1 > DeleteMenu( ptrMenu, iIdx, MF_BYPOSITION ) > ELSE > SELF:CleanMenu( ptrPopUp ) > IF GetMenuItemCount( ptrPopUp ) < 1 > DeleteMenu( ptrMenu, iIdx, MF_BYPOSITION ) > ENDIF > ENDIF > // a Separator > CASE nItemID = 0 > IF lSeparator .or. ; > ( iIdx = (GetMenuItemCount( ptrMenu ) - 1 ) ) .or. ; // separator at > the END > ( iIdx = 0 ) // separator at the beginning > DeleteMenu( ptrMenu, iIdx, MF_BYPOSITION ) > ELSE > lSeparator := TRUE > ENDIF > OTHERWISE > lSeparator := FALSE > ENDCASE > NEXT > IF ptrMenu == SELF:Handle() > // SELF:CleanToolBar() > // wCount := ( GetMenuItemCount( ptrMenu ) - 1 ) // Zero Based > // SELF:SetAutoUpdate(wCount - 1) > ENDIF > RETURN NIL > > > > "Urs Eggmann" <Urs.Eggmann@shinternet.ch> wrote in message > news:dd0s0aFa241U1@mid.individual.net... >> Hi Jozo, >> >> By Google search I found a post from Roger Lawton (Sept 2005) with the >> method CleanMenu(PtrMenu) that calls a method CleanToolBar() . >> That method I could not find. >> >> What about sharing the complete solution with us ? >> >> Thanks >> Urs >> >> "Jozo" <racunalo@os.t-com.hr> schrieb im Newsbeitrag >> news:n4cua5$jld$1@ls237.t-com.hr... >>>I found two solutions, Jean-Luc Stassen and Phil McGuinness. >>> Thank them >>> >>> >>> >>> "Jozo" <racunalo@os.t-com.hr> wrote in message >>> news:n4cpa1$hgd$1@ls237.t-com.hr... >>>> Hi all, >>>> >>>> does anyone know how deleting specific SEPARATOR in Menu ? >>>> >>>> Thanks for any help. >>>> >>>> >>>> >>> >>> >> > >
Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Find similar | Unroll thread
Deleting menuitem Separator "Jozo" <racunalo@os.t-com.hr> - 2015-12-10 22:03 +0100
Re: Deleting menuitem Separator "Jozo" <racunalo@os.t-com.hr> - 2015-12-10 23:28 +0100
Re: Deleting menuitem Separator "Urs Eggmann" <Urs.Eggmann@shinternet.ch> - 2015-12-11 21:44 +0100
Re: Deleting menuitem Separator sherlocksoftware@gmail.com - 2015-12-11 14:05 -0800
Re: Deleting menuitem Separator "Jozo" <racunalo@os.t-com.hr> - 2015-12-11 23:12 +0100
Re: Deleting menuitem Separator "Urs Eggmann" <Urs.Eggmann@shinternet.ch> - 2015-12-12 22:45 +0100
csiph-web