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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
E

ELY M

@ELY M
About
Posts
31
Topics
11
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • anyone have console/command line text notepad or editor in cpp and non-mfc
    E ELY M

    I already looked all over for very simple editor that only to be run in ms-dos box. it should use FILe* studio for opening and saving text files. I just need sample or example.

    C / C++ / MFC c++ tutorial

  • How to update/refresh/resize the systray after replace the windows clock with static
    E ELY M

    I been working on this clock replacement program because I never find any open source ones. I been having problem with the code and cant find a way to auto update/refresh my systray to fit my clock replacement. I already looked all over google and news groups. Take a look at those pics before I run the program http://69.50.187.114/~area51/before.gif after I run the program = notice I lost my AIM icon.... it overlapped the AIM icon. http://69.50.187.114/~area51/after.gif my program is MFC based. I decided to include my code for people to take a look at. http://69.50.187.114/~area51/Start\_Button\_Clock\_Changer.zip Click on the "Change Clock" button on the dailog. you will see what I mean.

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

  • how to resize the systray to fit my clock replacment?
    E ELY M

    take a look at those pics before I run the program http://69.50.187.114/~area51/before.gif after I run the program = notice I lost my AIM icon.... it overlapped the AIM icon. http://69.50.187.114/~area51/after.gif my program is MFC based. here is code: void CStart_Button_ChangerDlg::OnClock2() { hTaskbar = FindWindowEx(NULL, NULL, _T("Shell_TrayWnd"), NULL); if (hTaskbar) { hTray = FindWindowEx(hTaskbar, NULL, _T("TrayNotifyWnd"), NULL); hStaticCtrl = ::GetDlgItem(m_hWnd,IDC_CLOCK); ReplaceClock(); SetTimer(55,1000,0); } } void CStart_Button_ChangerDlg::ReplaceClock() { CRect rcTray; CRect rcStaticCtrl, rcNewStaticCtrl; ::GetWindowRect(hTray, &rcTray); ::GetWindowRect(hClockText, &rcStaticCtrl); //::SendMessage(hTray, WM_SIZE, 0, 0); rcNewStaticCtrl.left = rcTray.right - rcTray.left - rcStaticCtrl.Width() - 0; rcNewStaticCtrl.top = 2; rcNewStaticCtrl.bottom = rcStaticCtrl.bottom; rcNewStaticCtrl.right = rcStaticCtrl.right; CWnd *pStaticCtrlWnd = GetDlgItem(IDC_CLOCK); pStaticCtrlWnd->MoveWindow(&rcNewStaticCtrl); pStaticCtrlWnd->ModifyStyle(0, 0, SWP_NOSIZE); //HWND hWndStatic = GetDlgItem(IDC_CLOCK); RECT rect; CBrush hBrush; CDC* hdc; PAINTSTRUCT ps; hdc = BeginPaint(&ps); hdc->SaveDC(); hBrush.CreateSolidBrush(RGB(0,0,0)); hdc->SelectObject(hBrush); GetClientRect(&rect); hdc->Rectangle(&rect); hdc->SetTextColor(RGB(0,255,255)); hdc->SetBkColor(RGB(0,0,0)); //hdc->SetBkMode(TRANSPARENT); //hdc->SetBkMode(OPAQUE); //hdc->RestoreDC(-1); EndPaint(&ps); //::InvalidateRect(hTray, NULL, FALSE); //::InvalidateRect(::GetParent(hTray), NULL, TRUE); SetWindowLong(hTray, GWL_STYLE, WS_CHILD|WS_VISIBLE|SS_BLACKRECT); ::SetParent(hClockText, hTray); }

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

  • my systray clock color changer code do not work and it crashes
    E ELY M

    This is my MFC dialog project. Im working on code to change my systray clock color to some colors. both background and text to different color. take a look at my code. void CStart_Button_ChangerDlg::OnClock() { RECT rc; HWND hWnd = ::FindWindow("Shell_TrayWnd", NULL); if (hWnd) { if (NULL != (hWnd = ::FindWindowEx(hWnd, NULL, "TrayNotifyWnd", NULL))) { if (NULL != (hWnd = ::FindWindowEx(hWnd, NULL, "TrayClockWClass", NULL))) { //::SendMessage(hWnd, WM_SETTEXT, 0, (LPARAM)(LPTSTR) TEXT("TEST") ); HDC hdcClock; COLORREF col; HDC hdc; char s[1024]; if(hdcClock) DeleteDC(hdcClock); hdcClock = NULL; //if(bFillTray) hWnd = ::GetParent(hWnd); ::GetClientRect(hWnd, &rc); hdc = ::GetDC(NULL); hdcClock = CreateCompatibleDC(hdc); if(!hdcClock) { ::ReleaseDC(NULL, hdc); return; } //SelectObject(hdcClock, hFon); SetBkColor(hdcClock, RGB(0,0,255)); SetBkMode(hdcClock, TRANSPARENT); SetTextAlign(hdcClock, TA_CENTER|TA_TOP); SetTextColor(hdcClock, RGB(0,255,255)); //FillClock(hWnd, hdcClock, &rc, 0); HBRUSH hbr; HDC hdcTemp; int nblink; RECT *prc; if(nblink == 0 || (nblink % 2)) col = RGB(255,255,0); else col = RGB(255,0,0); //if(col & 0x80000000) col = GetSysColor(col & 0x00ffffff); //SetBkMode(hdc, OPAQUE); //SetBkColor(hdc, col); hbr = CreateSolidBrush(col); FillRect(hdc, prc, hbr); DeleteObject(hbr); ::ReleaseDC(NULL, hdc); MessageBox("TEST PASSED"); } } }

    C / C++ / MFC c++ linux

  • how to change window's start button text? problem with my program
    E ELY M

    never mind I got it working... I had to change the LPTSTR to LPCTSTR

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

  • how to change window's start button text? problem with my program
    E ELY M

    I got it working now now Im trying to get working with the user defined edit box. I use control CEdit for the edit box. void CStart_Button_ChangerDlg::OnText() { HWND hWnd; RECT rc; if (hWnd = FindWindowEx(NULL, NULL, "Shell_TrayWnd", NULL)) { ::GetWindowRect(hWnd, &rc); if (hWnd = FindWindowEx(hWnd, NULL, "Button", NULL)) { /* CEdit* text = (CEdit*)GetDlgItem(IDC_EDIT1); CString gettext; text->GetWindowText(gettext); */ CString starttext; m_text.GetWindowText(starttext); ::SendMessage(hWnd, WM_SETTEXT, 0, (LPARAM)(LPTSTR) TEXT(starttext)); } } } compile error: Compiling... Start_Button_ChangerDlg.cpp C:\-= My Stuff =-\Start_Button_Changer2\Start_Button_ChangerDlg.cpp(199) : error C2440: 'type cast' : cannot convert from 'class CString' to 'char *' No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called Error executing cl.exe. Start_Button_Changer.exe - 1 error(s), 0 warning(s)

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

  • how to change window's start button text? problem with my program
    E ELY M

    --------------------Configuration: Start_Button_Changer - Win32 Debug-------------------- Compiling... Start_Button_ChangerDlg.cpp C:\-= My Stuff =-\Start_Button_Changer\Start_Button_ChangerDlg.cpp(186) : error C2660: 'SetWindowTextA' : function does not take 2 parameters Error executing cl.exe. Start_Button_Changer.exe - 1 error(s), 0 warning(s)

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

  • how to change window's start button text? problem with my program
    E ELY M

    Im using MFC to make dailog based program. I have one button that will change my start button text to "TEST" after click. my program crash after I clicked on the button here is the code for the button. void CStart_Button_ChangerDlg::OnText() { HWND starthandle; CWnd StartButton; CWnd* Window = CWnd::FindWindow("Shell_TrayWnd",""); starthandle = FindWindowEx(NULL,NULL,"Button",""); StartButton.m_hWnd=starthandle; StartButton.SetWindowText("TEST"); StartButton.SendMessage(WM_SETTEXT,0,0); //SendMessage (StartButton, WM_SETTEXT, 0); }

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

  • Crash after making text box blank.
    E ELY M

    CMyDigClockDlg::CMyDigClockDlg(CWnd* pParent /*=NULL*/) : CDialog(CMyDigClockDlg::IDD, pParent) { //{{AFX_DATA_INIT(CMyDigClockDlg) m_name = _T(""); m_hour9 = _T(""); m_hour8 = _T(""); m_hour7 = _T(""); m_name2 = _T(""); m_name3 = _T(""); m_name4 = _T(""); m_name6 = _T(""); m_name5 = _T(""); m_hour = 0; m_minutes = 0; m_hour2 = 0; m_hour3 = 0; m_hour4 = 0; m_hour5 = 0; m_hour6 = 0; m_minutes2 = 0; m_minutes3 = 0; m_minutes4 = 0; m_minutes5 = 0; m_minutes6 = 0; m_ampm = _T(""); m_ampm2 = _T(""); m_ampm3 = _T(""); m_ampm4 = _T(""); m_ampm6 = _T(""); m_ampm5 = _T(""); m_notepad = _T(""); //}}AFX_DATA_INIT // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); } void CMyDigClockDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CMyDigClockDlg) DDX_Control(pDX, IDC_CLOCK, m_clock); DDX_Text(pDX, IDC_NAME, m_name); DDX_Text(pDX, IDC_NAME2, m_name2); DDX_Text(pDX, IDC_NAME3, m_name3); DDX_Text(pDX, IDC_NAME4, m_name4); DDX_Text(pDX, IDC_NAME6, m_name6); DDX_Text(pDX, IDC_NAME5, m_name5); DDX_Text(pDX, IDC_HOUR, m_hour); DDX_Text(pDX, IDC_HOUR2, m_hour2); DDX_Text(pDX, IDC_HOUR3, m_hour3); DDX_Text(pDX, IDC_HOUR4, m_hour4); DDX_Text(pDX, IDC_HOUR5, m_hour5); DDX_Text(pDX, IDC_HOUR6, m_hour6); DDX_Text(pDX, IDC_MINUTES, m_minutes); DDX_Text(pDX, IDC_MINUTES2, m_minutes2); DDX_Text(pDX, IDC_MINUTES3, m_minutes3); DDX_Text(pDX, IDC_MINUTES4, m_minutes4); DDX_Text(pDX, IDC_MINUTES5, m_minutes5); DDX_Text(pDX, IDC_MINUTES6, m_minutes6); DDX_CBString(pDX, IDC_AMPM, m_ampm); DDV_MaxChars(pDX, m_ampm, 2); DDX_CBString(pDX, IDC_AMPM2, m_ampm2); DDV_MaxChars(pDX, m_ampm2, 2); DDX_CBString(pDX, IDC_AMPM3, m_ampm3); DDV_MaxChars(pDX, m_ampm3, 2); DDX_CBString(pDX, IDC_AMPM4, m_ampm4); DDV_MaxChars(pDX, m_ampm4, 2); DDX_CBString(pDX, IDC_AMPM6, m_ampm6); DDV_MaxChars(pDX, m_ampm6, 2); DDX_CBString(pDX, IDC_AMPM5, m_ampm5); DDV_MaxChars(pDX, m_ampm5, 2); DDX_Text(pDX, IDC_NOTEPAD, m_notepad); //}}AFX_DATA_MAP } I have those variables in OnTimer. This is in my OnTimer function. if ((CurTime.wHour == m_hour) && (CurTime.wMinute == m_minutes) && (CurTime.wSecond == 00) && (setampm == m_ampm)) { CString msg; msg.Format("%s %d:%d %s",m_name, m_hour, m_minutes, m_ampm); addiconballoon(1,m_name,msg,m_name,10); startanimateicon(); } if ((CurTime.wHour

    C / C++ / MFC help

  • Crash after making text box blank.
    E ELY M

    http://69.50.187.114/~area51/crash.jpg I been working on this bug for few days and cant find way. it is time reminder program. I do know some validation things and they are not working :( The int numbers have to be load from the .ini

    C / C++ / MFC help

  • how do you change your systray clock font / blackground colors with MFC program ?
    E ELY M

    Id appericate some answer and sample code. HWND hClock=NULL, hTaskbar, hNotify; hTaskbar = FindWindowEx(NULL, NULL, _T("Shell_TrayWnd"), NULL); if (hTaskbar) { hNotify = FindWindowEx(hTaskbar, NULL, _T("TrayNotifyWnd"), NULL); if (hNotify) hClock = FindWindowEx(hNotify, NULL, _T("TrayClockWClass"), NULL); } if (hClock) { ??????? } I need sample code Thank you :D

    C / C++ / MFC c++ linux question

  • multi lines in .ini file how to save and load/read ?
    E ELY M

    ERRORS: Compiling... MyDigClockDlg.cpp C:\-= My Stuff =-\-= programs =-\-= MY CLOCKS =-\MyDigClockTest\MyDigClockDlg.cpp(853) : error C2065: 'assert' : undeclared identifier C:\-= My Stuff =-\-= programs =-\-= MY CLOCKS =-\MyDigClockTest\MyDigClockDlg.cpp(856) : error C2039: 'Get' : is not a member of 'CString' c:\-= my software =-\microsoft visual studio\vc98\mfc\include\afx.h(368) : see declaration of 'CString' C:\-= My Stuff =-\-= programs =-\-= MY CLOCKS =-\MyDigClockTest\MyDigClockDlg.cpp(863) : error C2065: 'notes' : undeclared identifier Error executing cl.exe. MyDigClock.exe - 3 error(s), 0 warning(s)

    C / C++ / MFC csharp tutorial question

  • multi lines in .ini file how to save and load/read ?
    E ELY M

    Im not sure how to do WritePrivateProfileStruct so here the code section. not sure if i should add loop or not. think the program will ended up in a loop void CMyDigClockDlg::OnSavenote() { char sIniFile[MAX_PATH]; GetModuleFileName( NULL, sIniFile, MAX_PATH ); strcpy( strrchr( sIniFile, '\\' ) + 1, "reminderclock.ini" ); char notepad[MAX_PATH]; int loop; CString temp_key; assert(m_notepad); ///WritePrivateProfileString ("NOTEPAD", "note", m_notepad, sIniFile); for (loop = 0; loop < m_notepad.Get; ++loop) { temp_key.Format ("note%2.2d", loop); WritePrivateProfileStruct ("NOTEPAD", temp_key, (void *)&m_notepad, sizeof(notes), sIniFile); } }

    C / C++ / MFC csharp tutorial question

  • multi lines in .ini file how to save and load/read ?
    E ELY M

    I am working on this little clock program and I added notepad to it. I wanted it to save notepad text to its one ini file [BOX1] Title=test1 remeber me Hour=10 Minutes=1 AM_PM=PM [BOX2] Title=test2 Hour=3 Minutes=4 AM_PM=PM [BOX3] Title=test3 Hour=5 Minutes=6 AM_PM=PM [BOX4] Title=test4 Hour=0 Minutes=0 AM_PM=AM [BOX5] Title=test5 Hour=0 Minutes=0 AM_PM=AM [BOX6] Title=test6 Hour=0 Minutes=0 AM_PM=AM [NOTEPAD] note=dfsdfasdjf fksjflasd;f df;alsdf;ladsf MY COOL NOTE PAD !!!!!! when you open it again after you close it you only see dfsdfasdjf I know I need to add note1= note2= note3= note4= here is my screenshot http://dasher.psychz.net/~area51/notepadclock.jpg

    C / C++ / MFC csharp tutorial question

  • how to auto load from ini esp the numbers from the ini file
    E ELY M

    well Im working on clock program... BOOL CMyDigClockDlg::OnInitDialog() { CDialog::OnInitDialog(); // Add "About..." menu item to system menu. // IDM_ABOUTBOX must be in the system command range. ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); ASSERT(IDM_ABOUTBOX < 0xF000); CMenu* pSysMenu = GetSystemMenu(FALSE); if (pSysMenu != NULL) { CString strAboutMenu; strAboutMenu.LoadString(IDS_ABOUTBOX); if (!strAboutMenu.IsEmpty()) { pSysMenu->AppendMenu(MF_SEPARATOR); pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); } } // Set the icon for this dialog. The framework does this automatically // when the application's main window is not a dialog SetIcon(m_hIcon, TRUE); // Set big icon SetIcon(m_hIcon, FALSE); // Set small icon // TODO: Add extra initialization here SYSTEMTIME CurTime; CString Time, tmp; GetLocalTime(&CurTime); bool cPM = false; if(CurTime.wHour >12) { CurTime.wHour -= 12; cPM = true; } Time.Format("%u:", CurTime.wHour); if(CurTime.wMinute <= 9) { tmp.Format("0%u:", CurTime.wMinute); Time.Insert(Time.GetLength(),tmp.GetBuffer(tmp.GetLength())); } else { tmp.Format("%u:",CurTime.wMinute); Time.Insert(Time.GetLength(),tmp.GetBuffer(tmp.GetLength())); } if(CurTime.wSecond <= 9) { tmp.Empty(); tmp.Format("0%u", CurTime.wSecond); Time.Insert(Time.GetLength(),tmp.GetBuffer(tmp.GetLength())); } else { tmp.Empty(); tmp.Format("%u",CurTime.wSecond); Time.Insert(Time.GetLength(),tmp.GetBuffer(tmp.GetLength())); } if(cPM == true) { Time.Insert(Time.GetLength()," PM"); } else { Time.Insert(Time.GetLength()," AM"); } m_clock.SetWindowText(Time); SetTimer(55,1000,NULL); char sIniFile[MAX_PATH]; GetModuleFileName( NULL, sIniFile, MAX_PATH ); strcpy( strrchr( sIniFile, '\\' ) + 1, "reminderclock.ini" ); char getname[MAX_PATH]; char gethour[MAX_PATH]; char getminutes[MAX_PATH]; char getname2[MAX_PATH]; char gethour2[MAX_PATH]; char getminutes2[MAX_PATH]; char getname3[MAX_PATH]; char gethour3[MAX_PATH]; char getminutes3[MAX_PATH]; char getname4[MAX_PATH]; char gethour4[MAX_PATH]; char getminutes4[MAX_PATH]; char getname5[MAX_PATH]; char gethour5[MAX_PATH]; char getminutes5[MAX_PATH]; char getname6[MAX_PATH]; char gethour6[MAX_PATH]; char getm

    C / C++ / MFC tutorial

  • How to replace the system clock?
    E ELY M

    http://www.bmx3r.com/tclock/ its great example

    C / C++ / MFC mcp tutorial question

  • status bar in mIRC.. how you do this ?
    E ELY M

    yea similar to taskbar...... I still do not find anything about it :( go ahead and write project.

    C / C++ / MFC question csharp c++

  • status bar in mIRC.. how you do this ?
    E ELY M

    im trying to make irc client. i guess there none of articles or info on this thing.

    C / C++ / MFC question csharp c++

  • status bar in mIRC.. how you do this ?
    E ELY M

    ok thank you.. I am not even sure what name for it. do you have source code or class for it ?

    C / C++ / MFC question csharp c++

  • status bar in mIRC.. how you do this ?
    E ELY M

    how did you get MDI windows to go out of status bar like in mIRC ? http://flat.hypermart.net/mIRCstatusbar.gif what is name of this class ?? extended status bar ? is there a class or source code somewhere on this site or on any MFC sites.

    C / C++ / MFC question csharp c++
  • Login

  • Don't have an account? Register

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