|
This is something you can find without any problem in the MSDN.
~RaGE();
|
|
|
|
|
Yeh i had refered one good book but
its not with me right now , any way
will find it from net.
Vikas Amin
Embin Technology
Bombay
|
|
|
|
|
|
How to get a pointer of a specific child frame window in a MDI application if I have open more child frame windows?
sude
|
|
|
|
|
There are multiple way to achieve this. Enumerate all windows and check with CWnd::IsChild , use CWnd::GetWindow with parameter GW_CHILD, use CWnd::FindWindow , this will all depend on the criteria that makes the child window you search different from the others (the name, the ID, ...)
~RaGE();
|
|
|
|
|
First of all, thank you for reading this message.
As a novince, what I have seen so far is to put a button into a dialog, and it will stay at that position staticly. Now if I resize the window, the button is still there..
Could you please tell me or explain to me what method i need to approach to move the button (in the same way that DOCK in C# works)
Thank you.
Elapid For The Win
|
|
|
|
|
MoveWindow or SetWindowPos apis will do that.
-Prakash
|
|
|
|
|
In addition with Mr.Prakash, I would suggest you to use this[^] class.
It will be useful to you, if you decide to move other controls as well.
"Success is the ability to go from one failure to another with no loss of enthusiasm." - W.Churchill
|
|
|
|
|
Hi,
I am using SECDialogBar class inside mainframe.cpp , during my application exit and startup my dialogbar settings are getting written into .ini file. the standard framework is providing this by default, Is there a way to prevent it from reading and writing into ini file ? I want this behaviour for all dialogbars in the application except one, for this one dialogbar I want to control writing into ini file.
If you have any idea please let me know asap.
Krishna
|
|
|
|
|
Hi ,
I am using WinHelp2000 for dislaying Help on my application in VC++.
The help is displayed based on the language my application is being executed.
Lets say I can run my application in English and Italian.
The appropriate help file is loaded when i start the application, based on the language selected.
Now the problem is if I do not have help on a specific topic in Italian,then I should be able to display help on that topic in English.
If anyone knows a solution to this ,kindly help me.
Thanks,
Gayathri.
|
|
|
|
|
I am pretty sure if you call WinHelp, that you can detect if the requested topic was located. If not located, then open the OTHER help file and try to get the topic again. Default implementations of WinHelp calls typically do very little, if any, checking on the return status values of the function calls.
Marriage slows down your coding, a baby slows it down even more!
|
|
|
|
|
Hi ,
The problem itself is that though I am able to call Winhelp,I am not able to detect if the requested topic has been located or not.
WinHelp returns a value of TRUE even if it doesnt detect a topic and this is where I am stuck up.
If I can resolve this ,my problem is solved.
The Code snippet I am using is
::WinHelp(HWnd, HelpFilePath, HELP_CONTEXT, HelpTopic );
Thanks,
Gayathri
|
|
|
|
|
Typical MS BS
I did some experimentation, and indeed I observed the 'success' return value for an invalid topic - but no help window appeared whatsoever. I thought to check GetLastError and got a '5' back. However, when I called WinHelp asking for the contents, I got a success back (no surprise there) but GetLastError also again returned a '5'.
My summary is that this poorly documented or incorrectly written function (WinHelp) makes it impossible to disinguish between successful outcomes and failures.
Marriage slows down your coding, a baby slows it down even more!
|
|
|
|
|
Hi,
There have been many articles on codeproject and elsewhere on how to use a pdb file to generate a call stack, and other information in the case of a fatal exception. This works great but it requires the distribution of the pdb file with the .exe for the symbol lookup to work. This is a problem if you are worried about the possible reverse engineering of your application.
Interested to hear from anyone who may have considered this and possible solutions - e.g. encrypt .pdb file, etc
Thanks
Dig
|
|
|
|
|
|
Well, if the customer turns on the user dump, then you can get the dump file from them and analyze it post-mortem and usually tell exactly what the problem was anyway. No need to distribute the PDB at all. You do need to compile your release builds to contain the debugging information, hwoever, to make it useful.
Marriage slows down your coding, a baby slows it down even more!
|
|
|
|
|
Look up the "/PDBSTRIPPED" linker option. I think this is only available with VC>6. I think there is a utility that generates a "stripped" .PDB from a normal one (if you use VC6), but I can't remember the name.
Steve
-- modified at 1:27 Friday 13th January, 2006
|
|
|
|
|
Here's the story:
My program checks a LARGE numrer of Unicode RTF strings to find out whenever they contain one of predefined strings (given as plain text).
I need a way to search RTF string for plain text string (ignoring the formating tags). It would be pretty easy if it wasn't for the unicode part and lots of strange symbols (let me just say there's polish, english, russian and hebrew).
The only methods I could think of were serching rtf string and ignoring formating or converting to plain text an using simple cstringw::find
I've already atempted the second method and failed miserably (CRichEditCtrl + callback function + sf_rtf, sf_text, sf_unicode, as well as coping it to clipboard and atempting to capture it back).
Any WORKING method is welcome :>
Maciej Lisiewski
39s' hour of non-stop coding. I'm starting to see things and like visual studio.
|
|
|
|
|
Is there any reason you couldn't just go through character by character with your own search function?
For instance, something like:
int x = 0, j = 0;
bool MatchString()
{
while (string_you_are_searching[x])
{
if (string_you_are_searching[x] == predefined_string[j])
j++;
else
j = 0;
if (j == strlen(predefined_string))
return true;
x++;
}
}
Or something like that?
Kelly Ryan
|
|
|
|
|
Sadly, yes there is.
If I was just searching for a string inside another I'd do
if ((theString.Find(anotherString)!=-1);
But the string I'm searching in is not plain text, it's RTF. I can't just check whenever it has some other string inside because it might be ie. split in two by a formating tag, or if it contains non-english characters, it would have the waco RTF encoding in the middle of it.. :/
Anyone? I can hear a deadline zooming and it's not a good sound..
Maciej Lisiewski
Last 72 hours: Eating: 2,5h; Sleeping: 5,5h; Coding 62h; other: 2h.
Read-eyed: yup, Pale: you betcha, Barely awake: barely alive
-- modified at 4:15 Tuesday 10th January, 2006
|
|
|
|
|
Being RTF doesn't prevent a character by character search though, my point was that by writing your own char by char search you can ignore the things you want to ignore.
For instance anytime you see a \, ignore the following letters until you see a space or a return. Anytime you see a change to another language, ignore all following characters until you see a change back to English, or whatever language you're looking for.
Of course this is assuming the strings you're searching for don't contain \ in them. But if they don't, you should be able to do something along those lines. And even if they do, worst case scenario you could write up a list of all the formatting tags to ignore (horrible but it would work), and every time you see a \, begin to compare to that list, if you get a match, ignore that word, if not, tack it onto the current string you're looking through for comparison.
Kelly Ryan
|
|
|
|
|
KellyR wrote: For instance anytime you see a \, ignore the following letters until you see a space or a return. Anytime you see a change to another language, ignore all following characters until you see a change back to English, or whatever language you're looking for.
So basically write my own code to convert rtf2txt.. a lot of work, which I'd like to avoid.
KellyR wrote: Of course this is assuming the strings you're searching for don't contain \ in them.
RTF uses it's own control codes.
Maciej Lisiewski
|
|
|
|
|
Hi guys,
I'm trying to figure out how to replace a system DLL ( ws2_32.dll ) with a DLL of my own, but am not sure how to go about creating a wrapper.
I have two goals, one is add some code of my own into the DLL_PROCESS_ATTACH part of DLLMain so that the DLL will execute it when loaded.
The second is to pass calls to Send to my own custom Send function first, then go on to the original Send call so that everything works normally.
All other DLL functions should work normally.
I guess I need to see an example of how a wrapper is created. Can anyone redirect me to the appropriate article?
I know how to write a DLL, I've just never written a "hook" before and tried to intercept a Win32 API call. Any help will be appreciated, thanks!
- Mithra
|
|
|
|
|
There are samples of API hijacking on the CodeProject website.
Do a search
Marriage slows down your coding, a baby slows it down even more!
|
|
|
|
|
Thanks Blake,
What I was REALLY looking for here is minimal confirmation I was looking at the right material, OR had reasonable expectations and was using correct terminology. If I knew anything about hooks I wouldn't have asked. I'm guessing the API Hijack material is what I need to be looking at, http://www.codeproject.com/dll/apihijack.asp .
|
|
|
|