Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
M

Maverick

@Maverick
About
Posts
68
Topics
38
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Override ListCtrl automatic horizontal scrolling on Left/Right KeyDown
    M Maverick

    I have a Report style CListCtrl and placed it in a CFormView. I have lots of columns such that not all of the columns appear on the ClistCtrl area so there is automatically a horizontal scrollbar. Now when i press left or right keyboard keys, I want Report list ctrl is to select previous or next column. I have that code already but it doesn't get called. Instead when i press the arrow keys, the list ctrl just scrolls left or right. How do I override this behavior? What are the related functions needed? tnx in advance maverick

    C / C++ / MFC question

  • Access violation, break in CFixedAlloc::Alloc()
    M Maverick

    Can you give me some general information on CFixedALlocNosync::Alloc() function or the whole class. Its really urgent. don't know wat to do anymore. I have an MDI application, Doc/View Style.. and then i have 2 additional Frame/Views attached on a ControlBar and those Views are views for the Document... So I have 1 Doc-3 Views.. When originall when the application is Opened by default, opening a New Document, the program works fine.. Now, when i launch the application with no New Document created, and then I open a document, an Access Violation occurs.. and debugger breaks on the code of CFixedAllocNoSync::Alloc() function.. On the callstack, I noticed that this Alloc() function was called by one of the control bars CControlBar::PreTranslateMessage().. I don't know what to adjust or what to change because this is internal to MFC already..

    C / C++ / MFC c++ debugging lounge

  • OnKeyDown event not working ?
    M Maverick

    Can I see your code? Can you trace if OnkeyDown function gets called?

    C / C++ / MFC help com tutorial question

  • When is an HWND invalid?
    M Maverick

    Hi All!!! hehe.. you know what, i found out the problem of my HWND being invalid... it turns out Im looking into a different CMainFrame pointer that holds the control bar that holds the CEdit.. I have implemented 2 Doc/View architectures in my program.. So I have 2 frames, 1 Mainframe and 1 Framewnd(inside another control bar)... It turns out i cast the Framewnd which has no CEdit variable, to CMainFrame.. So im looking in the framewnd which has no CEdit at all, not created.. So that solves my problem, I just got the pointer to the actual CMainframe which has the CEdit... tnx for the replies!! :-D Maverick "you can be my wingman anytime.."

    C / C++ / MFC question help

  • When is an HWND invalid?
    M Maverick

    I can tell you that the window was not destroyed.. so definiteyly my problem is GetSafeHWnd() changing to a wrong value.. My question is how did it changed value? how did the window structure get trashed? I Didn't do anything to it... I just set its text..

    C / C++ / MFC question help

  • When is an HWND invalid?
    M Maverick

    But why is it that when I test ::IsValidWindow(CEdit::GetSafeHwnd()), it returns FALSE in the middle of my program, and I have not destroyed the CEdit yet.. I have seen in some articles that there are some events that makes the window handles invalid..

    C / C++ / MFC question help

  • When is an HWND invalid?
    M Maverick

    Hi! in a Subclassed Cedit Control, I issued a SetWindowText() function many times in my program.. I traced my program, Now In the first call to SetWindowText(), the function succeeds and it sets the text .. Now on the second call the function asserts, and upon tracing, The ::IsWindow(hwndofCedit) returns FALSE. My question when does an HWND becomes invalid? aside from window destruction?.. My Cedit's parent is not a CDialog, would that be an issue? "geez i cracked myself off.."

    C / C++ / MFC question help

  • migrate to different DBMS using ODBC?
    M Maverick

    Hello! I am developing a database program using Access DB.. Now im using MFC ODBC classes to connect to Access.. Now at some point, i need to connect to a MS SQL Server DB Can I do it with little code change or no code change, recompilation at all? Do I just supply a different driver/connection string and thats it!?!? Im just trying to clarify since ODBC is supposed to do that.. Haven't installed a SQL Server on a PC yet, but i wanna know in advance how ODBC really works...

    C / C++ / MFC database c++ sql-server sysadmin question

  • CEdit Parent/Owner Notifications doesn't get Processed?
    M Maverick

    I have a Cedit subclass which is constructed like this.. CDockBar child is CStatic and CStatic child is CSubEdit.. Now I CeEdit::SetOwner(CDockBar) so that CDockBar would receive the notifications from CEdit. Particularly i want to process NM_RETURN notifications when I press the ENTER key.. Now I already processed the WM_KEYDOWN from the subclassed c0ntrol.. and i can process the enter key from WM_KEYDOWN already.. but i still want the parent/owner to be notified of the ENTER keypress..(NM_ENTER) notification I traced the Enter key press on the Cedit Control, in Spy++, the only messages generated are WM_KEYDOWN, WM_KEYUP, and WM_CHAR.. Why does NM_RETURN goesn't get generated?

    C / C++ / MFC question

  • Why is a CButton disabled on CDialogBar
    M Maverick

    Hello. I have the same problem also.. Although I haven't tried it yet, this is the info i got on a website.. hope this helps... INFO: CDialogBar Button Enabled When Command Handler Present View products that this article applies to. Article ID : 98198 Last Review : December 11, 2003 Revision : 1.0 This article was previously published under Q98198 A button in a CDialogBar object is disabled automatically if the command routing does not contain a command handler function for the button. To enable a button in a CDialogBar object, the command routing must include a command handler for the button. A button command handler can be an ON_BN_CLICKED(), ON_COMMAND(), or ON_COMMAND_UI() message handler and it must appear in the message map of an object in the command routing. If the parent of the CDialogBar object is a CFrameWnd object, then the command is handled by the active child window or view, by the document attached to the view, by the frame window, and by the application (CWinApp object). NOTE: Because the CDialogBar object is not included in the routing scheme, the ON_BN_CLICKED() or ON_COMMAND() handler must be placed in one of the objects mentioned above that is in the routing scheme and not in the CDialogBar class. For more information on command routing, see the "Command Routing" section in Chapter 3 of the "Class Library Reference" manual. In Visual C++ 32-bit Edition, version 4.0, see both the "Command Routing" topic of the "Programming with MFC: Overview" in the Books Online and the MFC Technical Note 31, Control Bars. -------------------------------------------------------------------------------- http://www.kbalertz.com/kb_98198.aspx[^]

    C / C++ / MFC question

  • Control Notification Messages be sent to a non-parent..
    M Maverick

    messages like ON_EN_SETFOCUS for a CEdit Control is typically sent through its parent,ryt? This is the situation of CControlBar->Intermediate CWnd->CEdit.. CControlBar is docked on a CMainFrame... CEdit's parent is an intermediate CWnd.. I want SetFocus notifications and ENTER key presses to be handled by CControlBar or on the CMaiNFrame.. is there anyway i can do these? regards, Maverick

    C / C++ / MFC question

  • CDialogBar and CFrameWnd
    M Maverick

    Does a CDialogBar's parent always have to be a Frame Window?

    C / C++ / MFC question

  • Buttons are disabled on dialog templates,.
    M Maverick

    hey, thats a good idea.. im gonna try that.. tnx:) but still want to know why the buttons are disabled by default when im using dialog bars -- not dialog boxes.. regards, Maverick "wATCh THe BirDIe!..."

    C / C++ / MFC wpf question learning

  • Buttons are disabled on dialog templates,.
    M Maverick

    Well, actually i did have a handler for the buttons already.. specifically the OnButtonClicked handler.. tnx anyways.. :)

    C / C++ / MFC wpf question learning

  • Buttons are disabled on dialog templates,.
    M Maverick

    Hello.. I made a dialog resource with three CButton's and a CEdit for use on a CDialogBar.. the dialog resource is set to WS_CHILD.. Now when i used the resource on a CDialogBar.. and i used CDialogBar directly without subclassing it, the buttons is always disabled... But i didn't set it to disabled on the resource editor.. Why is this? The scenario is that I have a CDockBar docked on a mainframe, and i placed a LayeredCWnd on it as its child..Now the LayeredCWnd has the CDialogBar as its child.. Then when i run the program the buttons in the dialogbar is always disabled, while the Edit control is not.. "WatcH the BIrDiE!"

    C / C++ / MFC wpf question learning

  • iSubItem always = 0 on many ListCtrl Events
    M Maverick

    In a report style CListCtrl with multiple columns, I have traced on many CListCtrl events that the iSubItem of many ListCtrl STRUCTS is always zero eventhough the current subitem selected is on the columns other than the 1st column... For example: void CResultsFormView::OnLvnItemchangedMyList(NMHDR *pNMHDR, LRESULT *pResult) { LPNMLISTVIEW pNMLV = reinterpret_cast(pNMHDR); NMLVCUSTOMDRAW* pn=(NMLVCUSTOMDRAW*)pNMHDR; NMITEMACTIVATE* nm=(NMITEMACTIVATE*)pNMHDR; LPNMITEMACTIVATE temp = (LPNMITEMACTIVATE) pNMHDR; int item=temp->iItem; int subitem=temp->iSubItem; //even if used all of those STRUCTS //subitem is always zero... } Any thoughts on this problem... "mustang this is ghostrider, requesting flyby..."

    C / C++ / MFC help tutorial discussion

  • MS Word View->Print-Layout code?
    M Maverick

    so u're saying that Doc/View classes aren't used in Word?

    C / C++ / MFC architecture question

  • MS Word View->Print-Layout code?
    M Maverick

    If you look at MS Word, with a new blank document.. and then choose View->Print Layout menu.. Now, you'll see the white page on the brown/gray background.. on a 100% view I know that on normal circumstances in Doc/View architecture, the client area of CView entirely occupies the client area of the CCHildFrame.. Now with the Print-Layout View, Is it possible that the white page is drawn on the CView client area but it is NOT occupying the whole client area of CCHIldFrame so thats why we are seeing the background color of CChildFrame? Or is the white page and the background color are all drawn together in the client area of CView? Maverick "watch the birdie!..."

    C / C++ / MFC architecture question

  • Print-Layout View implementation
    M Maverick

    If you look at MS Word, with a new blank document.. and then choose View->Print Layout menu.. Now, you'll see the white page on the brown/gray background.. on a 100% view I know that on normal circumstances, the client area of CView entirely occupies the client area of the CCHildFrame.. Now with the Print-Layout View, Is it possible that the white page is drawn on the CView client area but it is NOT occupying the whole client area of CCHIldFrame so thats why we are seeing the background color of CChildFrame? Or is the white page and the background color are all drawn together in the client area of CView? Maverick "watch the birdie!..."

    C / C++ / MFC graphics question

  • Print-Layout View implementation
    M Maverick

    Hey Thanks for this info.. Well, I don't want a print preview per se.. Just want my interface to be that way, with zooming and scrolling.. Anyway, thanks again. This will be a good help as well... regards, Anton "watch the birdie!..."

    C / C++ / MFC graphics question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups