|
where i can see i have installed (windows and) msdev packs?
-about-box search failed
-add/remove search failed
thanks for reply
t!
|
|
|
|
|
Try using GetVersionEx to obtain Windows Service Pack number.
|
|
|
|
|
Hello,
I would like to know how to assign "Ctrl + tab" to change pages in my Tab Ctrl.
Thanks for help.
R.G
|
|
|
|
|
Hi,
You can trap the WM_CHAR messages in the Dialog's you are
using for the Tabs and then if the char matches the 'TAB' key
you can test for the presense for Ctrl key being down using the
GetKeyState.
If the key is pressed you call a specified funciton such as (ex)ShowNextPage
in the Tab Ctrl to show the Next Dialog.
Kumar
|
|
|
|
|
I made myself a MFC Extention DLL and I seem to be having a couple of pointer problems, event though I don't know what it is exactly. Perhaps you've got an idea...
The situation is as follows....
In-dll functions:
CString Trim(CString sInput);
CString EatString(CString * pInput1, CString sInput2);
CMyOwnObject()::CMyOwnObject(CString sInput); // constructor
Now, this is what happens when I call the in-dll functions from outside the dll:
CString s = Trim(" my string "); // this works fine!
CString s2 = EatString(&s, " "); // this gives a crash inside EatString at the point where I try to set the value of s (like this: *s = "new string");
CMyOwnObject * pNew = new CMyOwnObject("new"); // This gives a crash at the point where the constructor ends... for SOME reason it goes into the desctructor of CString (probably for "new") and there it crashes on FreeData() )
I don't want to completely rewrite all my code to BSTR's and so for the moment. Is there another way to fix this? (Trim works just fine!)
Structured programming vs. chaotic mind boggling
|
|
|
|
|
Are you absolutely sure that your DLL uses shared MFC? Set dll as active project, go to Project->Settings->C/C++ and check if you have _AFXDLL in the 'Preprocessor definitions'.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Just checked it, but the _AFXDLL wasn't in there... So I put it there, but that didn't seem to have any effects on the result (even after clean rebuilding a couple of times)...
I just created the project with the classwizard, selecting an extention DLL... And everything works, except this... It crashes on the destructor of the input string!
I found that putting LPCTSTR in the header, instead of CString, resolves the problem, but then I have to rewrite all my headers to use LPCTSTR... And what do I do with CString * then? I can't use LPCTSTR *, right?
Structured programming vs. chaotic mind boggling
|
|
|
|
|
> Just checked it, but the _AFXDLL wasn't in there...
So it wasn't the MFC Extension DLL. You should read MFC Technical Note 033 to learn more about this.
The rule of the thumb is: .exe *and* .dll must 'Use MFC in shared DLL' - you set this in 'General' pane of the 'Settings' window.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Hmm, actually, I don't want to use 'MFC in Shared DLL', because a business policy of ours is to always use MFC in static DLL (to avoid MFC version conflicts)... BTW, it works if I put both projects in MFC as shared DLL.
If I use MFC in a static DLL, then what is the correct way to handle input-ouput string characters? My function does the following:
CString EatString(CString * pString, LPCSTR sInput);
pString gets completely mixed up inside the function, but somehow this keeps on leading to errors. I've tried the following things:
CString EatString(CString& pString, LPCSTR sInput);
CString EatString(CString * pString, LPCSTR sInput);
CString EatString(LPCSTR * pString, LPCSTR sInput);
none of these seem to work well.... What's the standard way, anyway?
Structured programming vs. chaotic mind boggling
|
|
|
|
|
> If I use MFC in a static DLL, then what is the correct
> way to handle input-ouput string characters?
There's no such thing as static DLL - 'D' in DLL means dynamic.
If you use static lib version of MFC, your .dll and .exe will have two different heaps. Memory allocated in .exe can't be freed in .dll and vice versa. Using CString::operator= may cause heap operations, and this is going to crash when MFC isn't shared. So the declaration for EatString should look more or less like this:
int EatString(char *szOutput, int cbOutput, const char *szInput);
You can return number of characters in szOutput after completing the operation. Or the error code, or whatever.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Hi,
If I have a class called CMyClass, I can create it both with:
CMyClass MyClass;
and
CMyClass *MyClass;
MyClass = new CMyClass;
If I have a template I can only get the first one to work like:
CMyTemplate<int> MyTemplate;
How do I create it with the 'new' operator?
TIA,
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
typedef CMyTemplate<int> CMyClass;
...
CMyClass *MyClass;
MyClass = new CMyClass;
--------------
"Criticism is often constructive because it makes you feel superior when you give it"
-- Dogbert
|
|
|
|
|
Thanks
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
You don't have to typedef. Just use this:
MyTemplate = new CMyTemplate<int>;
Works on VC6 SP5.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Hi all,
Here is a description of what I want to do:
Everyday I connect to a news web page that includes a number of news headlines each one of them being a link to the full story of the corresponding headline. I would like to develop an application that shall connect to this web once a day, download all headlines and the corresponding full stories and store them in a TEXT file that I will be able to later print and read. How can I do this using VC++?
Best Regards,
Christos
|
|
|
|
|
I would use the WinInet functions (functions that start with 'Internet*') to get the main page.
When you have the mainpage, you can find all the '<A href=.....>' where the URL to all the other sides is. Then use the same code, as you used to get the mainpage, to get the newspages, and save them to a local file...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
I want to connect a file source filter,a avi splitter filter,a avi decompressor filter and a null renderer filter together to get the decode time of the total frames approximately,how can i connect them together??
|
|
|
|
|
use the utility program "graphedit.exe"
or read the dox about IGraphBuilder interface
LOX
|
|
|
|
|
Can I possibly draw figures on a Dialog Bar just like ordinary dialogs? If yes please do help me...!
Thanks ...
XNOR
|
|
|
|
|
Hi All ,
Can anyone tell me how to how to print in text mode .
|
|
|
|
|
You mean in MS-DOS mode and by C++ ?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Actually i want to dev. Activex control or one of my Visual Basic project
which will allow the user to print in text mode .
|
|
|
|
|
You mean print to the printer ? If your mapping mode is MM_TEXT, you'll find everything is stupidly small, because an A4 page can have 4000x6000 'pixels' and so you get a postage stamp in the corner from your code created for 800 x 600. I set up a flag to make the code in OnPrepareDC/OnDraw/OnPaint not execute at all, because what I'm working on, I want a different result when I print ( a report ) anyhow. I do all my printing in OnPrint. If you *do* want the printing to be the same, the trick is to draw things relative to the DC size, which you get from GetDeviceCaps(dc, HORZRES) and VERTRES. Either way this is how I do my OnPRint, because I don't know ahead of time the DPI of the printer my users will be using. If you do this and draw with stretch blt, you'll be able to get your bitmaps to print OK. For text, you need to use a function that takes a DC and allows you to specify a font size in points. I think CFont has CreatePtFont, but I'm not sure ( it's something like that, but I learned about it here about a week ago ). In GDI+ you specify fonts in points automatically. When I moved to GDI+ I finally got all my fonts perfectly as I requested them, the same in my preview ( which I draw myself in a seperate function ) and my page. This is essentially because GDI+ IMHO behaves more as I expected it to in terms of the size of the font returned ( although it just may have been because I'd never discovered CreatePtFont ).
Sorry if this rambled a little - if you need more info, just ask. I can post some code to do it tomorrow at work if you're still stuck.
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|
|
How can I add activex component into my program at runtime? All helps talk
only about using Classwizard. But I can not find any help about
creating and using ActiveX component at runtime (like ActiveX tester tool)
I'm using Win2000 and Visual Studio 6 (C++)
|
|
|
|
|
I want to make Mapping Keyboard Resident program for POS system under Windows. Can you help me ... ?
|
|
|
|