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

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

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

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

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

پیام WM_INITMENU برای چک مارک منو آیم



The following example has three menu items and moves the check mark of the menu item each time the menu is opened.



Public Function WndProc (HWND hWnd, UINT iMessage

( WPARAM wParam, LPARAM lParam,

 HDC hdc

PAINTSTRUCT ps

 static int count = 0

 Mes="Checks menu items in order every time the menu is

" opened

 Select Case iMessage

 case WM_INITMENU

  CheckMenuItem (HMENU) wParam

(IDM_MENU1,MF_BYCOMMAND | MF_UNCHECKED , 

,CheckMenuItem (HMENU) wParam, IDM_MENU2,m

( MF_BYCOMMAND | MF_UNCHECKED

CheckMenuItem ((HMENU) wParam, IDM_MENU3, MF_BYCOMMAND | MF_UNCHECKED)

count = (count +1)% 3

CheckMenuItem (HMENU) wParam, IDM_MENU1 + count, MF_BYCOMMAND | MF_CHECKED)

Wndproc=False

case WM_PAINT

(hdc = BeginPaint (hWnd, ps

(TextOut hdc, 10, 10, Mes,len(Mes

  (EndPaint (hWnd,ps

 WndProc=False

case WM_DESTROY

 PostQuitMessage (0

 WndProc=False

Case Else

(Wndproc=DefWindowProc (hWnd, iMessage, wParm,lParam

End Select

Exit Function