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
W

wicked_guy

@wicked_guy
About
Posts
12
Topics
7
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Modeless dialog error
    W wicked_guy

    Hello TEOlivier, Try this code, CParams *m_pParams; m_pParams = new CParams(this); m_pParams->Create(CParams::IDD); m_pParams->ShowWindow(SW_SHOW); I assumed that CParams is the name of your dialog's class. Regards

    C / C++ / MFC c++ help tutorial

  • How to extract integer value from CString
    W wicked_guy

    Try this Ravi: CString str = "-123"; int i = atoi((LPCSTR)str); If it didn't work, simply remove '(LPCSTR)'

    C / C++ / MFC tutorial question

  • Can't identify pixel color over a live image
    W wicked_guy

    Hello Programmers, I am having a program that aquires live video signals and displays them on a picture holder. I am trying to identify the pixel color as the user clicks on the video screen. The program gave me an RGB number but obviously not correct. The following is the program on an MFC dialog based application. void CIdsSimpleLiveDlg::OnLButtonDown(UINT nFlags, CPoint point) { // TODO: Add your message handler code here and/or call default CString hi; int ali; CWnd *pDesktop = GetDlgItem(IDC_DISPLAY); CDC *pDC = pDesktop->GetWindowDC(); COLORREF clr = pDC->GetPixel(point.x,point.y); ali = (GetRValue(clr)+GetGValue(clr)+GetBValue(clr))/3; hi.Format("%d",ali); AfxMessageBox(hi); pDesktop->ReleaseDC(pDC); CDialog::OnLButtonDown(nFlags, point); } Note that the notation 'IDC_DISPLAY' represents the ID of the picture holder. Thanks in advance

    C / C++ / MFC c++ dotnet

  • How can I change focus between child windows within an MDI application
    W wicked_guy

    Hello everyone, I am having trouble changing focus from child window to another. Of course, I want to be able to do that without using the mouse or keyboard, but the code itself. The application is used in an automated video grabbing. This is the code I have written: class CMyAppDoc : public CDocument { public: CView *pOldActiveView; .. .. CMyAppDoc::OnButton1() { CMDIFrameWnd* pMainWnd = (CMDIFrameWnd*)AfxGetMainWnd(); // Get the active MDI child window. CMDIChildWnd* pChild = (CMDIChildWnd*)pMainWnd->MDIGetActive(); // Get the active view attached to the active MDI child window. pOldActiveView = pChild->GetActiveView(); } After clicking Button1 I manually change the focus by the mouse and then click Button2, which includes the following code: CMyAppDoc::Button2() { pOldActiveView->SetActiveWindow(); } Summarizing the code, clicking the Button1 should assign the pointer pOldActiveView the address of the active child window during the time it is pressed. Then After manually chainging the focus to another child window the active child window will change but the pointer is still pointing to our old active child window. So then by clicking Button2 should set the focus on the old child window, but unfortunately nothing changes. I have also tried "pOldActiveView->SetFocus()" instead but didn't change anything as well. Any help will be highly appreciated.

    C / C++ / MFC help question learning

  • Trouble in updating source in ADO
    W wicked_guy

    Hi everone, I am having trouble in updating the source database. I am using a dialog based application with a datagrid. I managed to add a number (01065017) to the first coloumn succesfully but could not update the source after the addition of this number. Any Idea why. The following is the code: m_pConn.CreateInstance(__uuidof(Connection)); m_pConn->Open("Provider=Microsoft.Jet.OLEDB.4.0;" "Data Source=ADOTestDB.MDB", _bstr_t (""), _bstr_t (""), adModeUnknown ); m_pComm.CreateInstance(__uuidof(Command)); m_pComm->ActiveConnection = m_pConn; m_pComm->CommandText = "Select * From Student"; m_pReco.CreateInstance(__uuidof(Recordset)); m_pReco->CursorLocation = adUseClient; m_pReco->Open ( (IDispatch *) m_pComm, vtMissing, adOpenStatic, adLockBatchOptimistic, adCmdUnknown); m_DataCtrl.SetCaption("Students"); m_DataCtrl.SetRefDataSource(NULL); m_DataCtrl.SetRefDataSource((LPUNKNOWN) m_pReco); m_DataCtrl.Refresh(); m_pReco->AddNew(); FieldsPtr pFields = m_pReco->Fields; FieldPtr pStudentNo = pFields->GetItem("StudentNo"); ASSERT(NULL != pStudentNo); CString ali = (char*)(_bstr_t) pStudentNo->Value; ali.Format("01065017"); _variant_t vColumn, vValue; vColumn.SetString("StudentNo"); vValue.SetString(ali); m_pReco->Update(vColumn, vValue); m_pReco->Update(); Thanx in advance

    Database database announcement

  • How to Set the controls to be infront of an Image
    W wicked_guy

    Hello everyone, I am using an MFC dialog based application where a gif is loaded into the dialog. Now, the problem is that some of the controls within the dialog become hidden by the image. What I want to do is to place the controls infront of the image as a background. Can anyone guide me. Thanx in advance

    C / C++ / MFC tutorial c++ help

  • Problems with the accessing the parallel port using winio
    W wicked_guy

    Hi Everone, I am trying to access my parallel port using the library winio.dll. I managed to do so using an administrative account but that wasn't possible using a non-administrative accuont. I have used this function to do so, but unfortunately I couldn't succeed: InstallWinIoDriver("C:\MyApp\Debug\WinIo.sys",FALSE); can anyone halp plz thanx in advance

    C / C++ / MFC debugging

  • Multiple Parallel Ports
    W wicked_guy

    Thanx for the reply Christian. Could that be done with MFC as well or just Win32 Applications.

    C / C++ / MFC

  • Multiple Parallel Ports
    W wicked_guy

    Hi Everyone, Could anyone please give me details about controlling more than one parallel from the same CPU unit. Thanx in advance

    C / C++ / MFC

  • Using the timer
    W wicked_guy

    Ahhaaa.. Ok then, but these are useful functions as well, Thanx Ant.;)

    C / C++ / MFC tutorial

  • Using the timer
    W wicked_guy

    Are these actually counters or are they functions that retrieve the frequeny and index of a counter? Check out this link plz. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/timers/timerreference/timerfunctions/queryperformancefrequency.asp

    C / C++ / MFC tutorial

  • Using the timer
    W wicked_guy

    Hi I am controlling an electrical circuit using the computer through the computer ports. I am trying to capture a fast changing analog signal using sampling. So I am just enquiring about the maximum frequency that we could set the timer to using the following function: SetTimer(1, 2000, 0); I actually want the timer to interrupt every ten micro seconds (10uS). Is it possible with this type of timers. If not, can anyone guide me to a timer that is capable of doing so. Thanx in advance

    C / C++ / MFC tutorial
  • Login

  • Don't have an account? Register

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