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
L

ldaoust

@ldaoust
About
Posts
61
Topics
17
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to capture form email and/or password with the web browser control ?
    L ldaoust

    Hi myself, * For anyone who is interrested, I managed to do it this way: 1) I can receive mesages when a user clicks on elements in the page. So, i handle clickin on and tags. If the type attribute is submit (buttons and inputs) or image (inputs), then it is about to submit the form. 2) Get the form object, get the email and password input fields and retrieve their values. I am not sure if this is how the browsers do it, but seems to work fine for me.

    Louis.


    "Ambition without knowledge is like a boat on dry land" -Mr. Miyagi

    C / C++ / MFC c++ question tutorial

  • How to capture form email and/or password with the web browser control ?
    L ldaoust

    Using Visual C++ and web browser control (CDHTMLDialog). I would like to do the same thing as IE or FF does. Capture email and password on a form when user clicks submit. I noticed that when the user clicks a button or input that would submit a form, Firefox asks the user if he wants FF to save the password. I want to reproduce the same behaviour using the web browser control. I think it boils down to 'how can I detect that a form is being submited ?'

    Louis.


    "Ambition without knowledge is like a boat on dry land" -Mr. Miyagi

    C / C++ / MFC c++ question tutorial

  • gzip compression and decompression
    L ldaoust

    Great! I am curious though. Should'nt it be possible to decompress chunk by chunk ? I am assuming that chunk transfer is the right choice when sending binary data in a streaming fashion. Since the binary data can be large and dynamic it would be built as chunk then compress then sent out. Maybe thats not the way a web server does it for files. Maybe it is still possible to do it this way. Would need something in the HTTP header to identicate this behaviour. My implementation does it chunk by chunk, but this is between propriatary server and propriatary client application. So far works very well. Glad I could help. Cheers.

    Louis.


    "Ambition without knowledge is like a boat on dry land" -Mr. Miyagi

    C / C++ / MFC performance question

  • gzip compression and decompression
    L ldaoust

    I have not used zlip to decompress a HTTP stream. However I use zlib to compress and decompress my own stream which is based on HTTP stream. While developing my routine I had to study the HTTP documentation (RFC). So, maybe I have an idea what could be the problem you have. It is possible that the stream you read is 'Transfer-Encoding: chunked'. If so, trying to decompress in one gulp will not work. You probably have to decompress chunk by chunk. Hope this helps. Keep this thread posted with your findings as I am interrested. Louis.


    Louis * google is your friend *

    C / C++ / MFC performance question

  • Resource file: Dialog copy
    L ldaoust

    led mike wrote:

    I don't understand.

    I'm extending the functionality of a dialog. The class is already there. I am adding code to it. So the original dialog is bound to that class, i am working with that class.

    led mike wrote:

    When you copied the dialog resource how was the new dialog template associated to the existing class so that class wizard would create the variables for the controls etc.?

    The original dialog template was already associated with the class through the ID of the dialog. The dialog copy uses the same ID , only the condition changes, the association is still with the same class. This behaviour is the same with .NET 2003. If you make a copy of an exisiting dialog (Insert Copy as I described in my original post) and only change the condition, that copy will also be bound to the original class. Did you try it ?


    Louis * google is your friend *

    C / C++ / MFC c++ csharp visual-studio help tutorial

  • Resource file: Dialog copy
    L ldaoust

    Hi led mike, My example was for a simple dialog. My situation, and I guess this is something many other programmers have to face, is that I have dialogs that already have a working class with all the code and variables and event handlers doing their stuff. Now, I am adding a copy for this same dialog to add features to it, so logically I will want to use the same code that is already there. The compile condition I add to the dialog copy makes it available only when I compile resources with this condition set. I can add code to the dialog that will also be conditionnaly compiled with the same condition. This makes adding new features to a dialog easy and also is more team friendly. You are suggesting to add a completly new class to the dialog. This would involve copying all the source from the other class to this new class and then adjusting the class name to match the new. If a modification is done to the original dialogs code (team) it will not be reflected in this class. Why a copy of a dialog resource would not be a good devcelopement approach ?


    Louis * google is your friend *

    C / C++ / MFC c++ csharp visual-studio help tutorial

  • Resource file: Dialog copy
    L ldaoust

    Using VS.NET 2003 VC++ MFC project. Having a problem with dialog resource copies. In VC6, I could insert a copy of an existing dialog and for which a class has been created, and then with the dialog editor I could add new controls on this copy and add event handler and variables for these new controls. In VC++.NET 2003 it does not seem to work. I can add a copy but after I add new controls on this dialog copy I cannot add events or variables to them because they are not listes in the Control Events in the properties page. Steps to reproduce: 1) create a dialog (default template will be enough) 2) Create a class for this dialog 3) Right the dialog in the resource view and select 'Insert Copy', you will have to enter a valuee in the condition field, for example 'TEMP' 4) Add an edit control to this copy of the dialog template Now, if you right click the edit control and select 'Add variable, the wizard will not have the proper control ID filled in. Also, if you go in the Properties of the dialog and select the Vontrol Events view, the ID for the edit control will not show up. I had no problem doing this in VS6. Anyone seen this problem and know a workaround ? Can anyone tell me if it does the same thing in VS.NET 2005 ? thanks.


    Louis * google is your friend *

    C / C++ / MFC c++ csharp visual-studio help tutorial

  • How should I upgrade it from vc6.0 to vc2005?
    L ldaoust

    Simple solution: With VS2003 you can simply load a VC6 projet into it, it will convert it, so I guess it is the same with VS2005. Then you compile and correct everything it complains about, which usually is not to bad.


    Louis * google is your friend *

    Visual Studio question

  • Add variable wizard with conditional dialogs [modified]
    L ldaoust

    Using VS.NET 2003 VC++ MFC project. After inserting a copy of an existing dialog and specify a condition in the 'Insert Resource Copy' dialog I cannot add a variable for new controls that I added on this copy of the dialog. Also, the control IDs of new controls I add for this dialog copy wont show up in the Control Events in the properties page. It is as if the wizrd only sees the original dialog. I had no problem doing this in VS6. Anyone seen this problem and know a workaround ?


    Louis * google is your friend *

    Visual Studio c++ csharp visual-studio help question

  • Comunication between software
    L ldaoust

    Salut AutreChien, To communicate using TCP (TCP/IP is the same thing) you will be using sockets. You create a socket for TCP by specifying SOCK_STREAM as the familly (type). All the logic for transferring packets with this protocol is handled by the socket library so you dont need to worry about that. You then connect to a remote or local address (you probably will be using 'localhost' as the address for the local PC), then you send and receive data using the proper functions (send and recv) and giving a buffer with data to send (or buffer to receive data). It is traitforward at the base. If you already used sockets then you already know how to do it. If not, you will need to read about sockets, there is a lot of info about that on the net and on this website. An advice to you, do not use MFC sockets, the CSocket class, it is not very efficient. CAsyncSocket is acceptable since it does not have a lot of overhead built in it. Depending on your knowledge of sockets, you can go with basic socket object and create your own class or find a class here on CodeProject, just make sure it is not a class derived from CSocket. If you are using Visual C++, look up the CAsyncSocket in the help (in MSDN) and you should find a sample called CHATSRVR (Chat server) it probaly will be a good starting point for what you want to do. Here's a good reference[^] for Windows sockets. Bonne chance et joyeuse programmation :)


    Louis * google is your friend *

    C / C++ / MFC

  • Comunication between software
    L ldaoust

    Salut AutreChien,

    NorGUI wrote:

    When you say socket it is conection using TCPIP ?

    Sockets are used to communicate using TCP or UDP protocols. When you say TCP/IP it means using TCP (Transmision Control Protocol) of the IP (Internet protocol) suite. It is the same thing.

    NorGUI wrote:

    In your list there is not the DCOM, it is from you side not a possible solution ?

    I am not an expert with COM, but here's what I know. 1) DCOM is an extension to COM that allow communication accross a network. In your case, on the same PC you only need COM. 2) COM is an object model. I think to use that with your applications, you would create a project to create that object. Then your applications will have to use this object, that will need to be installed (registered) on the PC. It will give you an object that you can use from different applications, independent of their programming model. More info on COM[^]: 3) Where I work, we have created ActiveX controls to be used on IIS servers to access different resources. It works fine, but can be somewhat complex and sometimes hard to debug. I think ActiveX closely resemble COM. 4) This is all very Windows. Not portable. 5) If your application will not be exchanging data more then you mention and wont exchange across different PCs and you are already familiar with COM, then it may be the right choice for you.


    Louis * google is your friend *

    C / C++ / MFC

  • Displaying Bitmap on a button [modified]
    L ldaoust

    You are painting in the OnPaint message of the dialog when the dialog is minimized. If you want to draw the bitmap on a button that is child control of the dialog, you are not painting at the right place. To draw a bitmap on a button, you can use the CBitmapButton class.


    Louis * google is your friend *

    C / C++ / MFC question c++ graphics learning

  • Comunication between software
    L ldaoust

    Maybe you need to clarify just a few things: What kind of data you want to exchange ? How often will data be exchanged ? Are you sure the application will ALWAYS have to run on the same PC ? Will you need the code to be portable ? On the same PC: - You can use WM_COPYDATA message. - You can use the clipboard to exchange data. This is very easy. RegisterClipboardFormat will be needed if your data is not text. - Memory map file is easy and efficient. - Shared memory. Article on codeproject[^] - DDE is a bit more complex. Might want to read this[^] - Sockets. Fast and easy at low level. Can be tricky for newcomers. Might want to use a class provided on this site. Many articles on this site. If the data will need to be exchanged from different computers, then sockets will be the way to go. If you can use a known protocol, HTTP for example, then use it. Again, if your not familiar with sockets and protocols, it can be a lot of work and tricky to implement, so use an existing class. my five cents.


    Louis * google is your friend *

    C / C++ / MFC

  • Dialog events not showing
    L ldaoust

    Finally found the problem, so I post the solution here for anyone else that would stumble on this problem. My original project was a VC6 project. It was converted by VC7. At this point I think resources were ok. I was using two resource files in this project, just to split them up so it is easier to work in a team environnement. I also was including a resource file from another project which is a global library for many of our projects. I am not to sure how the problem occured, but the project lost track of which of the resource file was the main resource file. The main resource file is saved in the .vcproj file. At the end of this file there is a <Globals> then a <Global> section in which the main resource file path appears. Mine was pointing to the wrong one, after putting back the proper path, everything was back to normal. Took me a while to find this after trying several things. Case closed.


    Louis * google is your friend * -- modified at 10:51 Tuesday 11th July, 2006

    C / C++ / MFC help csharp visual-studio question

  • Dialog events not showing
    L ldaoust

    Hi, If I remember, I think that it was working at some point. So, for sure, I must have broken something. I have other apps that I converted and I dont have this problem. I have been comparing with other projects t osee what can be different but with no avail. If I'm not mistaking, the "//{{AFX_MSG" and others similar, are not used anymore by VS.NET. So even if they are not in the source file it wont affect. In fact, new classes created for new dialogs dont have any of those special comments (tags). Heres some more info. If I click a control on a dialog form to select it, then the event pane in the properties fills with the pssible notification messages for that control. This works normally. If there is a function handler to a notification message it is also listed. I can also add a new handler to the seelcted control this way. Control Ids dont get listed only when the dialog is selected, when usually all the control IDs would appear. The biggest problem I have with this, and which is causing me a lot of delays, is that I cannot add control variables.


    Louis * google is your friend *

    C / C++ / MFC help csharp visual-studio question

  • Dialog events not showing
    L ldaoust

    I really need help on this one. I have a VS6 app that I loaded in VS.NET 2003. Convertion ok, compile ok, runs ok. Now, I don't know what happend but the control IDs dont get listed in the events pane of dialog properties. Also, if I choose 'Add variable' from the context menu after right clicking a control, the add variable dialog does not allow me to add a 'control' variable. The "Control variable" check box is disabled. Looks like some link between the resoirce IDs and the dialog properties in VS is broken. Hope I explain this clearly enough. Anyone has an idea why this is happening, I been on this probleme for quite a while and really need a way to fix this. ?


    Louis * google is your friend *

    C / C++ / MFC help csharp visual-studio question

  • Variants
    L ldaoust

    hint. myString.c_str() will return a "const char *". You can then assign that to the variant. _variant_t v2 (myString.c_str());


    Louis * google is your friend *

    C / C++ / MFC csharp help question

  • How To send E-mail from localhost
    L ldaoust

    http://www.codeproject.com/useritems/EmailApplication.asp http://www.aspheute.com/english/20000918.asp http://www.4guysfromrolla.com/webtech/080801-1.shtml


    Louis * google is your friend *

    ASP.NET help tutorial

  • Strings to ints
    L ldaoust

    You could use a regular expression to test the string to see that all characters are numeric. Somthing like:private static Regex _isNumber = new Regex(@"^\d+$"); public static bool IsInteger(string theValue) { Match m = _isNumber.Match(theValue); return m.Success; }
    *not tested


    Louis * google is your friend * -- modified at 16:36 Wednesday 19th April, 2006

    C# question

  • Variants
    L ldaoust

    Indeed my example was using MFC. Your example using std might work, but their might be a problem with the last operation: _variant_t v2( (_bstr_t)myString ); not sure you can typecast an std::string with _bstr_t.


    Louis * google is your friend *

    C / C++ / MFC csharp help 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