HippoAbstractWindow::HippoAbstractWindow()
{
    refCount_ = 1;
    ui_ = NULL;
    animate_ = false;
    useParent_ = false;
    createWithParent_ = NULL;
    updateOnShow_ = false;
    classStyle_ = CS_HREDRAW | CS_VREDRAW;
    windowStyle_ = 0;
    setWindowStyle(WS_OVERLAPPEDWINDOW); // setWindowStyle does some magic
    extendedStyle_ = 0;
    created_ = false;
    showing_ = false;
    destroyed_ = false;

    x_ = 0;
    y_ = 0;
    width_ = 0;
    height_ = 0;

    defaultPositionSet_ = false;
    selfSizing_ = false;

    instance_ = GetModuleHandle(NULL);
    window_ = NULL;
}
Example #2
0
HippoMenu::HippoMenu(void)
{
    refCount_ = 1;
    hippoLoadTypeInfo((WCHAR *)0, &IID_IHippoMenu, &ifaceTypeInfo_, NULL);

    desiredWidth_ = BASE_WIDTH;
    desiredHeight_ = BASE_HEIGHT;
    mouseX_ = 0;
    mouseY_ = 0;

    setUseParent(true);
    setClassName(L"HippoMenuClass");
    setClassStyle(CS_HREDRAW | CS_VREDRAW | CS_DROPSHADOW);
    setWindowStyle(WS_POPUP);
    setExtendedStyle(WS_EX_TOPMOST);
    setTitle(L"Hippo Menu");
    setApplication(this);
}
HippoToolTip::HippoToolTip()
{
    setSelfSizing(true);

    // standard Windows control
    setClassName(TOOLTIPS_CLASS);

    // NOPREFIX means don't parse ampersand as for menu items
    // ALWAYSTIP means the tip can appear on unfocused windows, but 
    // since we show/hide it manually this is irrelevant anyway
    // The WS_POPUP and WS_EX_TOOLWINDOW styles are implied by the class, 
    // but we put them in so HippoAbstractWindow knows about them
    setWindowStyle(WS_POPUP | WS_EX_TOOLWINDOW | TTS_NOPREFIX | TTS_ALWAYSTIP);

    forArea_.x = 0;
    forArea_.y = 0;
    forArea_.width = 0;
    forArea_.height = 0;
}
Example #4
0
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
// AflSpriteScroll
// スクロールバー表示用
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
//-----------------------------------------------
AflSpriteScroll::AflSpriteScroll()
{
	setWindowStyle(0);
	setFrameSize (1,1);
	m_fButtonSize = 14;

	m_dwBarColor1 = 0xeecccccc;
	m_dwBarColor2 = 0xee999999;
	m_dwButtonColor1 = 0xeeaaaaaa;
	m_dwButtonColor2 = 0xee888888;

	m_iScrollPos = 0;
	m_dwScrollMax = 100;
	m_dwScrollPage = 100;
	m_dwScrollMin = 16;

	m_bCreate = false;
	m_dwBarStyle = SBS_VERT;
}
Example #5
0
/** DialogControl::tabstop()
 *  DialogControl::group()
 */
RexxMethod3(RexxObjectPtr, dlgctrl_tabGroup, OPTIONAL_logical_t, addStyle, NAME, method, CSELF, pCSelf)
{
    oodResetSysErrCode(context->threadContext);

    pCDialogControl pcdc = (pCDialogControl)pCSelf;
    if ( argumentOmitted(1) )
    {
        addStyle = TRUE;
    }
    uint32_t style = GetWindowLong(pcdc->hCtrl, GWL_STYLE);

    if ( *method == 'T' )
    {
        style = (addStyle ? (style | WS_TABSTOP) : (style & ~WS_TABSTOP));
    }
    else
    {
        style = (addStyle ? (style | WS_GROUP) : (style & ~WS_GROUP));
    }
    return setWindowStyle(context, pcdc->hCtrl, style);
}
Example #6
0
HippoBubble::HippoBubble(void)
{
    idle_ = FALSE;
    screenSaverRunning_ = FALSE;
    haveMouse_ = FALSE;
    effectiveIdle_ = FALSE;
    shown_ = FALSE;
    desiredWidth_ = BASE_WIDTH;
    desiredHeight_ = BASE_HEIGHT;
    layerDC_ = NULL;
    oldBitmap_ = NULL;
    images_ = NULL;
 
    // Notes on animation
    // 
    // * Without our usage of UpdateLayeredWindow, it would fade the window in and
    // out using AnimateWindow, but you turn on fading in then you'll probably have difficulties 
    // the second time you show the window ... it appears that the web browser control has some 
    // bugs with WM_PRINTCLIENT; the first time the contents of the window are properly
    // initialized before fade-in, but on subsequent shows they are not. A crude
    // workaround might be to reembed a new control every time, but there are probably
    // less sledgehammer methods. Even without animation there are sometimes problems
    // with reshowing the window, which is why we turn on updateOnShow(). (This may
    // no longer be necessary with our usage of UpdateLayeredWindow())
    //
    // * AnimateWindow isn't compatible with UpdateLayeredWindow() ... when you start
    // animating the window, the shape is removed. This is presumably because AnimateWindow
    // internally uses SetLayeredWindowAttributes, which is exclusive with UpdateLayeredWindow
    // So to animate a shaped window, we'd have to fade the bits in and out ourselves.
    //
    setAnimate(false);
    setUseParent(true);
    setUpdateOnShow(true);
    setWindowStyle(WS_POPUP);
    setExtendedStyle(WS_EX_TOPMOST | WS_EX_LAYERED | WS_EX_NOACTIVATE);
    setClassName(L"HippoBubbleClass");
    setTitle(L"Hippo Notification");
    setApplication(this);
}