Pelican - Spaceship Broken-Parts Needed, from the City of Echoes album. Strong song.
RickyC
Posts
-
What song is playing in your head right now? -
Showing and hidind parts of a bitmap [modified][Solved]Ops... I get it! Minutes after post this message I made some changes in my code and everything works fine. Thanks everyone!
-
Showing and hidind parts of a bitmap [modified][Solved]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 -
Copy, Cut and PasteHi CDRAIN, try GetClipboardData and SetClipboardData functions. Maybe this is what you're looking for. cheers!
-
Inter-process communication problemHi 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
-
Inter-process communication problemHello 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!
-
Pipe from GUI app to console processHi 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!:)
-
disable/grey out date time pickerDid you try this?
GetDlgItem(IDC_YOUR_DATE_TIME_PICKER)->EnableWindow(FALSE);
regards!
-
Pipe from GUI app to console processHi 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
-
Pipe from GUI app to console processHello 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 -
Google has vanished!!Here in Brazil, everything goes ok! :) www.google.com.br and www.google.com
-
CTabCtrl Background in XP ThemedThanks Ravi! You help me a lot! :)
-
About Task bar Notifier : Plz HelpHi 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
-
CTabCtrl Background in XP ThemedHi 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.
-
CTabCtrl Background in XP ThemedHi 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
-
Working dir in RegistryThe DLL is a different project. But I will take a look. Thanks David.
-
Working dir in RegistryHi 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!
-
Font Style in CListCtrlThanks Mark! works good! :) cheers!
-
Font Style in CListCtrlHi 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! :)
-
Sound LedThat's it! :) thanks Ravi! cheers!