image

SmartAnchor is a custom control written in assembly language for use in your projects.

It allows you to specify how your windows gui controls (edit, button, list, combo, static etc) are anchored relative to the current parent window size. When the main window is resized the controls that have been registered with the SmartAnchor control are moved in accordance to the anchor type you specified.

Features:

  • Controls can be anchored to top left, top right, bottom left or bottom right of the current window and retain their height and width.
  • Additionally controls can be allowed to stretch vertically and/or horizontally in relation to the main window resizing.
  • Auto sizing and position of child controls registered to the SmartAnchor control.
  • Limit the minimum size (height and width) of the main window to prevent it from being resized below set values.

SmartAnchor Control Downloads

  • SmartAnchor Control Downloads +

    SmartAnchor.zip Version:1.0.0.1 (2016-03-03) File size: 110.98 KB
    SmartAnchor Readme.txt (2016-03-03) File size: 4.9 KB
    SmartAnchor.chm Version:1.0.0.1 (2016-03-03) File size: 88.4 KB
    Example.zip (2016-03-03) File size: 24.23 KB

     

    Note: you may need to unblock access to a file once you download it. Right click on it in windows explorer, select properties, click the unblock button.

  • SmartAnchor Control History +

    v1.0.0.1

    • Changed SmartAnchor constants used in project
    • Add chm documentation

    v1.0.0.0

    • Release - First release of SmartAnchor Control.
  • 1

SmartAnchor Control Information

  • SmartAnchor Control Notes +

    The latest version of SmartAnchor Control is v1.0.0.1

    SmartAnchor Control is desgined for use with:

    • RadASM IDE
    • MASM32 SDK
  • SmartAnchor Control Setup +

    Copy SmartAnchor control files to your the MASM32 folders

    • SmartAnchor.lib to \masm32\lib
    • SmartAnchor.inc to \masm32\include

    Include SmartAnchor Library in your project somewhere with:

    Include SmartAnchor.inc
    Includelib SmartAnchor.lib

    Create a SmartAnchor control:

    Invoke SmartAnchorCreate, hWin ; specify the window to handle anchoring controls for 
    mov hSA, eax ; save handle

    Get the handles of the controls that are used in this dialog / window:

    Invoke GetDlgItem, hWin, IDC_TEXTBOX1 ; get handle to textbox control
    mov hTextBox1, eax ; save handle

    Register the control with SmartAnchor, specifying the anchor type required:

    Invoke SendMessage, hSA, SAM_REGISTERCONTROL, hTextBox1, ANCHOR_STRETCH_VERT

    Optionally use the SmartAnchorRegisterControl function instead of the custom message:

    Invoke SmartAnchorRegisterControl, hSA, hTextBox1, ANCHOR_STRETCH_VERT

    Thats it, when resizing your window, SmartAnchor will adjust the control positio and/or size for you.

  • 1

Login Form