|
|
1.1 ! root 1: Sample: Example of Creating a Custom Control Class ! 2: ! 3: Summary: ! 4: ! 5: The SPINCUBE sample demonstrates how to create a custom ! 6: control class that can be accessed by applications as well ! 7: as the Dialog Editor. ! 8: ! 9: More Information: ! 10: ! 11: SPINCUBE.DLL contains the control window procedure and the ! 12: interface functions required by the Dialog Editor (see ! 13: SPINCUBE.C), as well as the control paint routines (see ! 14: PAINT.C). SPINTEST.EXE is a small test program that loads ! 15: SPINCUBE.DLL and creates a few of the custom controls. ! 16: ! 17: To test SPINCUBE with the Dialog Editor: ! 18: ! 19: 1.Start the editor. From the File menu, choose Open Custom. ! 20: ! 21: 2.Enter the path and filename of SPINCUBE.DLL. ! 22: ! 23: 3.Create a new dialog box and choose a custom control ! 24: button from the control palette (lower-right corner). ! 25: ! 26: 4.Click the dialog box to create a SPINCUBE control. ! 27: ! 28: 5.Save the dialog box template. ! 29: ! 30: 6.Inspect the .DLG file that was created. ! 31: ! 32: The following is a list of the Win32 API functions used in ! 33: this sample: ! 34: ! 35: BeginPaint GetProp lstrcpy ShowWindow ! 36: CreateSolidBr GetStockObjec MessageBeep TranslateMess ! 37: ush t age ! 38: CreateWindow GetWindowLong MessageBox UpdateWindow ! 39: DeleteObject GetWindowRect Polygon ! 40: DialogBox InvalidateRec PostQuitMessa ! 41: t ge ! 42: DispatchMessa KillTimer Rectangle ! 43: ge ! 44: DLLEntryPoint LoadCursor RegisterClass ! 45: EnableWindow LoadIcon RemoveProp ! 46: EndDialog LoadLibrary SelectObject ! 47: EndPaint LocalAlloc SendMessage ! 48: FreeLibrary LocalFree SetDlgItemTex ! 49: t ! 50: GetDlgItem LocalHandle SetProp ! 51: GetDlgItemtex LocalLock SetTimer ! 52: t ! 53: GetMessage LocalUnlock SetWindowLong ! 54: ! 55: ! 56:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.