|
thanks for your reply.
it was really useful!
D3z
|
|
|
|
|
Hi,
I have developed a set of classes that allow developers to incorporate screen designer functionality into an application so that end users can customise screens in a controlled fashion, i.e. still accept updates.
The classes allow existing fields to be added, hidden, moved and new fields to be added.
Even if all of your application has been developed using a resource editor (as most app's are) it will still allow those controls to be modified at run-time.
It works on CView, CDialog, CPropertyPage derived classes.
I need some help in testing the code - before it is released, I think I can manage about 5 "BETA" testers - anyone willing to help?
Regards
Novo Star
|
|
|
|
|
Hi,
I have two sound blaster in my computer.
I'm working with win 2000 pro.
I would like to knew how (which command)can I approach each of them ?
thanks.
|
|
|
|
|
Hi,
Not sure what you mean by approach? But you should look at waveIn* APIs. Just look for waveInOpen, waveInClose etc. on MSDN.
Pankaj
Without struggle, there is no progress
|
|
|
|
|
Does anybody have any B+ tree implementation in C++?
Thanks!
Wanderley
|
|
|
|
|
Hi all,
Iwould like to load a bmp picture in to my dialog during runtime and if the actual size of the bitmap is less than my dialogs view area the bitmap should be displayed as such exactly in the centre and if its size is greater the dialogs view area the bitmap should confine to the view area with scrolling capability.How can i achieve this?.Can anyone help me?.
With regards
Shibu
|
|
|
|
|
The scrolling is an issue, the rest is easy. Assuming you have a HBITMAP ( which a CBitmap can return ) you can do this:
BITMAP bm;
GetObject( bm, sizeof(BITMAP), myhBitmap);
This structure tells you the width and height of your bitmap, the rest is simple maths. Draw the bitmap using BitBlt in your WM_PAINT handler, and if you want scrolling, you'll also need to draw two scrollbars, and use GetClientRect to find out the size of your dialog, then make the scroll range of each equal to the size of the bitmap - the size of the screen. i.e. if your bitmap is 200 wide and your dialog is 150 wide, you need the scrollbar to have a range of 50, so you can scroll across to see all of it. Then handle the scroll messages, and in them invalidate your dialog. Your draw routine should now draw the bitmap taking into account the scroll pos of the two scrollbars.
To centre, it's just some basic math. And you're done.
Christian
We're just observing the seasonal migration from VB to VC. Most of these birds will be killed by predators or will die of hunger. Only the best will survive - Tomasz Sowinski 29-07-2002 ( on the number of newbie posters in the VC forum )
Cats, and most other animals apart from mad cows can write fully functional vb code. - Simon Walton - 6-Aug-2002
|
|
|
|
|
Hi, recently I came across the following code and was wondering if you could help me understand some syntax.
#if 0
for (int i = 0; i < _Points; i++)
_aTape[i] = 1600 * sin (2 * PI * 1000. * i / _sampleRate);
#else
for (int i = 0; i < _Points; i++)
_aTape[i] = 0;
#endif
What are these #if and #else directives. Are they like the normal if/else. Also, what does the #if 0 evaluate to???
Thanks for any reply.
Cheers,
Pankaj
Without struggle, there is no progress
|
|
|
|
|
#if, #else and #endif are preprocessor directives. #if 0 is used to quickly comment out part of the code. In your case, only the second version of the loop will be compiled.
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|
|
hmmmmm... I wonder why the guy used it then. I mean, if I understood you correctly only the second version of the loop will ever get executed, right?
Thanks,
Pankaj
Without struggle, there is no progress
|
|
|
|
|
pankajdaga wrote:
I wonder why the guy used it then
He can quickly switch between two versions of the loop by changing '#if 0' to '#if 1' and recompiling. It's easier that using /* and */
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|
|
Got it! Thanks man!
Pankaj
Without struggle, there is no progress
|
|
|
|
|
Hi
I'm trying to set item image with this code:
CImageList m_ImageList;
m_ImageList.Create(IDB_BITMAP1,18,10,(COLORREF)0xFFFFFF);
int nCount = m_ImageList.GetImageCount();//after that nCount == 7
m_Tree.SetImageList(&m_ImageList,TVSIL_NORMAL);
m_Tree.InsertItem( "text", 1, 1 );
, but it doesn't work properly. New added item has empty image(white) and looks like it would be shifted on the right (by the image width). I don't have the faintest idea what is wrong.
thanks for any help
|
|
|
|
|
|
Your m_imageList seems to be local variable, despite the m_ prefix. It's destroyed as soon as program leaves the scope; tree control is left with invalid image list handle.
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|
|
Great thanks
Of course solution was really simple and my mistake was really stupid but the most stupid errors are the most difficult to solve out.
|
|
|
|
|
hello
in my programm im lookin for some system information
how do i get information about:
the installed windows service pack
and the rights of the loged in windows user
(e.g. admin, power user)
I use VC++ 6 and W2k
|
|
|
|
|
can we call dynamic_cast in OnInitDialog
|
|
|
|
|
SPGV wrote:
can we call dynamic_cast in OnInitDialog
dynamic_cast is a C++ cast operator. You may use it anywhere in your C++ program [It has nothing to do with MFC or CDialog]
Read my article [URL below] for more info on C++ cast operators.
http://www.codeproject.com/managedcpp/castingbasics.asp
Regards,
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
Yes, assuming that RTTI is enabled in project settings (it's not by default in VC6).
What kind of problems are you experiencing?
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|
|
|
Tomasz Sowinski wrote:
it's not by default in VC6
Guess what! It's not by default in VC7 too. Default compiler option is /GR- for MFC projects. My mistake was that I've done all my recent casting stuff on MC++ projects which have /GR and not /GR-
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
Nishant S wrote:
Guess what! It's not by default in VC7 too.
I like that. If you want to use dynamic_cast and typeid, you'll better find some good reason and know what you're doing
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|
|
Hi,
I'm not sure if this is the right place to be asking this question, but if its not I'd be grateful if someone could suggest a good site to go to.
I am using eMbedded Visual C++ and created an application using the AppWizard (exe). It uses shared dlls. My problem is that I am not sure how to add the dlls to my installer package, and which dlls to add. When I was debugging the application on a mobile device it downloaded mfcce300d.dll to the device. I have tried adding this to the installer package but when I try and run the application after installation it says that there is a library or component missing. Any ideas anyone?
Thanks,
Graham
|
|
|
|
|
MFCCE300d.dll is the debugging version of the MFCCE300 library (hence the trailing 'd') and is only used when you run the debug version of your app. MFCCE300.dll is the release version and already exists on the device; you don't have to install it yourself.
You can use the dependency walker http://www.dependencywalker.com [^] to determine which DLLs your app uses (even for CE applications).
Google for EZSetup to find a free and open source simple CE installation package. See http://www.pocketpcdn.com/articles/ezsetup.html[^] for an article.
VictorV
|
|
|
|