کلینیک فوق تخصصی اکسس ( کاربرد vba در اکسس )

کلینیک فوق تخصصی اکسس ( کاربرد vba در اکسس )

به اشتراک گذاری اطلاعات کسب شده در اکسس از سایت آفیس و سایت های تخصصی خارجی
کلینیک فوق تخصصی اکسس ( کاربرد vba در اکسس )

کلینیک فوق تخصصی اکسس ( کاربرد vba در اکسس )

به اشتراک گذاری اطلاعات کسب شده در اکسس از سایت آفیس و سایت های تخصصی خارجی

کپی تکست استرینگ آیتم منو داخل بافر مشخص شده










موارد ستاره دار مهم هستند که اگر Fail دهد جواب صفر است  و اگر cchMax صفر در نظر گرفته شود تابع طول استرینگ  را بر خواهد گرداند درصورتیکه که Fail ندهد یعنی مقدار برگشتی صفر نشود


***cchMax : 

If nMaxCount is 0, the function returns the length of the menu string


***Return Value


If the function succeeds, the return value specifies the number of characters copied to the buffer, not including the terminating null character.

If the function fails, the return value is zero.

If the specified item is not of type MIIM_STRING or MFT_STRING, then the return value is zero




Dim mii As MENUITEMINFOA

(mii.cbSize=Len(mii
mii.fmask=&H40  ' MIIM_STRING
mii.ftype=&H0      ' MFT_STRING
""=mii.dwTypedata
mii.cchMax=0

GetMenuItemInfo hMenu,0,True,mii
(mii.cbSize=Len(mii'
mii.fmask=&H40'
mii.fType=&H0'
(mii.dwTypedata=String$(cchMax,vbNullChar
mm.cchMax=mii.cchMax+1

GetMenuItemInfo hMenu,0,True,mii

و  در آخر گرفتن کپشن با Mid



GetMenuStringA(hMenu,uIDItem,lpString, cchMax,flags)

If the specified item is not of type MIIM_STRING or
. MFT_STRING, then the return value is zero

lpString

Type: LPTSTR

The buffer that receives the null-terminated string. If the string is as long or longer than lpString, the string is truncated and the terminating null character is added. If lpStringis NULL, the function returns the length of the
 .menu string



 Note  The GetMenuString function has been****
superseded. Use the GetMenuItemInfo function to retrieve the menu item text

نظرات 0 + ارسال نظر
برای نمایش آواتار خود در این وبلاگ در سایت Gravatar.com ثبت نام کنید. (راهنما)
ایمیل شما بعد از ثبت نمایش داده نخواهد شد