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

Luc Bergeron

@Luc Bergeron
About
Posts
25
Topics
9
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Single.Parse(string) problem...
    L Luc Bergeron

    My freakin' bad :zzz: :mad: :(( :laugh: When fetching the text from the TextBox, I was using this.PriceEdit.ToString()... Ah ah ah !!! Wrong... This got me some undesired text in the string. I found that I need to use the TextBox.Text to access the text entered !!! Luc.

    C# help csharp

  • Single.Parse(string) problem...
    L Luc Bergeron

    Hello everyone, i'm quite new to this c# world so please bear with me :) So I have this form and in it I have an editbox in which I must enter a number, in the following form : 119.43. Now, I need this string to be converted to float. Here's how I do it : float p = System.Single.Parse(prixS); BUT, I always get a string not properly formatted exception. I tried entering the price with a comma, no can do. Than I tried this : prixF = (float)System.Single.Parse(prix, System.Globalization.NumberStyles.AllowDecimalPoint| System.Globalization.NumberStyles.AllowTrailingWhite| System.Globalization.NumberStyles.AllowLeadingWhite); But again same error. Can someone please help me on this. Thanks for any help. Luc.

    C# help csharp

  • Man arrested for 'peace' T-shirt
    L Luc Bergeron

    'wearing of apparel... likely to provoke disturbances... is prohibited' And a t-shirt that says "Give peace a chance" is likely to provoke disturbances ??? :confused: :wtf:

    The Lounge html database com

  • Embedded CPropertySheet : HOWTO change CPropertyPage programatically ???
    L Luc Bergeron

    Cool. Your suggestion work fine !!! :-D

    C / C++ / MFC database design hardware help question

  • Embedded CPropertySheet : HOWTO change CPropertyPage programatically ???
    L Luc Bergeron

    Hello to all, I have an embedded CPropertySheet inside a dialog and this sheet contains 4 pages. The user can't access the second page unless he has entered and saved a record inside the first one. So in the SecondPage::OnSetActive() I query some data members and if nothing has been entered I call the parent PropertySheet and ask it to SetActive the first page. UI wise the first page is selected but the controls displayed are still those of the second page. What call(s) do I have to make in order to display what the first page has to offer in terms of controls ???? Thanks in advance for any help ! Luc :confused:

    C / C++ / MFC database design hardware help question

  • Problem with auto_ptr !!!
    L Luc Bergeron

    Here is how FN_REGISTRY is defined...

    typedef std::auto_ptr (*BASE_CREATE_FN)(const std::string&,
    const std::string&,
    const std::string&);

    // FN_REGISTRY is the registry of all the BASE_CREATE_FN
    // pointers registered. Functions are registered using the
    // regCreateFn member function (see below).
    typedef std::map FN_REGISTRY;
    FN_REGISTRY registry;

    And I use STLPort !!! P.S. How come, after using the pre tags, that my "<" and ">" gets deleted !?!?!?

    C / C++ / MFC help com windows-admin debugging question

  • Problem with auto_ptr !!!
    L Luc Bergeron

    Hello to all. I've checked this following article (http://www.cuj.com/experts/1906/hyslop.htm?topic=experts) at CUJ web site and decided to use it in my own application. So here we go. I have managed to implement the factory inside a windows DLL. But i'm having weird problems with it. Mainly the genericFactory::create method. This is how i've implemented it (with the modification that I use a pointer to a function with three std::string parameters) : template std::auto_ptr genericFactory::create(const classIDKey &className, const std::string& p1, const std::string& p2, const std::string& p3) const { std::auto_ptr ret(0); FN_REGISTRY::const_iterator regEntry=registry.find(className); if (regEntry != registry.end()) { ret = regEntry->second(p1, p2, p3); } return ret; } And in my client code this is how I call it : std::auto_ptr tbl(0); tbl = genericFactory::instance().create("HistoricalDataTbl", host, user, pwd); ----------------------------------------------------------------------------------------------- When I trace inside the create method, the "ret" variable is fine and points to a valid MySQLTable object. BUT, when the function returns to the client code... I get an unhandled exception error. This error is generated inside the auto_ptr<>::reset() method. To be more precise, the "tbl" auto_ptr in the client code is supposed to be initialized with a NULL pointer but when getting back from genericFactory::create method the "tbl" pointer points to an invalid MySQLTable object. The quilty code inside auto_ptr : void reset(_Tp* __px=0) { _Tp* __pt = this->get(); if (__px != __pt) delete __pt; //offending line... this->__set(__px); } So i'm currently puzzled has to why the "tbl" variable points to a bad MySQLTable object!?!?!?! Any help would be greatly appreciated :-D Luc.

    C / C++ / MFC help com windows-admin debugging question

  • MUST See - LMAO
    L Luc Bergeron

    Not to brag(not sure if it's the correct word) about, but it took me less than 1 minute :)

    The Lounge com

  • World Mouse Clicking Championship
    L Luc Bergeron

    Cool ! I got 47 :)

    The Lounge html com

  • What size monitors do you guys use?
    L Luc Bergeron

    Oh my god... Poor you... I have a 19 inch monitor with a res of 1280x1024 :) I can't and hope to never have to go back to something smaller than 17 inch !!!

    The Lounge csharp visual-studio com graphics performance

  • Question for you cross platform programmers
    L Luc Bergeron

    Might want to give GIMP a try !?!?! www.gimp.org Runs on Windows and Linux !

    The Lounge question graphics linux

  • Hambut Loamsdown of Deephallow Lives!
    L Luc Bergeron

    Oh boy mine is : Polo Gamgee-Took of Bywater !?!?!

    The Lounge visual-studio com question

  • Need your opinion for job change!!!
    L Luc Bergeron

    You said it yourself... >It pretty much comes down to money unfortunately, which I think sucks because it shouldn't be my main concern. Take the pros and list them on paper... Take the cons and put them besides the pros... What weights more !?!?! You should never stay in a place only for money... Money isn't going to help yuo feel happy... Your friends, family, nature will !!! Luc.

    The Lounge career css

  • UI Thread dummy window !?!?!?
    L Luc Bergeron

    Nope doesn't work. My CConnection::PreTranslateMessage never gets called !?!?!

    C / C++ / MFC question design sysadmin help

  • UI Thread dummy window !?!?!?
    L Luc Bergeron

    Hi to all !!! I'm currently trying to code a Winsock server application. I'm using the main process thread to listen to incoming connection. When a connection is detected (i'm using WSAAsyncSelect) i spawn a new UI thread that will process that connection. I do not want a window to appear but i'm creating a dummy window because I need the message map... But the problem i'm having right now is that the messages for the WSAAsyncSelect goes to the dummy window and not to the UI thread message map... Here is how I create the dummy window... //------------------------------------------------- bool CConnection::InitDummyWnd(void) { m_pDummyDlg = new CDummyDlg; if (!m_pDummyDlg->Create(IDD_DUMMY, NULL)) return false; m_pMainWnd = (CWnd *)m_pDummyDlg; m_pMainWnd->SubclassWindow(m_pDummyDlg->GetSafeHwnd()); m_pMainWnd->ShowWindow(SW_SHOW); return true; } bool CConnection::PrepareWSAAsync(void) { if (WSAAsyncSelect(m_sock.getSocket(), m_pMainWnd->GetSafeHwnd(), WSA_THREADSOCKETEVENT, FD_READ | FD_WRITE | FD_CLOSE) == SOCKET_ERROR) { WORD err = WSAGetLastError(); return false; } return true; } //------------------------------------------------------------ How can I make sure that the thread message map gets all the winsock message instead of the dummy window message map ??? Thanks for any advice ! Luc B.

    C / C++ / MFC question design sysadmin help

  • Interesting article
    L Luc Bergeron

    Nope i'm canadian :) Or shall I say "Québecois" :confused: Luc.

    The Lounge html com question

  • Interesting article
    L Luc Bergeron

    Interesting article indeed !!! And a true one at that. Until the *&?%$ US gov. realise that they are responsible for what has happen to them in regard to their STUPID and hypocrite foreign attitude then the muslim world will never be free !!! People should learn the TRUE history of the american implication in other countries. Might I suggest a good web site : http://members.aol.com/bblum6/American\_holocaust.htm Luc. P.S. Flame me if you will, I don't mind :)

    The Lounge html com question

  • Ref: Nimda - virus for linux
    L Luc Bergeron

    If your running a telnet daemon then your looking for trouble... Plain text passwords... Not very security conscious... Try running SSH instead ! Long live encryption !!! :)

    The Lounge help linux announcement

  • Code Red Worm
    L Luc Bergeron

    Yep there is a way to recover... And with what !?!?!?! A LINUX boot disk ;P http://home.eunet.no/~pnordahl/ntpasswd/

    The Lounge sysadmin linux security question

  • Could someone explain the following !!!
    L Luc Bergeron

    Hi there, i'm curious about how does static_downcast and dynamic_downcast works ??? Thanks for any answer ! Have a nice day ! :)

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