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
F

fantasy1215

@fantasy1215
About
Posts
153
Topics
67
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to let client using [i][j] access two dimension array?
    F fantasy1215

    I need to implement a class like a CMyResultSet class. The client code which call CMyResultSet would look like this:

    CMyResultSet res;
    GetResultSet(res);
    for (int i = 0; i < res.rows(); ++i)
    {
    string res1 = res[i][0].tostring();
    }

    I have no idea how to implement [][] to let the client code calling like that. How would the method's prototype look like? And How can I save the searched result set in two dimension array, using std::vector or what? Thanks in advance!

    C / C++ / MFC question graphics data-structures tutorial

  • How to destroy a child WinForm after operation?
    F fantasy1215

    I have a MDI winform program, I create a child WinForm frmChild; In this frmChild, I have a button Add to do some operation, after the operation is done, I want to destroy the frmChild form. How can I do this?

    OnBtnAdd()
    {
    do_operation();
    //do the operation, and succeeded
    //then I want to destroy this child form.
    //here How to destroy the child form?
    }

    C# question tutorial

  • How to make a new MDI child form maximum size?
    F fantasy1215

    Actually, I am doing this, this doesn't work. Maybe some property I've set wrong?

    C# tutorial question

  • How to make a new MDI child form maximum size?
    F fantasy1215

    I had a MDI WinForm Program, when click from a menu item, I new a new child WinForm(this child WinForm designed in the designer), but this new child WinForm is not maximumed even I set the childForm.WindowState = System.Windows.Forms.FormWindowState.Maximized; Could you show me how to do this? Thanks in advance!

    C# tutorial question

  • How to deal with such situation?(Need pass STL vector to dll under vs2008) [modified]
    F fantasy1215

    I have a COM dll, the dll expose a method BOOL Open(const wchar_t* filename, OUT std::vector<MyStruct>& dataout); The function 'Open' take the parameter filename, to open the file, and construct the data from the file to pass it out to outside world. But of course the client crash in runtime because the CRT problem, I googled and the link give me answer, http://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/83a026d8-09b1-4d57-8c4a-ab2d139624b4[^] So if I don't want pass STL vector as out parameter, then How can I design my COM dll to deal with such situation(open read the file and pass out the data)?

    modified on Tuesday, August 24, 2010 2:02 AM

    COM question c++ com graphics design

  • How to compute Islamic prayer time everyday? [modified]
    F fantasy1215

    How is it possible to get the hijr.js? I really don't know where to turn for help. So If I do something irritating you, forgive me!

    C / C++ / MFC help tutorial question

  • How to compute Islamic prayer time everyday? [modified]
    F fantasy1215

    Now the data I can get is longitude and latitude, and GMT timezone, According the data above, I compute the sunrise and sunset time.(So Now I get five data), Is there any person who could help me compute the five Islamic prayer time everyday or Give me some advice? I got two website below to compute five Islamic prayer time everyday! http://www.qibla.org/cgi-bin/qibla.cgi http://www.islamicfinder.org/

    modified on Wednesday, March 3, 2010 10:20 PM

    C / C++ / MFC help tutorial question

  • How to execute other programs at the given time?
    F fantasy1215

    I need implement this function in my program.

    C / C++ / MFC question help tutorial

  • How to execute other programs at the given time?
    F fantasy1215

    I hope I can express the question with my poor english. I wanna write a dialog based program, and let user to set the time and at the given time, execute other programs(the user gives the exe file path). Can give some code hint or source code like this? Or a program in sourceforge having such function issue.

    C / C++ / MFC question help tutorial

  • Are std::list std::vector std::map thread-safe class?
    F fantasy1215

    Really thank you. You do me a big favor!

    C / C++ / MFC graphics question

  • Are std::list std::vector std::map thread-safe class?
    F fantasy1215

    Two thread access a std::list object, either of two will add to/(delete) the std::list. When make critical section or mutex guard, I know can make the std::list safe. But does std::list itself implemented thread-safe? Thanks advanced for helping unlock my mind!

    C / C++ / MFC graphics question

  • [SOLVED] How to set cursor IDC_HAND when hover in CMyButton? [SOLVED] [modified]
    F fantasy1215

    Thanks. It worked! I vote you 5!^_^

    C / C++ / MFC help tutorial question

  • [SOLVED] How to set cursor IDC_HAND when hover in CMyButton? [SOLVED] [modified]
    F fantasy1215

    I wanna make cursor IDC_HAND when mouse hover in my CMyButton(derived from CButton). In CMyButton I deal with ON_WM_MOUSEMOVE message, see code below:

    void CMyButton::OnMouseMove(UINT nFlags, CPoint point)
    {
    // TODO: Add your message handler code here and/or call default

    ASSERT(m\_hWnd);
    TRACKMOUSEEVENT tevent;
    tevent.cbSize = sizeof(tevent);
    tevent.dwHoverTime = 0;
    tevent.hwndTrack = m\_hWnd;
    tevent.dwFlags = TME\_LEAVE;
    \_TrackMouseEvent(&tevent);
    
    SetCursor(LoadCursor(NULL, IDC\_HAND));//I set cursor to IDC\_HAND here, but not work.
    CButton::OnMouseMove(nFlags, point);
    if (FALSE == m\_bHovered)
    {
    	m\_bHovered = TRUE;
    	this->Invalidate(TRUE);
    }
    

    }

    Hope I state my problem clearly!

    modified on Tuesday, December 2, 2008 1:43 AM

    C / C++ / MFC help tutorial question

  • How to make the cursor move to end of a multiline edit box ?
    F fantasy1215

    Use CEdit::LineScroll m_ctlEdit.LineScroll (m_ctlEdit.GetLineCount());

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

  • Check windows workstation is locked or not
    F fantasy1215

    Though I don't know how to check whether the workstation is locked or not. But I do know what wrong with your code! 1、LockWorkStation = GetProcAddress(hUser32, "LockWorkStation"); Only return the function pointer of "LockWorkStation".Then you can use this function! 2、LockWorkStation is the function to lock workstation, not to check whether the workstation is locked or not. Do check MSDN! Gurus may answer your question!

    C / C++ / MFC question

  • CListCtrl such problem under windows XP
    F fantasy1215

    Thank you for your reply, I try to Add LVS_EX_DOUBLEBUFFER to the ListCtrl, but the VC6 doesn't know it at all.(And make sure the dialog "Clip Children" set to false) I'm using vc6 under xp sp3, and with flatform sdk for xp sp2[^] installed.(I've download the Windows Server 2003 PSDK February 2003 Edition from MSDN too, but it can't be installed) I've googled, it says define LVS_EX_DOUBLEBUFFER yourself as follow: #define LVS_EX_DOUBLEBUFFER 0x00010000 I did so, and it compiles through, while the flick problem still exists. Wait for your reply!

    C / C++ / MFC c++ wpf com help question

  • CListCtrl such problem under windows XP
    F fantasy1215

    If remove LVS_EX_GRIDLINES, it works fine. But I need LVS_EX_GRIDLINES extend style. Can't we resolve this? I saw eMule has such problem also! And when run the MSDN sample about ListCtrl, it has such problem too when using xxx.exe.manifest to enable application visual style. But if don't use xxx.exe.manifest to enable application visual style, even we use LVS_EX_GRIDLINES, it then works fine! It's all about visual styles.

    C / C++ / MFC c++ wpf com help question

  • CListCtrl such problem under windows XP
    F fantasy1215

    I'm using CListCtrl under windows xp2(with visual style on) with vc++6 create a CListCtrl using LVS_REPORT style and set it LVS_EX_GRIDLINES, When the listctrl has more than one page AND use manifest to make the program using visual styles, click the scroll bar to page down、page up, then it has problems, see the picture[^]. but when not using manifest to set the visual styles, Listctrl doesn't has such problems. Any idea to solve this problem?

    C / C++ / MFC c++ wpf com help question

  • SHFileOperation
    F fantasy1215

    void CTestgarbageDlg::OnButton1()
    {
    SHFILEOPSTRUCT shop;
    shop.hwnd = this->GetSafeHwnd();
    shop.wFunc = FO_COPY;
    shop.pFrom = _T("c:\\AUTOEXEC.BAT\0");
    shop.pTo = _T("d:\0");
    shop.fFlags = FOF_FILESONLY;

    int iRet = -1;
    iRet = SHFileOperation(&shop);
    if (iRet == 0)
    {
    	//sucess
    	AfxMessageBox(\_T("sucess"));
    }
    else
    {
    	AfxMessageBox(\_T("fail"));
    }
    

    }

    I've tried the code above, it works fine. Hope it helps you.

    C / C++ / MFC help

  • My unsolved "Restore window" question, help me plz!
    F fantasy1215

    When right click my tray icon, show the menu, And there is a menu item "Restore window". When click this menu item, it should restore window. My code implement "Restore window" below:

    void CWinSearchDlg::OnTrayRestoreWnd()
    {
    DestroyTray();
    ShowWindow(SW_SHOW);
    if (CWnd::GetActiveWindow() != this)
    {
    SetActiveWindow();
    AfxMessageBox(_T("SetActiveWindow"));
    }
    else
    {
    AfxMessageBox(_T("no SetActiveWindow")); //it goes here
    }
    BOOL bRet = FALSE;
    bRet = SetWindowPos(&wndTop, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
    if (bRet)
    AfxMessageBox(_T("SetWindowPos true"));//it goes here
    else
    AfxMessageBox(_T("SetWindowPos false"));

    bRet = FALSE;
    bRet = SetForegroundWindow();
    if (bRet)
    	AfxMessageBox(\_T("true SetForegroundWindow"));//it goes here
    else
    	AfxMessageBox(\_T("false SetForegroundWindow"));
    
    bRet = FALSE;
    bRet = ::BringWindowToTop(this->GetSafeHwnd());
    if (bRet)
    	AfxMessageBox(\_T("BringWindowToTop true"));//it goes here
    else
    	AfxMessageBox(\_T("BringWindowToTop false"));
    

    }

    I've tried the code in blue font, but when restore the window, It doesn't bring to the top. Please give me a sign!

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