Click here to Skip to main content
16,005,181 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how to completely remove a menu item during run-time Pin
elephantstar27-May-05 7:15
elephantstar27-May-05 7:15 
GeneralHooking problem - need urgent help Pin
YaronNir25-May-05 8:47
YaronNir25-May-05 8:47 
Questionhow to change window's start button text? problem with my program Pin
ELY M.25-May-05 7:40
ELY M.25-May-05 7:40 
AnswerRe: how to change window's start button text? problem with my program Pin
Ravi Bhavnani25-May-05 8:47
professionalRavi Bhavnani25-May-05 8:47 
AnswerRe: how to change window's start button text? problem with my program Pin
David Crow25-May-05 8:59
David Crow25-May-05 8:59 
GeneralRe: how to change window's start button text? problem with my program Pin
ELY M.25-May-05 9:07
ELY M.25-May-05 9:07 
GeneralRe: how to change window's start button text? problem with my program Pin
David Crow25-May-05 9:11
David Crow25-May-05 9:11 
GeneralRe: how to change window's start button text? problem with my program Pin
ELY M.27-May-05 15:14
ELY M.27-May-05 15:14 
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)


GeneralRe: how to change window's start button text? problem with my program Pin
ELY M.27-May-05 15:27
ELY M.27-May-05 15:27 
QuestionFind out if user logged in? Pin
jaycush25-May-05 7:09
jaycush25-May-05 7:09 
AnswerRe: Find out if user logged in? Pin
David Crow25-May-05 10:43
David Crow25-May-05 10:43 
AnswerRe: Find out if user logged in? Pin
CodeBeetle26-May-05 7:01
CodeBeetle26-May-05 7:01 
GeneralExit an application Pin
Gagnon Claude25-May-05 5:51
Gagnon Claude25-May-05 5:51 
GeneralRe: Exit an application Pin
BlackDice25-May-05 6:22
BlackDice25-May-05 6:22 
GeneralRe: Exit an application Pin
Ivan Cachicatari25-May-05 8:21
Ivan Cachicatari25-May-05 8:21 
GeneralRe: Exit an application Pin
David Crow25-May-05 9:15
David Crow25-May-05 9:15 
GeneralRe: Exit an application Pin
ThatsAlok25-May-05 20:56
ThatsAlok25-May-05 20:56 
GeneralSql - Connection Problem Pin
M.Mehrdad.M25-May-05 5:20
M.Mehrdad.M25-May-05 5:20 
GeneralRe: Sql - Connection Problem Pin
BlackDice25-May-05 6:25
BlackDice25-May-05 6:25 
Generalunsigned int to unsigned int64 Pin
nellutla25-May-05 5:09
nellutla25-May-05 5:09 
GeneralRe: unsigned int to unsigned int64 Pin
toxcct25-May-05 5:28
toxcct25-May-05 5:28 
GeneralATL SINGLETON: acessing instance directly in server Pin
peterchen25-May-05 4:48
peterchen25-May-05 4:48 
GeneralAccessing OnDraw() of view in splitter windows :^) Pin
nripun25-May-05 2:06
nripun25-May-05 2:06 
GeneralRe: Accessing OnDraw() of view in splitter windows :^) Pin
Jaime Olivares25-May-05 11:10
Jaime Olivares25-May-05 11:10 
General.hh format Pin
prat7825-May-05 0:55
prat7825-May-05 0:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.