|
lol, ok.. some words on reverse engineering:
1. it's illegal to disassemble copyright software!
2. there aren't any 'real' tutorials about that! (if u want to learn it, read cracking tuts)
Don't try it, just do it!
|
|
|
|
|
eh ok thats kinda what i was already doing, lol. I was just hoping that maybe there would be tutorials that were written more from a programmers point of view. heh. i guess not
Kuniva
--------------------------------------------
|
|
|
|
|
BTW, from fravia's site:
Reverse engineering a program you have legitimately bought and studying or modifying its code is perfectly LEGAL, at least in the European Union, as long as
* You do it only for your personal use or for "educational purposes" (i.e. study)
* You do not use big chunks of the code for applications you SELL
Thanks god i live in Europe
Kuniva
--------------------------------------------
|
|
|
|
|
I am doing some DLL functions for embedded device running on WinCE and PC application. Just want to know if there is any data difference between them so that it is easier for me to maintain the codes later on.
For example in WinCE use wchar_t, so got to use a generic TCHAR so that WINCE and PC can do the respective conversion.
|
|
|
|
|
WindowLess Activex -
It does not refresh view when draw beoynd CDialog rectangule
provided for control,
how to correct this?
thanks.
|
|
|
|
|
Hi!
I've got a ListView control with more than 2,000 items in it. In order to make its initialization faster, I want to fill the columns only when they are displayed, like Windows Explorer does.
For example, the first column displays some filenames, and I want to fill the second column, containing the last modified date, only for the files which are displayed.
Does anyone know a way to do that?
Thks in advance!
Appstmd
http://www.appstmd.com
|
|
|
|
|
Owner data would seem to be the best option.
Steve S
|
|
|
|
|
Use SetRedraw();
MyListView.SetRedraw(FALSE);
...
...
Fill listview
...
...
MyListView.SetRedraw(TRUE);
MyListView.Invalidate();
Here is some documentation from MSDN Library
CWnd::SetRedraw
void SetRedraw( BOOL bRedraw = TRUE );
Parameters
bRedraw
Specifies the state of the redraw flag. If this parameter is TRUE, the redraw flag is set; if FALSE, the flag is cleared.
Remarks
An application calls SetRedraw to allow changes to be redrawn or to prevent changes from being redrawn.
This member function sets or clears the redraw flag. While the redraw flag is cleared, the contents will not be updated after each change and will not be repainted until the redraw flag is set. For example, an application that needs to add several items to a list box can clear the redraw flag, add the items, and then set the redraw flag. Finally, the application can call the Invalidate or InvalidateRect member function to cause the list box to be repainted.
|
|
|
|
|
Is It possible to get the Buffer Size in the following codes??
void GetString(char *wzString);
void main(void)
{
char wzString[50];
GetString(wzString);
//Size of wzBuffer = 50;
}
void GetString(char *wzString)
{
//Is There a way to verify that this wzString has buffer size big enough to store the stirng to be copied here??
strcpy(wzString,"123");
}
if not got to change to void GetString(char *szString, int buffersize);
|
|
|
|
|
IceBerG71 wrote:
Is It possible to get the Buffer Size in the following codes??
The short answer is NO. After all, you're just passing a pointer to a single location. Its just
you convention that you will be using that as a start position of a block of memory.
You can do tests to see whether you will be *allowed* to write into a chunk of memory (IsBadStringPtr )
but that won't tell you if you'd mess things up in other variables etc.
So your second version where you pass the buffer size is better.
Even better would be to use a string class (CString / std::string).
e.g.
CString GetStringFromSomewhere (int nAParameterOfSomeKind, DWORD dwANOtherParam)
{
CString sReturn;
sReturn = "Get this!";
sReturn += " Wheeeee!";
return sReturn;
Iain.
|
|
|
|
|
IceBerG71 wrote:
//Is There a way to verify that this wzString has buffer size big enough to store the stirng to be copied here??
Nope
IceBerG71 wrote:
void GetString(char *szString, int buffersize);
Yup
That's what the MS Secure Code initiative is about. Unchecked buffer length exploits are a common hole in software.
Steve S
|
|
|
|
|
Thanx for the help, i was wondering if there is any way to overcome this problem. Just pass in the size of the buffer as well.
|
|
|
|
|
Hi !
Well, I couldn't formulate the topic specifically, so you'll have to read the post instead..
My problem is that when I build my MFC application, then at least in Windows XP, my files become named like 'filename.exe (line break) MFC Application'.
How on Earth can I remove that 'MFC Application' from my file descriptions, or at least modify it to something else ? Like 'filename.exe (line break) ODBC Query tool' or something similar ?
Thanks in advance,
Antti Keskinen
|
|
|
|
|
Sounds like you need to examine the VERSION resource. IIRC, that's where explorer gets the additional information for EXE files to display as an info tip.
The filename.exe is just the name of the file (but you guessed that already!) and then line breaks are put in. I think you might want to change the value for 'File Description' and/or 'Product Name'.
Steve S
|
|
|
|
|
Thank you, Steve !
I found the appropriate version info, but after I altered it and recompiled, my Explorer didn't update itself, but kept on showing the 'MFC Application' tag. Rebooting computer helped to solve the issue
-Antti
|
|
|
|
|
Next time, you might try clicking on the desktop, but not an icon, and hitting F5 to get explorer to perform a refresh. (In an explorer window, there's a menu option to do the same). I think this "persuades" explorer to refresh it's cache of things like the version info.
Steve S
|
|
|
|
|
Well, it didn't work for me. The app description wasn't changed until I booted my machine. After that it started working properly again.. Weird stuff
-Antti
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
a class "CMyTreeCtrl" derived from CTreeCtrl, I want to get a pointer to CMainFrame in this derived class! some people told me that I could use :
<br />
((CMainFrame *)AfxGetMainWnd())->m_wndTreeCtrl.GetSelectedItem();<br />
but there is an error!
: error C2065: 'CMainFrame' : undeclared identifier
please tell me how to solve this problem! thanks~!
|
|
|
|
|
Make sure you have included CMainFrame's header file (Usually MainFrm.h)
|
|
|
|
|
if I include CMainFrame's Header, 5 errors occur.
:\program files\microsoft visual studio\myprojects\adbook\mainfrm.h(65) : error C2146: syntax error : missing ';' before identifier 'm_wndTreeCtrl'
e:\program files\microsoft visual studio\myprojects\adbook\mainfrm.h(65) : error C2501: 'CXTTreeCtrl1' : missing storage-class or type specifiers
e:\program files\microsoft visual studio\myprojects\adbook\mainfrm.h(65) : error C2501: 'm_wndTreeCtrl' : missing storage-class or type specifiers
E:\Program Files\Microsoft Visual Studio\MyProjects\adbook\XTTreeCtrl1.cpp(50) : error C2039: 'm_wndTreeCtrl' : is not a member of 'CMainFrame'
e:\program files\microsoft visual studio\myprojects\adbook\mainfrm.h(20) : see declaration of 'CMainFrame'
E:\Program Files\Microsoft Visual Studio\MyProjects\adbook\XTTreeCtrl1.cpp(50) : error C2228: left of '.GetSelectedItem' must have class/struct/union type
|
|
|
|
|
You need some other includes that MainFrm.h also need. You can find them in MainFrm.cpp. They are possibly included right before MainFrm.h
|
|
|
|
|
It sounds like you end up with circular references, and a mess just waiting.
To come at this from another tack. Do you actually need a pointer to your
CMainFrame oject, or just to your main window? Its unlikely the a sub-control
needs specific access to a member function in the MainFrame.
If you use
CWnd *pMainWnd = AfxGetMainWnd ();
ASSERT(pMainWnd);
if (pMainWnd)
pMainWnd->SendMessage (WM_NOTIFY, ....);
or
pMainWnd->SendMessage (WM_A_MESSAGE_OF_SOMEKIND, ...);
and install an appropriate notification handler in your CMainFrame then you
lose the current problem. It would also mean you could use your C TreeCtrl
in other projects more easily.
I hope this helped,
Iain.
|
|
|
|
|
clack234 wrote:
I want to get a pointer to CMainFrame in this derived class! some people told me that I could use :
((CMainFrame *)AfxGetMainWnd())->m_wndTreeCtrl.GetSelectedItem();
that won't get you a pointer to CMainFrame! instead AfxGetMainWnd() will get you the pointer to a CWnd object that can be type-casted to CMainFrame!
hope this helps...
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
hello friends,
i just wanted to know How can i show The treectrl of a BrowseDlgBox with checkBox.
I mean i wanted to show the CheckBox in the treectrl that is shown in an Browse Dlgbox.
I am using the DlgBox for Folder selection every subfolder i.e when ever we see a + sign there should also be a check box and if this check box is selected then the internal folders will be automatically selectde...
If anyone can help !!!!!
I am working in MFC
Thanx
TAKE CARE
|
|
|
|
|
Hi try this solution
Open Tree Control Properties->More Styles->And check boxes. Make sure this property is set, and u will get check boxes on u r tree control.
To Mark check/uncheck child CheckBox , on can write handler for OnClickTree...
All the Best
--KK
|
|
|
|