|
I stored the MSOFFICE files in the database, and now I want to read them out and display them in my program.
It's available to get it done by storing them on my local disk first, then read them and display them, but I don't think it's a good idea, so need all you help.
thanks.
|
|
|
|
|
Ok, what I'm trying to do here is change the default WindowProc of a common control by hooking RegisterClassEx using a hooking library. I figured InitCommonControls() does nothing but register the common control classes using RegisterClass(). BUT.. I managed to hook the functions, but I noticed that when I start apps like IE and others, I usually get a few RegisterClassEx calls but for really anomalous classes. To make myself clear, its the progress bar I want to change ("msctls_progress32" or something). So I don't get why I'm not logging the RegisterClassEx() calls for those controls when IE starts. My logical explanation would be that the registering of these classes is somehow global for the system and that its only done once at startup or whenever an app first uses them, but that seems kinda weird, cause then why would an app need to call InitCommonControls() each time before it can use them? :/
Then I have a second issue which has more to do with Windows in general really. I was wondering: When an application is loaded, is a new copy of the dlls it uses always loaded in memory, or does Windows keep like a pool of loaded dll's and if its already loaded the app will just use that dll? Like kernel32.dll or user32.dll for example. Does each app get a fresh copy or do they all use a shared instance? My guess would be they all get their own copy, but then I would think applications would consume more memory than they appear to do.
Thanks in advance for any clarifications.
Kuniva
--------------------------------------------
|
|
|
|
|
Kuniva wrote:
My logical explanation would be that the registering of these classes is somehow global for the system and that its only done once at startup or whenever an app first uses them, but that seems kinda weird, cause then why would an app need to call InitCommonControls() each time before it can use them?
Classes are registered per application instance, and are unregistered when the application closes. InitCommonControls() loads the comctl32.dll library, which in turn registers the classes using RegisterClassEx(). Most apps these days use InitCommonControlsEx() and only register the classes that they require. InitCommonControlsEx() can be called multiple times, so IE might only be registering the classes as it needs them. Also, have you checked to see whether it is using the standard progress control and not its own variety?
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hmm ok..
First of all, I just checked and the progress control is the normal one registered through InitCommonControlsEx(). Now, I did some testing and came up with some stuff I really can't explain:
First I made a test app that simply consists of a window and it does the following on startup:
INITCOMMONCONTROLSEX icc;
icc.dwSize = sizeof(INITCOMMONCONTROLSEX);
icc.dwICC = ICC_PROGRESS_CLASS;
InitCommonControlsEx(&icc);
Now my hooking app logs both InitCommonControlsEx() and RegisterClassEx(). When I run my test app, I get a log for InitCommonControlsEx() just as I should PLUS a call to RegisterClassEx() (for the progress control). Now the weird thing is, in my hooking app I also log the lpszClassName member of the WNDCLASSEX structure for the RegisterClassEx() function. For my test app I get "PROGRESS"... ???? I mean.. wth is going on, isn't it supposed to be "msctls_progress32" or something?
Now, another weird thing. As I've said I checked the class of the IE progress bar by using Spy++ and it's msctls_progress32. Now the thing is, when I have my hooking app running, then start IE, I DO log two RegisterClassEx() calls but NO InitCommonControlsEx() calls? The ones I do log are the following:
RegisterClassExA() - CicMarshalWndClass
RegisterClassExA() - IMMIF UI
Now, am I right to conclude from this that the "Common progressbar" control IS NOT of class msctls_progress32 but just.. PROGRESS? However, that's impossible because I checked commctrl.h and there it's declared as follows:
#ifndef NOPROGRESS
#ifdef _WIN32
#define PROGRESS_CLASSA "msctls_progress32"
#define PROGRESS_CLASSW L"msctls_progress32"
#ifdef UNICODE
#define PROGRESS_CLASS PROGRESS_CLASSW
#else
#define PROGRESS_CLASS PROGRESS_CLASSA
#endif
#else
#define PROGRESS_CLASS "msctls_progress"
#endif
I am seriously confused about all this and any clarification would be wonderful. Thanks.
Kuniva
--------------------------------------------
|
|
|
|
|
Are you hooking both RegisterClassExA() AND RegisterClassExW()? And you might like to hook RegisterClass() as well, just to make sure...
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
I'm trying to calculate the bounding box for a string. Whenever the string contains asian script (Kanji/Hiragana/Katakana in this case), the calculated rectangle is not wide enough to contain the rendered text.
Is there a trick I should know to make this work?
I'm building my application with UNICODE support.
Nevermind me. I'm an idiot.
--
Schni Schna Schnappi! Schnappi Schnappi Schnapp!
|
|
|
|
|
If you don't mind, could you share your idiocy? I'm working on a multilingual app that includes support for Japanese, and if you came across something interesting, I'd like to know. Thanks!
Software Zen: delete this;
|
|
|
|
|
There was nothing to it really. I'm laying out a series of texts, in my own combobox implementation (since the system supplied one doesn't allow for easy tweaking). In "automatic mode", I have it resize the width dynamically according to the longest entry. What I did wrong was that for each string S in the list, I always measured the first string.
(Jörgen, not logged in. I wish the DNS would stop screwing around )
|
|
|
|
|
I bet $10US that you had the wrong font selected into the DC. ? But yes, please share what was going wrong.
Chris Richardson
|
|
|
|
|
Heh, no. That was the first thing I checked, because I've been burnt by that one before.
See reply to Gary if you're really interested in how stupid I can be.
(Jörgen, not logged in)
|
|
|
|
|
Jörgen Sigvardsson wrote:
Nevermind me. I'm an idiot.
Yeah, we all know that But please tell us what you did this time!
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Please see my reply to Gary for an insight into the idiot's mind.
(Jörgen, not logged in)
|
|
|
|
|
I've heard two set of stories each saying the opposite. Which one is true?
If it turns out that both versions can be on the same machine, what's the installation procedure like?
Thanks for any insight into this matter.
William
Fortes in fide et opere!
|
|
|
|
|
There's no conflict between VC6, VS.NET 2002 and VS.NET 2003. Not in my experience anyway.
The installation procedure is nothing special, just the ordinary next, next, next, tweak options, next, finish. Although, I did install the newer versions before VC6, so I can't speak of what happens if you install the newer versions after VC6.
--
Schni Schna Schnappi! Schnappi Schnappi Schnapp!
|
|
|
|
|
I installed 2002 after VC6, no problems at all.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
Thanks for replying!
The reason I was told of the incompatibility of both versions, was that the version being installed would overwrite (or partially overwrite) some folders of the previously existing version, which you'll not find out until later when you run certain applications that were created under the previous version.
Because I have hundreds of applications developed under VC6, I would hate to fine out that some of them may experience certain anomalies due to the concurrency of a second version.
William
Fortes in fide et opere!
|
|
|
|
|
Generally speaking, it's OK but there may well be some obscure problems. At the place I left a while back I was told that merely having VC++ 7.1 installed broke their existing VC6 app. However, their app. was very complicated - involvong VC6, COM/ATL, VB, Tuxedo, etc.
Kevin
|
|
|
|
|
Thanks for replying!
I appreciate it.
William
Fortes in fide et opere!
|
|
|
|
|
I've had side-by-side installations of VC6, VS.NET 2002, and VS.NET 2003 on several machines. They coexist nicely, and don't interfere with one another. I've not heard anything one way or another about VS.NET 2005 (the beta).
The only thing to be careful of is that they will upgrade their predecessor's project files if you're not careful, and the upgrade is one way (although there are converters out there, at least to revert from .NET 2003 back to 2002).
Software Zen: delete this;
|
|
|
|
|
Thanks for replying.
Does the upgrade to those project files occur only when you activate those particular applications, or does it happen as part of the installation process (that it upgrades ALL such files)?
Perhaps that's what those people were talking about when they mentioned about files getting written over.
William
Fortes in fide et opere!
|
|
|
|
|
WREY wrote:
Does the upgrade to those project files occur only when you activate those particular applications, or does it happen as part of the installation process (that it upgrades ALL such files)?
The update only occurs when you open the project into the new compiler. It does ask you if you want to update the files however.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
Thanks for replying, and expressing that bit of clarity.
I appreciate it.
William
Fortes in fide et opere!
|
|
|
|
|
VS.NET 2005 is much smarter than the previous IDEs regarding "conversions". When you double click a solution, it will launch a "version selector". So based on the contents of the solution file, it will start the correct IDE. Very nice feature indeed. It also shows the version number of the IDE used to create the solution file, in the icon label.
I think that happened in Beta 2. Someone in the VS.NET department should get a raise.
|
|
|
|
|
Cool.
William
Fortes in fide et opere!
|
|
|
|
|
Howdy im new at this website witch i visited tnx to a college bud recomendation. Pls forgive my english im from Argentina
Very well this are my questions:
I need help at using qsort algorithm witch is included with borland 5 at stdlib.h
Help says
void qsort(void *base, size_t nelem, size_t width, int (_USERENTRY *fcmp)(const void *, const void *));
so that is basic chineese to me, i dont get this out look:
i call the function with this, example:
qsort( name_of_array , a_number(for what), NumberOfelementOfTheArray, a_wierd_function_IdontGet )
any ideas??
Second, i need any help i could get in how to get a window list working on borland 5, Thanks to anyone who can help. Saludos!
|
|
|
|