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
C

Crercio O Silva

@Crercio O Silva
About
Posts
21
Topics
8
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Cancel CHtmlView::OnBeforeNavigate2
    C Crercio O Silva

    Hi, I'm expericieng a strange problem with Vista Ultimate. All my applications use CHtmlView to show most of the data and allow easy navigation. I use quite offen links to allow me to parse the requested data and easily catch them on BeforeNavigate2. See the example: CMyHtmLView::OnBeforeNavigate2(...) { if(sUrl == _T("res://MyApp.exe/FindInfo?id=1")) { // Do Something with the Data *pbCancel = TRUE; } ... } It used to work well on previous Windows even with IE 7. Now on Windows Vista a DSN error message is shown in the Html View everytime I cancel the Navigation. Is there any way to avoid this? Thanks.

    Crercio O. Silva / DBTools Software http://www.dbtools.com.br

    Windows API help html com tutorial question

  • Drawing anti alias Lines and Curves
    C Crercio O Silva

    Hi, Does anyone know how to draw anti aliased lines and curves using MFC? I've been playing with CDC::LineTo() and CDC::Pie(), etc but none of them produce the results I was looking for. Any help would be appreciated. Thanks, Crercio O. Silva / DBTools Software http://www.dbtools.com.br[^]

    C / C++ / MFC c++ com graphics help tutorial

  • Java Applets (jar) in MFC resources application
    C Crercio O Silva

    Hi antlers, That sounds amazingly harder than I thought. Would you think it would be a better idea to use ActiveX controls instead of applets? Would the use of ActiveX controls present the same kind (or maybe different) of problems? Thanks a lot for your explanation. It helped me a lot to understand the process. Crercio O. Silva / DBTools Development http://www.dbtools.com.br

    C / C++ / MFC question javascript c++ java com

  • Java Applets (jar) in MFC resources application
    C Crercio O Silva

    Hi Steve, The jar file is specified as HTML, as it is the images and javascripts files. One funny thing is: I have just made a page in FrontPage using the file:/// protocol and the page works fine in the browser. If I use the same page in the application resources I got a Exception in the applet location in the page. Thanks Crercio O. Silva / DBTools Development http://www.dbtools.com.br

    C / C++ / MFC question javascript c++ java com

  • Java Applets (jar) in MFC resources application
    C Crercio O Silva

    I've already done that, and that's the problem it doesn't load the applet with the res:// protocol nor using the file:/// if the browser is embbeded in an MFC application. I could successfully write an html page to load in IE using both file:/// and http:// protocols but it comes to MFC application the only way to load the applet is using the http:// protocol, file:/// and res:// don't work. Any suggestions. Crercio O. Silva / DBTools Development http://www.dbtools.com.br

    C / C++ / MFC question javascript c++ java com

  • Java Applets (jar) in MFC resources application
    C Crercio O Silva

    Hi, Thanks but I know how to embed the applet in my HTML page. As a matter of fact the problem only occurs when the applet is in the application resources like I can do with HTML pages, CSS files, GIF/JPG images, etc. Unfortunatelly it doesn't work with applets. Bellow you can see the part of the code I'm using to load the applet: The thing is, if I use this code in a page in my webserver it works correctly since the jar is in the same directory as the page is. But I do wnat to load this applet from the application resources or externally using the file:///C:/folder/ protocol. I have tested the file:/// protocol and it works if the HTML page is on disk but in my case the HTML page is in the resource. If it still not clear, please just let me know. Thanks again, Crercio O. Silva / DBTools Development http://www.dbtools.com.br

    C / C++ / MFC question javascript c++ java com

  • Java Applets (jar) in MFC resources application
    C Crercio O Silva

    Hi, I've been developing MFC (HTMLView) applications for quite sometime now. In order to reference the images and javascript .js file I used the res://app.exe/ protocol and it works just fine. In my last project I need to use a java applet library .jar but no matter what I try it doesn't work unless the java applet is in a webserver. I have used the following approaches: - codebase file://C:/dir/file.jar => failed - archive file://C:/dir/file.jar => failed - codebase res://app.exe/file.jar => failed - archive res://app.exe/file.jar => failed - codebase http://webserver/file.jar => success - archive http://webserver/file.jar => success The question is: How can I use a java applet in an MFC application without using a webserver? Thanks a lot for any lights on this. Crercio O. Silva / DBTools Development http://www.dbtools.com.br

    C / C++ / MFC question javascript c++ java com

  • Determining if a CPoint belogs to a line
    C Crercio O Silva

    Given a Line (CPoint from, CPoint to), how to determine if a CPoint p belongs to the line? Thanks in advance for any lights. []s Crercio O. Silva / DBTools Development http://www.dbtools.com.br

    C / C++ / MFC com tutorial question

  • new CDaoRecordset in a DLL Problem
    C Crercio O Silva

    Hi, I have created a DLL which access the DAO objects (specially MSAccess databases). In the code I create the CDaoRecordset with the new operator, like this: CDaoRecordset * CDaoClass::Query(CString query) { CDaoRecordset * pNewRecord = new CDaoRecordset(&m_pDatabase); pNewRecord->Open(AFX_DAO_USE_DEFAULT_TYPE, query, 0); return pNewRecord; } CDaoClass::CloseRecordSet(CDaoRecordset * pRecord) { pRecord->Close(); delete pRecord; } This works just as it should if the classes are in the main application, but I'm getting an exception when in DLL the CDaoRecordset::Open() method is executed. The other DAO methods are working fine, so I can list the tables, change them, create indexes, relationships, etc. But I can't execute queries that returns data. When debugging the application I found out that there is an exception in DAOCORE.CPP line 4855, shown bellow: void CDaoRecordset::BuildSelectList() { ASSERT_VALID(this); ASSERT(m_nFields > 0); // This line will assert since m_nFields is 0 m_strSQL += _afxSelect2; CDaoFieldExchange fx(CDaoFieldExchange::AddToSelectList, this); DoFieldExchange(&fx); } Does anyone have any clues about it? Thanks in advance. Crercio O. Silva / DBTools Crercio O. Silva / DBTools Development http://www.dbtools.com.br

    Database c++ database com help question

  • Drawing line conneting two dialogs
    C Crercio O Silva

    Maximilien wrote: You need to re-order the drawings. in your view, you need to draw the different lines then draw the dialogs. I have implemented this. So far the lines are drawn as they should be. When the dialog moves a method in the CContainer erases the previous lines and redraw all of them again. I used this approach to handle the draw of the dialogs: - first I connected WM_SIZE and WM_MOVE in the dialogs to the CContainer window, when one of them occurs it will call a method to repaint the lines - in the paint lines method I first draw the lines and then I hide/show the dialogs in order to make the lines stay under the dialogs. This is really working but the problem is I really think that using CDialog::ShowWindow() is causing me problems since the application goes into a infinite loop (looks like ShowWindow(SW_SHOW/SW_HIDE) updates the position of the dialog causing them to call the repaint method of the CContainer parent. Las night I worked on this till 3:00AM I wasn't thinking clearly anymore. Maybe after some sleep ...:zzz: Thanks man Crercio O. Silva / DBTools Development http://www.dbtools.com.br

    C / C++ / MFC com graphics help tutorial question

  • Drawing line conneting two dialogs
    C Crercio O Silva

    Nick Parker wrote: I suppose you could pick an arbitrary set of points (say half the height of both dialogs) and then use the DrawLine method in GDI. I couldn't find the DrawLine method. Is it the same as using LineTo, MoveTo? Thanks, Crercio O. Silva / DBTools Development http://www.dbtools.com.br

    C / C++ / MFC com graphics help tutorial question

  • Drawing line conneting two dialogs
    C Crercio O Silva

    Scott H. Settlemier wrote: I'm not familiar with the relationship editor, but I would guess that the windows twixt which the line is drawn are not top level windows (modeless dialogs), but rather child windows of some container and it is on the container window that the line is drawn. Oh, I guess I forgot to say this before. The dialogs are childs from a Dialog Container (A CWnd derived control). Thanks for the tip. []s Crercio O. Silva / DBTools Development http://www.dbtools.com.br

    C / C++ / MFC com graphics help tutorial question

  • Drawing line conneting two dialogs
    C Crercio O Silva

    Maximilien wrote: CDC::MoveTo and CDC::LineTO ? I think the problem you might have is how to handle the action itself, how to click ( somewhere ), then drag the mouse ( to draw the line ), and release ( to finalize the connection ) This part actually is already done. I'm using a CListBox ctrl inside each modeless dialog. I managed to implement the drag and drop from one dialog to another. Although in the destination dialog there is a need to have at least one item selected (I couldn't figure out the item on the drop position). I'm now starting the code to draw the line itself. What I've done so far was: - I derived a class from CWnd named CContainerWnd with these methods: CContainer::AddDialog(CString pName) CContainer::RemoveDialog(CString pName) CContainer::CreateRelationship(CString PKName, CString FKName) This class is the parent for all modeless dialogs. I have also used a CFormView as a container for doc/view arquiteture, which worked like a charm including the scrollbars. Inside the CreateRelationship I managed to identify the dialogs position (which I save when created), so to draw the lines was quite easy. The problem comes when I move one of the dialogs. In this case it's necessary to clear the old line and redraw it in the new position. Also there is an even worse problem: if there is another dialog in between two that are related, the line will be drawn over this dialog, so far I couldn't figure out how to do it. I think if I'm able to create a CWnd derived class just to handle the line it may solve my problem, but I'm not too familiar with that. Thanks for the tips. []s Crercio O. Silva / DBTools Development http://www.dbtools.com.br

    C / C++ / MFC com graphics help tutorial question

  • Drawing line conneting two dialogs
    C Crercio O Silva

    Hi, Does anyone have any idea how to create a line connecting two modeless dialogs, like in MSAccess relationship editor? I could create the dialogs inside a CWnd or CView derived class and even the drag and drop support is enable between the two dialogs (which holds a CListBox control), but I couldn't figure out how to create (or draw) the line connecting them. Any help or lights on these would be really nice. Thanks, Crercio O. Silva / DBTools Development http://www.dbtools.com.br

    C / C++ / MFC com graphics help tutorial question

  • CTreeCtrl with checkboxes
    C Crercio O Silva

    Does anyone know how to detect if a item was checked or unchecked in a CTreeCtrl? I took a look at the CTreeCtrl and it seems that there are no messages for this kind of thing.

    C / C++ / MFC tutorial question

  • argh, dialog resource menu enabling/graying
    C Crercio O Silva
    1. Add a handle to your dialog.h like this: afx_msg LRESULT OnKickIdle(WPARAM, LPARAM); 2) Includes in the dialog.cpp (for WM_KICKIDLE) message 3) Insert this code into the MESSAGE_MAP ON_MESSAGE(WM_KICKIDLE, OnKickIdle) 4) Create the function OnKickIdle like this LRESULT ServerProperties::OnKickIdle(WPARAM, LPARAM) { CMenu* pMainMenu = GetMenu(); CCmdUI cmdUI; UINT n; for (n = 0; n < pMainMenu->GetMenuItemCount(); ++n) { CMenu* pSubMenu = pMainMenu->GetSubMenu(n); cmdUI.m_nIndexMax = pSubMenu->GetMenuItemCount(); for (UINT i = 0; i < cmdUI.m_nIndexMax;++i) { cmdUI.m_nIndex = i; cmdUI.m_nID = pSubMenu->GetMenuItemID(i); cmdUI.m_pMenu = pSubMenu; cmdUI.DoUpdate(this, FALSE); } } return TRUE; } 5) Add the handles to OnUpdateCmdUI to menu items. 6) Relax, compile it e enjoy. :cool: PS: That will work only for menus, there is a different way to handle toolbar. []s
    C / C++ / MFC tutorial c++ question learning

  • Any recommendations for Linux development sites
    C Crercio O Silva

    Here is some websites: www.objectcentral.com www.kde.org (for kde development, I like it very much, and they have an excellent IDE - kdevelop) www.xfree86.org (for x development) And a great book that covers all these things together: C++ programming, Memory management, shared libraries, X Window development, etc GNU C++ FOR LINUX - Tom Swan There's much more, but unfortunatelly I don't remeber. :( []s

    The Lounge c++ linux question

  • RedHat Linux ISO Images
    C Crercio O Silva

    I had some problems to configure my Xserver too. I think the version 4 it's a little bit more hard to set. But I have to say something: one you do it install the KDE version 2 it has nice applications including KDE Office and Kdevelop that are worth it. By the way I used the Adaptec software to burn my CD's without any problem. []s Crercio

    The Lounge com linux tutorial question

  • MS Access File Format
    C Crercio O Silva

    Hi, I tried to find out something about it for a long time without success. Wotsit is the best I've got so far, they have files formats for most known files but Access. If you are more luck than me, please just let me know. :)

    The Lounge database question

  • CListCtrl or CListBox with a Caption
    C Crercio O Silva

    Does anyone know how to draw a caption (like in a Dialog) in a CListCtrl or CListBox? Just to make it clear I'd a control like in MSAccess->Design View, when it's possible to see a Table columns in a List with a caption, you can move it and resize it. Any clues? Thanks guys.

    The Lounge design tutorial 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