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

FredrickNorge

@FredrickNorge
About
Posts
44
Topics
17
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • float overflow
    F FredrickNorge

    Hi, i have a variable of type float that get a return value thats greater than what float or double, long double etc can hold. The return data does not need to be so precise, example it holds 1.1520230e-007 when it overflows, and i really just need 1.1520230. However when the variable overflows like this i cant print it, i cant cast it or move it to a buffer. Is there a c\c++ function that truncates it, i have tried to cast the return data as type float but no success. Also i cant pass it to a buffer to then shorten it later as VS ignores the data except in the debug-watch window. Any ideas are much appreciated. Regards, Fred

    C / C++ / MFC c++ visual-studio debugging tutorial

  • MFC ON_COMMAND problem
    F FredrickNorge

    Thanks, that made it work :)

    C / C++ / MFC question c++ help

  • MFC ON_COMMAND problem
    F FredrickNorge

    Ok, how do i associate the menu to the dialog? The menu opens when right mouse button is pressed and so i dont care to attatch it to the Child Dialogs system menu.

    C / C++ / MFC question c++ help

  • MFC ON_COMMAND problem
    F FredrickNorge

    Hi Mark, I call it via afx_msg void OnAddNewItem(); and ON_COMMAND(ID__ADDITEM, &CItemDlg::OnAddNewItem) Edit: the menu item is created via CMenu and if i move ON_COMMAND(ID__ADDITEM, &CItemDlg::OnAddNewItem) to the main dialog it works fine. But i want to know why i cant call it in the child dialog

    C / C++ / MFC question c++ help

  • MFC ON_COMMAND problem
    F FredrickNorge

    Hi, for some reason i can only call ON_COMMAND in my main dialog, how can i call it in a child dialog? Any ideas would be much apreciated!

    C / C++ / MFC question c++ help

  • MFC focus question
    F FredrickNorge

    Perfect, just what i needed. Thanks!

    C / C++ / MFC question c++

  • MFC focus question
    F FredrickNorge

    The initial dialog does not paint when there is a modal dialog in focus, because i run the app in full screen. But if there are no functions that i can use that deals with "OnFocus", WM_PAINT works, i just need to be carefull with it. Thanks Fredrick

    C / C++ / MFC question c++

  • MFC focus question
    F FredrickNorge

    I have a question in regards to, if there is a built in function in mfc i can overload that gets called when a dialog is brought back to focus after a DoModal() operation. I end the modal dialog with OnOK(). the OnPaint() starts to paint again when its brought back to focus, but is there is a cleaner way to check for this event? Thanks

    C / C++ / MFC question c++

  • MFC classes problem
    F FredrickNorge

    such as.... VERIFY(m_dlg1.Create(Main::IDD, this)); EDIT: the dialog is already drawn and past OnInitDialog, however i am using tabing so all dialogs are visible at the same time. -- modified at 18:20 Friday 30th March, 2007

    Managed C++/CLI help c++ question announcement

  • MFC classes problem
    F FredrickNorge

    I get an ASSERT(::IsWindow(m_hWnd)) when i try update a CEdit item in from another class like Myclass c; c.OnUpdate(); what do i need to do to solve this issue? Any sugestions appreciated.

    Managed C++/CLI help c++ question announcement

  • Execute programs with arguments
    F FredrickNorge

    I guess i did not test it fully, now that i know it should work i am sure il sort it out :)

    C / C++ / MFC c++ question

  • Execute programs with arguments
    F FredrickNorge

    I am creating a simple launcher for quake2 in mfc where i want to launch it with "quake2.exe +set maxclients 16" etc. I am only familiar with shellexecute, but i have problems launching anything with arguments, is there anything built in mfc or a c++ function i could use to launch with arguments? Thanks.

    C / C++ / MFC c++ question

  • error C3867 in MFC
    F FredrickNorge

    thanks, that solves it ;)

    C / C++ / MFC c++ help question

  • error C3867 in MFC
    F FredrickNorge

    that gives me an error like this error C2664: '_beginthread' : cannot convert parameter 1 from 'void (__thiscall CGLMFCDlg::* )(void)' to 'void (__cdecl *)(void *)' 1> There is no context in which this conversion is possible

    C / C++ / MFC c++ help question

  • error C3867 in MFC
    F FredrickNorge

    i try to start another thread with this code CGLMFCDlg * MyThread= new CGLMFCDlg; _beginthread(MyThread->Thread, 0,NULL); delete MyThread; the new thread is a void function, i get a error message as follows: error C3867: 'CGLMFCDlg::Thread': function call missing argument list; use '&CGLMFCDlg::Thread' to create a pointer to member Any sugestions on how i can solve this? thanks

    C / C++ / MFC c++ help question

  • MFC DLL question
    F FredrickNorge

    yes, makes sence. thanks

    C / C++ / MFC question c++

  • MFC DLL question
    F FredrickNorge

    I am curently loading a dll like this static HMODULE hMod ; hMod = LoadLibrary("Updater.dll");exit(1); if(!hMod) { AfxMessageBox("not found !!!!!"); exit(1); } FreeLibrary(hMod); The mfc app loads the mfc dll and exits, but is it possible to define some sort of return value in the mfc dll that the mfc app closes while the dll continue processing?

    C / C++ / MFC question c++

  • MFC CEdit scrollbar question
    F FredrickNorge

    Hi Robert How do i focus it to the correct idc? i get an assert: { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, EM_SETSEL, nStartChar, nEndChar); if (!bNoScroll) this is the code i have: void CAutoUpdaterDlg::OnUpdateScreen() { char LocalBuffer[10]; itter++; sprintf(LocalBuffer, "%d", itter); CEdit * p = static_cast(GetDlgItem(IDC_Window)); // static message for now if(!FilesInProgress) { strcat(WindowBuffer, LocalBuffer); strcat(WindowBuffer, ": "); } else strcat(WindowBuffer, ""); strcat(WindowBuffer, DynamicBuffer); int Size = strlen(WindowBuffer); p->SetMargins(5,5); p->SetWindowText(Convert_A_To_DA(WindowBuffer)); CProgressCtrl * progress = static_cast(GetDlgItem(IDC_PROGRESS)); progress->SetRange(0,MaxRange);Progress++; progress->SetPos(Progress); int MemSize = strlen(DynamicBuffer); for(int i = 0; i<= MemSize+1; i++) { DynamicBuffer[i] = 0x00; } CEdit myEdit; CString csContent = _T(Convert_A_To_DA(WindowBuffer)); myEdit.GetWindowText( csContent ); myEdit.SetSel( csContent.GetLength(), csContent.GetLength(), TRUE /* scroll to the selected text */ ); UpdateWindow(); FilesInProgress = false; }

    C / C++ / MFC question c++

  • MFC CEdit scrollbar question
    F FredrickNorge

    I constantly add more data into a CEdit, i also activated the scroll bar for this window. When the text exceeds the CEdit text area limit, the scroll bar is activated so i can scroll the text up and down which is good. Though instead of that i have to scroll downwards to see the new text added, is there a CEdit function which tells the scroll bar to always stay at max, or point downwards? So i have to scroll upwards instead to see the old text. Thanks

    C / C++ / MFC question c++

  • How to get the CEdit box to update
    F FredrickNorge

    UpdateWindow(); this function worked perfect, thanks.

    C / C++ / MFC performance tutorial announcement
  • Login

  • Don't have an account? Register

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