Search Results

Search found 16 results on 1 pages for 'wtl'.

Page 1/1 | 1 

  • WTL CSplitterWindow cannot create more than 3 instances?

    - by Zach
    Hello all, I'm using WTL to create a window containing many splitted panes. The following will be the result. --------------------------- | | | | | | | | | | | | | |-------------------- | | | | | | | | --------------------------- There will be 4 splitters, three vertical ones and a horizontal one. I followed the great article : http://www.codeproject.com/KB/wtl/wtl4mfc7.aspx. But I only can add 3 splitters as below. --------------------------- | | | | | | | | | | | | | |-------------------- | | | | | | --------------------------- I tried a lot of ways but still cannot add the last one. Is is a bug of WTL? Can anybody help me? Best regards, Zach@Shine

    Read the article

  • a floating toolbar in WTL

    - by freefallr
    I've created a multimedia app that uses DirectShow to display multiple media streams simultaneously. The app is a WTL MDI application. For video windows, I use a CWindowImpl derived class - one per CChildFrame. I'd like to add controls to the video windows (volume ctrls etc). I'd initially thought about adding a slider (volume) control and a couple of buttons to a context menu - but later thought that this might not be the best approach. I was looking at MS Word 2007 - which has a floating toolbar that allows you to change options on highlighted text. I'd like to implement a similar floating toolbar for the video controls. I googled around a bit and found an old post about floating toolbars in WTL. The response was - for a floating toolbar, create a popup window and make it's parent the main window. I think that this sounds like a reasonable approach. my questions: Is this a good approach, or is there a more standard approach for a floating toolbar now in WTL? Should I make the toolbar a child of the video window or the CChildFrame that contains the video window, in order to ensure that it always remains on top of the video? How can I implement transparency in the floating toolbar, as in the floating toolbar in MS word?

    Read the article

  • WTL Child window event handling

    - by Rushi
    I am developing window application in that I am having 2 child windows on left and right side. I want to handle input events for both windows separately. How to achieve it? My code: class EditorWindow : public DxWindow { public: CSplitterWindow m_vSplit; CPaneContainer m_lPane; CPaneContainer m_rPane; PropertyDialog m_propertyWnd; DECLARE_WND_CLASS(_T("Specific_Class_Name")) BEGIN_MSG_MAP(EditorWindow) MESSAGE_HANDLER(WM_CREATE, OnCreate) MESSAGE_HANDLER(WM_DESTROY, OnDestroy) MESSAGE_HANDLER(WM_LBUTTONDOWN, KeyHandler) MESSAGE_HANDLER(WM_KEYUP, KeyHandler) MESSAGE_HANDLER(WM_LBUTTONDOWN, KeyHandler) END_MSG_MAP() LRESULT OnCreate(UINT, WPARAM, LPARAM, BOOL&) { CRect rcVert; GetClientRect(&rcVert); m_vSplit.Create(m_hWnd, rcVert, NULL, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN); m_vSplit.SetSplitterPos(rcVert.Width()/1.4f); // from left m_lPane.Create(m_vSplit.m_hWnd); m_vSplit.SetSplitterPane(0, m_lPane); //m_lPane.SetTitle(L"Left Pane"); m_rPane.Create(m_vSplit.m_hWnd); m_vSplit.SetSplitterPane(1, m_rPane); m_rPane.SetTitle(L"Properties"); m_propertyWnd.Create(m_rPane.m_hWnd); //m_vSplit.SetSplitterPane(SPLIT_PANE_LEFT, md.m_hWnd); return 0; } LRESULT OnDestroy( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled ) { PostQuitMessage(0); bHandled = FALSE; return 0; } LRESULT KeyHandler( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled ) { return 0; } };

    Read the article

  • wm_mousewheel message in WTL

    - by Rushi
    I am trying to handle wm_mousewheel for my application. Code: BEGIN_MSG_MAP(DxWindow) MESSAGE_HANDLER(WM_MOUSEWHEEL, KeyHandler) END_MSG_MAP() . . . LRESULT DxWindow::KeyHandler( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled ) { if(uMsg==wm_mousewheel) { //Perform task. } return 0; } But this code doesn't work.KeyHandler doesn't receive wm_mousewheel message. I am testing this application on vista. If my approach is wrong how to handle wm_mousewheel properly? Do vista is responsible for failure in handling wm_mousewheel message?

    Read the article

  • Handling wm_mousewheel message in WTL

    - by Rushi
    I am trying to handle wm_mousewheel for my application. Code: BEGIN_MSG_MAP(DxWindow) MESSAGE_HANDLER(WM_MOUSEWHEEL, KeyHandler) END_MSG_MAP() . . . LRESULT DxWindow::KeyHandler( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled ) { if(uMsg==wm_mousewheel) { //Perform task. } return 0; } But this code doesn't work.KeyHandler doesn't receive wm_mousewheel message. I am testing this application on vista. If my approach is wrong how to handle wm_mousewheel properly? Do vista is responsible for failure in handling wm_mousewheel message?

    Read the article

  • Is is possible to make a shaped, alpha-blended dialog?

    - by jgaa
    I'm making a non-rectangular dialog, modelled over an image from Photoshop (the image is the background of the dialog, and the user will see trough the transparent part of the image). I'ts like a dashboard-style window for a media-app with a few custom-drawn controls. Most of the background-image is either opaque or 100% transparent - but in between there is a thin area of partially transparent pixels, ment to blend the image smootly into the background. This works great for web-graphics, but I have not found a way to make this work for Windows windows. I'm using the Windows Template Library (WTL), msvc 2008 - and the app must run on Windows XP as well as Vista and Windows 7. Currently, I'm simply using the opaque part of the background-image to create a GDI clipping-region, but this gives pretty rough edges. Does anyone know about any API functions to accomplish this (part of WTL, or reachable from WTL)?

    Read the article

  • library for simple GUI appications

    - by arthurprs
    I tried to use WTL, but i couldn't get it to work on VS2008 Express, there is any other option? I would like to test if any, before recur to the plain API :/ need to be small and have no external dependencies Thanks in advance!

    Read the article

  • WM_POWERBROADCAST handler for CMainDlg in ATL app not invoked

    - by psychotik
    I have an ATL app where I want to handle WM_POWERBROADCAST. I have a CMainDlg (CAxDialogImpl) in whose MSG_MAP I defined the handler. BEGIN_MSG_MAP(CMainDlg) ... MESSAGE_HANDLER(WM_POWERBROADCAST, OnPowerChange) ... END_MSG_MAP() However, the handler isn't invoked when I do things that should invoke it, for instance change power settings or put the machine to sleep. Any ideas about what might be going on, and how to fix this? Does CMainDlg not get notified of power events, for some reason?

    Read the article

  • Cannot change the height of a combo box in the VS Dialog Editor

    - by Hamish Morrison
    Any combo box I create seems to be stuck at 12 dialog units in height. Microsoft's guidelines for spacing and sizing of controls in dialog boxes state that a combo box should be 14 dialog units high. I have even tried editing the resource file in notepad and recompiling in Visual Studio without opening the resource editor - but the combo boxes are still the wrong size! Any ideas?

    Read the article

  • specify parent window in Windows Resource Script file(*.rc)

    - by welemon
    Hi, I'm looking for a method to specify parent window in *.rc file. In *.rc file, it contains the layout and controls of a dialog. Any new control added into it, will automatically become a child window of Dialog itself. But I want to add a custom draw window into dialog, and some other controls which has that "custom draw window" as parent window, not dialog itself. I know I can use ::CreateWindow(...) API to dynamic create a window in code, and specify the custom draw window as parent HWND. But we already has child controls layout in *.rc file, I just want to reuse them, without create HWND again. Thanks, William L.

    Read the article

  • Which is the good C++ GUI Framework

    - by Suriyan Suresh
    I know there are plenty of C++ GUI libraries out there. Here is an incomplete but significant list: MFC Qt wxWidgets Ultimate++ WTL Win32 Win32Gui WinForms Here is what i want Well documented Modern (and well designed) interface Easy to use Widely used GUI editor (RAD tool) Free

    Read the article

  • How does one gets started with Winforms style applications on Win32?

    - by Billy ONeal
    EDIT: I'm extremely tired and frustrated at the moment -- please ignore that bit in this question -- I'll edit it in the morning to be better. Okay -- a bit of background: I'm a C++ programmer mostly, but the only GUI stuff I've ever done was on top of .NET's WinForms platform. I'm completely new to Windows GUI programming, and despite Petzold's excellent book, I'm extremely confused. Namely, it seems that most every reference on getting started with Win32 is all about drawing lines and curves and things -- a topic about which (at least at present time) I couldn't care less. I need a checked list box, a splitter, and a textbox -- something that would take less than 10 minutes to do in Winforms land. It has been recommended to me to use the WTL library, which provides an implementation of all three of these controls -- but I keep getting hung up on simple things, such as getting the damn controls to use the right font, and getting High DPI working correctly. I've spent two freaking days on this, and I can't help but think there has to be a better reference for these kinds of things than I've been able to find. Petzold's book is good, but it hasn't been updated since Windows 95 days, and there's been a LOT changed w.r.t. how applications should be correctly developed since it was published. I guess what I'm looking for is a modern Petzold book. Where can I find such a resource, if any?

    Read the article

  • WinForm-style Invoke() in unmanaged C++

    - by Matt Green
    I've been playing with a DataBus-type design for a hobby project, and I ran into an issue. Back-end components need to notify the UI that something has happened. My implementation of the bus delivers the messages synchronously with respect to the sender. In other words, when you call Send(), the method blocks until all the handlers have called. (This allows callers to use stack memory management for event objects.) However, consider the case where an event handler updates the GUI in response to an event. If the handler is called, and the message sender lives on another thread, then the handler cannot update the GUI due to Win32's GUI elements having thread affinity. More dynamic platforms such as .NET allow you to handle this by calling a special Invoke() method to move the method call (and the arguments) to the UI thread. I'm guessing they use the .NET parking window or the like for these sorts of things. A morbid curiosity was born: can we do this in C++, even if we limit the scope of the problem? Can we make it nicer than existing solutions? I know Qt does something similar with the moveToThread() function. By nicer, I'll mention that I'm specifically trying to avoid code of the following form: if(! this->IsUIThread()) { Invoke(MainWindowPresenter::OnTracksAdded, e); return; } being at the top of every UI method. This dance was common in WinForms when dealing with this issue. I think this sort of concern should be isolated from the domain-specific code and a wrapper object made to deal with it. My implementation consists of: DeferredFunction - functor that stores the target method in a FastDelegate, and deep copies the single event argument. This is the object that is sent across thread boundaries. UIEventHandler - responsible for dispatching a single event from the bus. When the Execute() method is called, it checks the thread ID. If it does not match the UI thread ID (set at construction time), a DeferredFunction is allocated on the heap with the instance, method, and event argument. A pointer to it is sent to the UI thread via PostThreadMessage(). Finally, a hook function for the thread's message pump is used to call the DeferredFunction and de-allocate it. Alternatively, I can use a message loop filter, since my UI framework (WTL) supports them. Ultimately, is this a good idea? The whole message hooking thing makes me leery. The intent is certainly noble, but are there are any pitfalls I should know about? Or is there an easier way to do this?

    Read the article

1