|
Hi
There is a help-file made by a former collegue called 'MyProgram.CHM'.
He made the help file splitted by two languages, dutch and French.
If the user wants help, he can press F1 or push a button and the next code is called: 'WinExec("hh MyProgram.chm", SW_SHOW);'
and the help file is opened. The cursor is on the dutch part automatically.
Now, if the user is in the french version of the program, the same file should be launched but putting cursor on the french part).
So, i have a result help file but i want the french users not to see the dutch version of the file, but directly the french version of the file.
Anyone any ideas?
greets
Jens
|
|
|
|
|
Hi,
I have a thoroughly odd problem and really no longer know where to look. Any possible pointer would be very much appreciated.
Problem: I have two programs which are basically used to send/receive data blocks on a serial port. Some time ago I got me a USB to serial port converter with which both software sets used to work very, very well because the drivers that come with the converter make it seem as if there is simply an additional serial port. From the point of view of windows programs using window's standard serial port interfacing methods there is no discernible difference between a normal serial port and the converter.
In both programs the data transfer (receive and transmit of a data block) is done by means of window's ReadFile and WriteFile functions. Under all pre-XP versions of Windows both programs work OK. Under XP though there is one that does not while the other one still works perfectly. After much debugging etc... I found that in the one case a received data block is still read correctly by means of the ReadFile function. In the other case The data block that is read is strangely modified. The modfication is such that if say a 9 byte data block is sent I do receive all the bytes, the bytes are correct but the order in which they are received is different from the order in which they were sent. To illustrate (bytes shown as decimal values):
actual block of bytes is: 09, 02, 33, 68, 97, 116, 97, 35, 156.
Bytes read by Readfile : 02, 33, 68, 97, 116, 97, 35, 156, 09
As shown above the first byte of the nine byte block ends up as the last byte. Also, it does not make the slightest bit of difference whether I read the nine byte block in one go or byte by byte. The result stays the same. I meticulously checked that there is no additional byte identical to the first one following the
data block and there certainly is not.
I am really stuck here and therefore any help or suggestion as to what may be doing this would be much appreciated.
All for now,
Filip
|
|
|
|
|
Hi again,
The question above is now irrelevant, The odd sequences stem from the fact that subsequent ReadFile operations yielded chunks of multiple consecutive identical blocks. The problem appears to be timing related, by delaying the data retrieval slightly it is now working OK.
All for now,
Filip
|
|
|
|
|
Hi all
How i can determine whats hardware device set up in computer
currently, keyboard for instance.
Ie. currently in my computer i has certain model of keyboard and i want permit execution of my application if one launch in computer without its model.
Thanks.
|
|
|
|
|
Maybe this site can help you.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardinput.asp?frame=true
|
|
|
|
|
as far as i know, it's not really possible to detect what keyboard model u are using without directly querying the keyboard via hardware I/O.
Don't try it, just do it!
|
|
|
|
|
I am trying to modify the executable of a game to allow it for more players to join a multiplayer game. The number of maximum players was defined in teh code as NETGAME_MAXPLAYERS, however i don't know if it was done using #define or just declared as a global variable or something, but i found that because i found some debug information in the executable while looking at it with a hex-editor. Now i don't know what approach i should take, i thought that the most logical approach would be to use a debugger such as SoftIce to go over the code line by line in assembly language when i know it will check for the maxplayers value. But i don't know much about "reverse engineering" and so i was wondering if anyone knew any good tutorials about this sort of "cra.. err reverse engineering"
Thanks
Kuniva
--------------------------------------------
|
|
|
|
|
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~!
|
|
|
|