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
R

RickyC

@RickyC
About
Posts
30
Topics
12
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • What song is playing in your head right now?
    R RickyC

    Pelican - Spaceship Broken-Parts Needed, from the City of Echoes album. Strong song.

    The Lounge question

  • Showing and hidind parts of a bitmap [modified][Solved]
    R RickyC

    Ops... I get it! Minutes after post this message I made some changes in my code and everything works fine. Thanks everyone!

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

  • Showing and hidind parts of a bitmap [modified][Solved]
    R RickyC

    Hello good people! How are you doing? Well, I need some help here and maybe someone could help me. I'm tryng to do something like a VuMeter (like this one), but my control have a bitmap as background and need to be 'covered' and 'uncovered' depending of the value. Something like a layer above the bitmap. I use CDC::SelectObject(&my_bitmap); to set the bitmap as background. I don't have much experience in GDI or device context, and if someone have some code example or something it'll be really helpfull. Thanks! Best regards! -- modified at 15:23 Tuesday 17th July, 2007

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

  • Copy, Cut and Paste
    R RickyC

    Hi CDRAIN, try GetClipboardData and SetClipboardData functions. Maybe this is what you're looking for. cheers!

    C / C++ / MFC c++ question

  • Inter-process communication problem
    R RickyC

    Hi led mike! Thanks for your answer. I've been searching for those error states that need to reset, but I don't found them in MSDN and nowhere. I've been thinking about use named pipes (I'm using anonymous), but this really scares me... my project is already late, and the use of named pipes will demand a whole new approach. Thanks for your help led mike, best regards

    C / C++ / MFC help com tutorial question

  • Inter-process communication problem
    R RickyC

    Hello everybody! I have two process (father and child) and my implementation was all based in the article How to spawn console processes with redirected standard handles. Everything works fine, send command and receive answers from the child process (command line)... but, it works just a few times (two to be more exactly). In the third command that I send, there is no answer. The WriteFile function does not give any error, and the ReadFile ('Threaded') function don't receive any bytes and don't accuse any errors to. In this case, I'm even using the PeekNamedPipe function to know how much bytes (if it's there) I have to read. It's strange to me... everything is working fine, but suddenly stops working. :sigh: Does anybody here already have this problem or knows what I'm doing wrong? Thanks in advance! cheers!

    C / C++ / MFC help com tutorial question

  • Pipe from GUI app to console process
    R RickyC

    Hi Dadiv, All. I found the problem.

    if(!CloseHandle(hChildStdinWr))
    AfxMessageBox("Erro ao fechar o handle hChildStdinWr");

    This handle, must not be close. Thanks all for the atention, Regards!:)

    C / C++ / MFC help sysadmin security

  • disable/grey out date time picker
    R RickyC

    Did you try this?

    GetDlgItem(IDC_YOUR_DATE_TIME_PICKER)->EnableWindow(FALSE);

    regards!

    C / C++ / MFC question

  • Pipe from GUI app to console process
    R RickyC

    Hi David, thanks for your quick reply. Yes, I read those articles. But I still have problems to 'adapt' to a GUI app... they all implement console applications. thanks anyway -- modified at 9:23 Tuesday 11th April, 2006

    C / C++ / MFC help sysadmin security

  • Pipe from GUI app to console process
    R RickyC

    Hello everybody! I've been working for some hours in a project of a GUI app that runs a console app (ssh) in background. Well, I've been using many examples of code from here (codeproject) and from the internet, but I had aways stoped at the same error. Maybe someone can give me some help... here is what happens: I create the pipes and begin the execution of the program... everything goes fine, the ssh program ask for the password, and then I use WriteFile to send it the password. >Crash!< It continues the execution and do not even try to validate the password :sigh: I'll put some code here:

    //creating pipes
    if(!CreatePipe(&hChildStdoutRd, &hChildStdoutWr, &secattr, 0))
    AfxMessageBox("Error in pipe Out");

    SetHandleInformation(hChildStdoutRd, HANDLE_FLAG_INHERIT, 0);

    if(!CreatePipe(&hChildStdinRd, &hChildStdinWr, &secattr, 0))
    AfxMessageBox("Error in pipe In");

    SetHandleInformation(hChildStdinWr, HANDLE_FLAG_INHERIT, 0);

    /////////////////////////////////////////////////////////////
    // In another thread, I started the app. The pipes stay in a object that is
    // passed through parameter to the thread execution.
    STARTUPINFO sInfo;
    ZeroMemory(&sInfo,sizeof(sInfo));
    PROCESS_INFORMATION pInfo;
    ZeroMemory(&pInfo,sizeof(pInfo));
    sInfo.cb=sizeof(sInfo);
    sInfo.dwFlags |= STARTF_USESTDHANDLES;
    sInfo.hStdInput = cssh->hChildStdinRd;
    sInfo.hStdOutput = cssh->hChildStdoutWr;
    sInfo.hStdError = cssh->hChildStdoutWr;

    //In the same thread, I read the first line of execution...
    CloseHandle(csftp->hChildStdoutWr);

    for( ;; ) {
    if(!ReadFile(csftp->hChildStdoutRd, buf, 100, &dwRead, NULL) || dwRead == 0)
    break;

    buf[dwRead] = '\0';
    strAux = buf;
    cssh->ShowText(strAux);
    }

    // The password is typed in a Edit (for test porpouse only), and a try this code:
    strcpy(strPass, szBuf);

    if(!WriteFile(hChildStdinWr, szBuf, strPass.GetLength() ,&dwWritten, NULL))
    AfxMessageBox("Error in hChildStdinWr");

    if(!CloseHandle(hChildStdinWr))
    AfxMessageBox("Error in hChildStdinWr");

    After execute the code above, the ssh app runs all the authentication with failure user@host's password: user@host's password: user@host's password: user@host's password: user@host's password: Using username "user". Access denied Access denied Access denied Access denied Access denied Fatal: Server sent disconnect message type 2 (SSH_DISCONNECT_PROTOCOL_ERROR): "Too many authentication failures for user" Any help, is welcome :) chee

    C / C++ / MFC help sysadmin security

  • Google has vanished!!
    R RickyC

    Here in Brazil, everything goes ok! :) www.google.com.br and www.google.com

    The Lounge com question

  • CTabCtrl Background in XP Themed
    R RickyC

    Thanks Ravi! You help me a lot! :)

    C / C++ / MFC question help

  • About Task bar Notifier : Plz Help
    R RickyC

    Hi Parims, take a look on this controls TaskBarNotifier (C++) TaskBarNotifier (C#, VB.NET) NotifyWindow (C#) Hope that helps you.:) -- modified at 7:30 Friday 16th September, 2005

    C / C++ / MFC help

  • CTabCtrl Background in XP Themed
    R RickyC

    Hi Ravi, thanks for your answer. I have been looking into CPropertySheet and the problem that I see, is that CPropertySheet behave like a Modal Dialog isn't? And my CTabCtrl is inside a Dialog, like part of the controls of that Dialog. Can I use the CPropertySheet like a normal MFC Control otherwise than a separated Modal Dialog? Well, I'll try'it anyway :) Thank you very much for your patience and assistance.

    C / C++ / MFC question help

  • CTabCtrl Background in XP Themed
    R RickyC

    Hi All, I've been working on a project that makes use of CTabCtrl in a derived class. My problem is that when my application runs on Windows XP Themed, the background color of that tabs that should be white (?)- default - are gray as the dialogs that they are. So it causes a strange feeling... the tabs titles are white and beautiful... but the tabs contents are gray... :^) Does anybody already pass through this or have some idea of how can I avoid this? Maybe makes the color of my dialogs (tab contents) transparent... I just don't know :( ps.: its important that works on XP Themed and other versions of Windows too. Thanks all for the attention, Cheers! -- modified at 10:16 Thursday 15th September, 2005

    C / C++ / MFC question help

  • Working dir in Registry
    R RickyC

    The DLL is a different project. But I will take a look. Thanks David.

    C / C++ / MFC windows-admin question workspace

  • Working dir in Registry
    R RickyC

    Hi folks! I'm workig on a application that needs to Run on Windows Startup. Ok, I just set the registry entry "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" to my application, BUT... when the app starts, it loads a dll and this dll load a configuration file in the same dir. When my app loads in startup looks like a shortcut without "Working dir", cause the dll can't load de cfg file. Does have any way to set the "Working dir" in the registry entry? Thanks all for the attention :) Cheers!

    C / C++ / MFC windows-admin question workspace

  • Font Style in CListCtrl
    R RickyC

    Thanks Mark! works good! :) cheers!

    C / C++ / MFC question

  • Font Style in CListCtrl
    R RickyC

    Hi All, there's anybody who knows if there is a way to set the font style (size, stuff like that) in a CListCtrl item? :confused: Thanks a lot! cheers! :)

    C / C++ / MFC question

  • Sound Led
    R RickyC

    That's it! :) thanks Ravi! cheers!

    C / C++ / MFC question hardware
  • Login

  • Don't have an account? Register

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