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
K

kamalesh82

@kamalesh82
About
Posts
24
Topics
14
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Difference between MS C++ and "normal" C++?
    K kamalesh82

    You can certainly use any cin/cout in ms c++, .. u have to include iostream.

    kamalesh

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

  • how to show browse button?
    K kamalesh82

    I hope this little sample code will help you if you want to select the folder, void CFolderSelectionDlg::OnBrowseClick() { BROWSEINFO brwsInfo; ZeroMemory(&brwsInfo,sizeof(BROWSEINFO)); int iImage = 0; char szFolderPath[MAX_PATH]; char szTitle[255]; memset(szFolderPath,'\0',sizeof(szFolderPath)); memset(szTitle,'\0',sizeof(szTitle)); brwsInfo.hwndOwner = GetSafeHwnd(); brwsInfo.iImage = iImage; brwsInfo.lpfn = NULL; brwsInfo.pidlRoot = NULL; brwsInfo.pszDisplayName = szFolderPath; brwsInfo.lpszTitle = szTitle; //InitCommonControls(); ITEMIDLIST *ptrItemList = SHBrowseForFolder(&brwsInfo); if(ptrItemList != NULL) m_strFolderPath = szFolderPath; UpdateData(FALSE); } this is the simplest. if you want all advanced functionality, you should inherit yoour custom fileDialog class. please go thourh the MSDN.you have to write your version of virtual void OnFolderChange(); virtual BOOL OnFileNameOK(); best of luck...

    kamalesh

    C / C++ / MFC question tutorial

  • Directory path validation problem
    K kamalesh82

    DWORD dwFileAttrib = 0; dwFileAttrib = GetFileAttributes(pathof Directory); if(dwFileAttrib == -1 || (dwFileAttrib & FILE_ATTRIBUTE_DIRECTORY) == 0) { AfxMessageBox("Directory path not exist"); }

    kamalesh

    C / C++ / MFC help career

  • Modal Dialog [modified]
    K kamalesh82

    sorry for the typing mistake,... i neead modal, but it's creating modeless... .

    kamalesh

    C# graphics design help

  • Modal Dialog [modified]
    K kamalesh82

    hi all, am getting a stange problem. from a call back function, am calling a MODELESS dialog,(when timeout reached for my dialog), but it's creating as a modal dialog... it's not my requirement. i've develop a sample,i think, it's created on a different thread than main thread. (may be.. not sure.).... please provide any commentsa nad solution.. please... :):confused: my code:(design form not included) using System; using System.Collections.Generic; using System.Diagnostics; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Runtime.InteropServices; using System.Threading; namespace TimeoutWindow { public partial class TimeoutForm : Form { private System.Threading.Timer m_Timer = null; private const int WH_KEYBOARD = 2; private const int WH_MOUSE = 7; private LowLevelKeyboardProc _procKey = KeyHookCallback; private LowLevelKeyboardProc _prockMouse = MouseHookCallBack; private static IntPtr _hookIDKey = IntPtr.Zero; private static IntPtr _hookIDMouse = IntPtr.Zero; private static UInt32 m_LastHitTime = 0; private System.Threading.TimerCallback timerCallBack = null; private AutoResetEvent autoEvent = null; private Form2 dlg; private delegate IntPtr LowLevelKeyboardProc(int nCode, IntPtr wParam, IntPtr lParam); public TimeoutForm() { InitializeComponent(); _hookIDKey = SetWindowsHookEx(WH_KEYBOARD,_procKey,(IntPtr)0,(uint)AppDomain.GetCurrentThreadId()); _hookIDMouse = SetWindowsHookEx(WH_MOUSE,_procKey,(IntPtr)0,(uint)AppDomain.GetCurrentThreadId()); timerCallBack = new System.Threading.TimerCallback(this.CheckTimeout); autoEvent = new AutoResetEvent(false); m_LastHitTime = GetTickCount(); m_Timer = new System.Threading.Timer(timerCallBack, autoEvent, 20000, 20000); } private void OnTryLogin(object sender, EventArgs e) { MessageBox.Show("HI"); Form2 dlg = new Form2(); dlg.ShowDialog(); } public void CheckTimeout(Object stateInfo) { autoEvent = (AutoResetEvent)stateInfo; UInt32 curTime = GetTickCount(); if (curTime - m_LastHitTime > 2000) { this.m_Timer.Dispose(); try {

    C# graphics design help

  • Using Low Level keyboard hook problem [modified]
    K kamalesh82

    Hi all, Currently am working in a project, where in my application there is a window form, holding several pages(using WPF).now i've to implement session timeout functionality in my application using window hook for keyboard and mouse. i've a implemented a timer(System.Threading)TimerCallback, which periodically examine, whether, any key board message or mouse message occure ONLY ON MY APPLICATION. this means, minimizing my application form, i can play computer game, but after certain period my application can throw timeout session. now the problem is, delegate(by which i'm calling window hook function whenever key or mouse pressed) is firing event even if my function is minimized. (i know this will fire), but the only requirement is how i manipulate these messages (key and mouse messages)only haapen to my application window. i don't know how to do this.. please help please go through these urls, as i'm trying to develop window hook, by help of these..... here he has used WH_KEYBOARD_LL Hook which is global 1. "http://blogs.msdn.com/toub/archive/2006/05/03/589423.aspx" 2. "http://blogs.msdn.com/toub/archive/2006/05/03/589468.aspx" Please please help...... :^) -- modified at 18:14 Saturday 8th September, 2007

    kamalesh

    C# help csharp wpf com game-dev

  • Track other processes in the computer
    K kamalesh82

    Thanks for this nice and beutiful code. Thanks to all....All are helpfuls. Thanks again.

    kamalesh

    C / C++ / MFC c++ question

  • Track other processes in the computer
    K kamalesh82

    Hi All, Currently I'm developing a tool, for that purpose i have to know all other processes running on the computer and achieve the handle of specified process.There are some functions in VB and but i need to write in MFC only... How can get it? bye kamalesh

    kamalesh

    C / C++ / MFC c++ question

  • File Update
    K kamalesh82

    Am trying to oepn a text file( not empty file). Want to delete a specified portion of the file ( around 10 chars from the middle of the file). how can i do it? i've already calculated start position and end position. but don't know how to delete that part and again write that part. Thanks in advance

    kamalesh

    C / C++ / MFC question tutorial announcement

  • How to move a whole folder
    K kamalesh82

    In my application i've to move a specified folder to another location. suppose currently i've folder "VisualBasic"in "C:\programs\kamalesh\temp\VisualBasic" .Now I want to move this folder to new location like this "C:\programs\kamalesh". this movement should be done by coding... as by coding i'm trying to make a folder in temporary location and after fulfilling my intention i've to move that in exact location... now the question is how can i do this by mfc coding.... thanks in advance.

    kamalesh

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

  • write a generic function simillar to the "fgets" [modified]
    K kamalesh82

    Am using 2004 MSDN. there is no such kind of function(CStdioFile::GetString()).

    kamalesh

    C / C++ / MFC c++ tutorial

  • write a generic function simillar to the "fgets" [modified]
    K kamalesh82

    sorry i was at hurry.... I want to read a line from a file which consist number of lines.In mfc library there is no function for "fgets"( am opening this file "CFile::Open(.....) function,with sharedeny access flagcheck).If any one can give me the hint to how to write this generic functiopnality using mfc, i'll be gratefull.

    kamalesh

    C / C++ / MFC c++ tutorial

  • write a generic function simillar to the "fgets" [modified]
    K kamalesh82

    I want to read a line from a file which consist number of lines.In mfc library there is no function for "fgets"( am opening this file "CFile::Open(.....) function,with sharedeny access flagcheck).If any one can give me the hint to how to write this generic functiopnality using mfc, i'll be gratefull.

    kamalesh

    C / C++ / MFC c++ tutorial

  • Deleting a text file after repalcing all char in a random number
    K kamalesh82

    i just want "secure deletion"... if i just delete , the data used in the file is very much recoverable, untill the same space of the hard disc is overwritten( as the space is holding the data)... that's y i need to change every char in the file by a random generated numbers

    kamalesh

    C / C++ / MFC c++ json lounge

  • Deleting a text file after repalcing all char in a random number
    K kamalesh82

    Hi all, I need to open a file using Win 32(MFC API).. read each line from it, and after reading all the line i've to replace each char in the file with a random number.. after that i've to delete that file.... It's very urgent..i'll be very grateful if anyone provide the solution.... bye

    kamalesh

    C / C++ / MFC c++ json lounge

  • Find option ia SDI frame
    K kamalesh82

    I've to create the "find string option in a particular file" with key board enable "Ctrl+F".how can i do that?

    kamalesh

    C / C++ / MFC question

  • Conflict between debug & release
    K kamalesh82

    I'm in trying to run a application(vc++)....the exe generated is absolutely running fine in DEBUG version...but when ever i try to rrun in Release version, it's not working properly...this is really a strange problem.... Cud anybody tell me the remedy of this problem? kamalesh

    C / C++ / MFC announcement c++ debugging help question

  • can't add elements in the column
    K kamalesh82

    &TP->TR.Account[1] returns the string literal.so be sure that it's not making any problem. nd i used SetItemText as well as the SetItem both function. Good Day kamalesh

    C / C++ / MFC help

  • can't add elements in the column
    K kamalesh82

    Hi i've strange problem.i've 4 columns Account,date,amount,address in a Clist Control. //a breif abt my project in my project am trying to slect a file by browsing (i used cfiledialog). & then pressing the button 'showbutton' i want to see all the documents(i.e.account,date,amount,address) of that file.this file is actually a list of several transaction......... now in this project i didn't use classwizard, all the message mapping,dialog creation i've done mannually............... //the problem now, the problem is, while am trynig to insert items in the r8 column, only the 1st column is being populated , not the others....in the insertion column CString strItem; LVITEM lvi; lvi.mask = LVIF_TEXT; //Account no... strItem.Format(_T(&TP->TR.Account[1])); lvi.iSubItem = 0; lvi.pszText = (LPTSTR)(LPCTSTR)(strItem); m_cListCtrl.InsertItem( &lvi); //Expirary Date strItem.Format(_T(&TP->TR.ExpDate[1])); lvi.iSubItem = 1; lvi.pszText = (LPTSTR)(LPCTSTR)( strItem); m_cListCtrl.InsertItem( &lvi); nd this way only putting "lvi.iSubItem=2,3...4" Don't get confused with TP,TR...these r my project variables for other issues. using that above code.. am getting only 1st column.... waiting for quick reply.....A GOOD DAY to all. kamalesh

    C / C++ / MFC help

  • c control list
    K kamalesh82

    I need to use a ccontrol list to show data, after pressing button 'showdata'.....in a old project(DIALOG BASED).....the problem is that..... in this project i can't use class wizard. kamalesh

    C / C++ / MFC help
  • Login

  • Don't have an account? Register

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