I'm trying to capture the ENTER key on a CEdit Control with the OnKeyDown() function, but it seems that it is not capturing the ENTER key. All the other keys are being captured as it should. i'm using my own edit control, derived from CEdit class. Any tip ? Thanks.
rpadrela
Posts
-
Unable to capture ENTER key on a CEdit Control -
Unable to Create Controls on a CPropertyPageI'm trying to create common contros by coding and not through the resource editor. The problem is that the controls simply do not appear. They're being created with the CPropertyPage being their parent and then calling ShowWindow(SW_SHOW) on them. Anyone to help ? Thanks.
-
Virtual Function Questionbecause class B is derived from class A. If you don't override Func1() in class B, Func1() from class A will be called because inherits Func1() from it's base class( class A ). Do not forget that class B is not related with class C. The relationship u described is from C to B and not from B to C.
-
PropertySheet questiona dialog bar acting as a property sheet, sorry.
-
PropertySheet questionit is possible to have a property sheet acting as a dialog bar ? what i want to do is a dialog bar with several pages. thanks.
-
Bitmaps on Static Controls, How to ?// Load Process HANDLE hBitmap; hBitmap = ::LoadImage( GetModuleHandle( rvl_null ), pathFileName, IMAGE_BITMAP, 0, 0, LR_DEFAULTSIZE | LR_LOADFROMFILE ); m_pBitmaps[ i ].Attach( hBitmap ); // m_pBitmaps is an array of CBitmap ////////////////////// CStatic* pImageCtrl = rvl_null; pImageCtrl = ( CStatic* ) GetDlgItem( IDC_NEWMAP_DIALOG_IMAGE ); pImageCtrl->SetBitmap( HBITMAP( m_pBitmaps[ 0 ] ) ); I'm using this piece of code to place a bitmap inside a static control but it's not working as it should. What i'm doing wrong ? PS: Bitmaps are loaded from file. Thanks
-
Memory Allocations/Deallocations problemsI'm using a library in my MFC application and i'm having some memory problems with allocations and deallocations, some memory allocations/deallocations causes a crash but only if it is not running on debug-mode. In debug-mode the application runs perfectly. Here's my lib configurations: engine.lib ( Non-MFC Code ): . Configuration Properties: ----. General: ------. Configuration Type: Static Library ( .lib ) ------. Use of MFC: Use Standard Windows Libraries ----. C++: ------. Code Generation: ---------. Runtime Library: Multi-Threaded Debug ( /MTd ) editor ( MFC Code ): . Configuration Properties: ----. General: ------. Configuration Type: Application ( .exe ) ------. Use of MFC: Use MFC in a Static Library ----. C++: ------. Code Generation: ---------. Runtime Library: Multi-Threaded Debug ( /MTd ) ------. Precompiled Header: ---------. Create/Use Precompiled Header: Automatically Generate( /YX ) ----. Linker: ------. Command Line: /NODEFAULTLIB:LIBCD.LIB Noticed anything wrong ? Any tip ? Thanks
-
CTreeCtrl weird problemProblem solved! Thanks :)
-
CTreeCtrl weird problemThe problem is the following: The text of inserted items do not appear if and only if i call DeleteAllItems() before inserting them. Something like this: CTreeCtrl* pTreeCtrl = ( CTreeCtrl* ) GetDlgItem( IDC_TREE ); if ( !pTreeCtrl ) return; if ( !pTreeCtrl->DeleteAllItems() ) return; pTreeCtrl->InsertItem( "testing" ); pTreeCtrl->InsertItem( "testing1" ); If i remove the DeleteAllItems() function call everything works as it should. Any tip ? Thanks
-
VS .NET window typewhat's the name of that window ?
-
VS .NET window typeAnyone knows what kind of window is the one that holds our files in Visual Studio .NET ? The Window as a nice property that i would like to use that is, auto-hide. The window shows up when we pass the mouse cursor over it and automatically gets hidden when the mouse cursor isn't on top of it. Anyone ? Thanks.
-
Dialog questionanother interesting thing is that the dialog caption isn't shown!! :|
-
Dialog question...but it's not working! ;P
-
Dialog questionWhat property should a dialog box have so i can move it around while the title bar is pressed ? Thanks
-
CButton questionI want a button to be drawn fully red, do i need to create my own button class ? Owner-draw button is the way to go ? If so, can you point me too any good article that talks about it ? Thanks
-
CEdit updates in dialog boxI have a dialog box with several CEdit controls inside of it that are created dynamically during runtime, that dialog box sometimes is hidden and sometimes is not. When the dialog box is hidden for the first time, the 'strings' in the CEdit controls are saved into a data structure that i've defined, when the dialog is shown again i read the stores values previously and write them into the CEdit controls but this time the text inside of it is not the expected but it is the previous that was stored in there. I think there are some problems with updates. Since i'm new to MFC probably i need to do something to keep the CEdit controls update the text correctly. Any tip ? Thanks