|
Hi, im writing a program for an FPGA controller in c++ at uni. Since i wanted to make a GUI, i've been using MFC and have found it relatively easy with all the toolbar drag and drop functions. Although, when i run it at university, the machines that dont have VC++ but have Borland C++, cause a problem for the MFC exe file due to the absence of libraries etc. A friend reccomended that using a WIN32 API dialog would be better as it wouldnt be as dependent on computer config as the MFC application. Im fairly new to Visual C++ and hence i cant say im very clear on making a a dialog based application in Win32. Moreover, id rather stick to MFC, its seems easier. Is there anyway of solving this problem? can one stick to MFC, but still design a dialog based application that will work on almost every computer? Also, can anyone provide links to win32 dialog based apps tutorials?
Cheers,
Ayush
|
|
|
|
|
You can do a static linking and see if that works
Regards,
Venet.
Donec eris felix, multos numerabis amicos.
|
|
|
|
|
Could someone explain how one goes about static linking?
|
|
|
|
|
Go to Project and Settings, you should find it there somewhere.
Can't remember the exact tabs as I don't use MFC.
Regards,
Venet.
Donec eris felix, multos numerabis amicos.
|
|
|
|
|
Go to the Project Settings, click on the General tab, and select "Use MFC in a static library". Doing so, you don't need at all MFC dlls to run it on target machines.
How low can you go ? (MS rant)
|
|
|
|
|
Hi,
I would like to add a new feature to my GUI: user resizeable controls. I already have a resizeable CDialog, now there are inside two CListbox next to each other. If I resize the one the other should become smaller (and visa versa, e.g. similar to the explorer window). It looks like this:
--------------------------
| | |
| | |
| | |
| | |
| | |
---------------------------
^listbox1 ^listbox2
^
let user resize here with mouse
Two question............
What is the general technique to do this? Is this a SplitterWindow?
Is there already a class on CodeProject?
Thanks for pointing me into teh right direction!
|
|
|
|
|
PS: There are also more controls in the dialog.
Not that you think my dialog consists of two listboxes only (dunno if this is important to mention). However, the two listboxes are the part that the user should be able to resize. The overall width of both listboxes should stay the same. Thanks... and im curious, how this can be done.
|
|
|
|
|
PPS: It's totally NOT urgent... so if you read my posts and have a hint, I appreciate any help. Meanwhile I spend my weekend on reading MSDN and what I found here.
|
|
|
|
|
The new UI elements that are present in VS.NET (and also in Office XP), such as the menus that are all white with the translucent blue highlighter, toolbars with the translucent blue highlighter, and tabbed documents with similar features are all rather slick. Are these elements and styles available to us mortals or is Microsoft doing a ton of custom control work? Anyone have an links that detail how all of this can be integrated into our apps?
thanks
|
|
|
|
|
Where can i find the documentation abour the registerd MFC ActiveX controls? Not about the creation and usage of the controls. Just i want the documentation like the class definition and purpose of the memeber functions and data memebers etc. Please help.
|
|
|
|
|
Hi,
Is there any COM interface that can be used for image editing (eg: selection,erase,fill etc.. all options available in Windows paint application)?
Thanks
Neha
|
|
|
|
|
Not that I am aware of, are you trying to stay standard so that other people can interface into your progranm. or are you trying to hook into MSPaint?
If you are creating your own program, I think that you would be fine to create your own interface.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
can i type caste WPARAM and LPARAM into Int32 or not.
is there any lose of values;
Int32 wp=(Int32)wParam;
Int32 lp=(Int32)lParam; is there any lose of value if i get wParam,lParam like that?
WPARAM wParam=(WPARAM)wp;
LPARAM lParam=(LPARAM)lp;
r00d0034@yahoo.com
|
|
|
|
|
WPARAM and LPARAM are 32-bit integers, however depending on the exact message, they may be signed or unsigned. So without knowing the origin of the values, it's impossible to say whether assigning them to signed int variables could lose data.
Note that in 64-bit Windows, they are 64-bit integers.
--Mike--
"I'd rather you just give me a fish today, because even if you teach me how to fish, I won't do it. I'm lazy." -- Nish
Just released - 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
i want to store thes values.
that can be put into
system.collection.hashtable and can be retrive again
but in case of wparam and lparam these values cant be retrive again ?
so what yo do ?
any suggestion.
r00d0034@yahoo.com
|
|
|
|
|
I have a little problem here maybe someone can help me please. I have to provide a Programmer class which is a sub class of both Person class and the Staff class. I have done simple inheritance but I don’t know much about multiple inheritance. Can anyone please help me with initial part of the program. Here are the Person.h and Staff.h file:
Person.h
#ifndef __PERSON_H
#define__PERSON_H
class Person{
Protected:
char* name;
int age;
Public:
Person(char*, int);
Person(const Person&);
Person& operator=(const Person&);
~Person();
char* getName();
int getAge();
};
#endif
&&&&&&&&&&&&&
Staff.h
#ifndef __STAFF_H
#define__STAFF_H
class Staff{
Protected :
Char* post;
Public:
Staff(char*);
Staff(const Staff&);
Staffoperator=(const Staff&);
`Staff();
char* getPost();
};
#endif
// thanks for replying
|
|
|
|
|
Here is how you would inherit from both classes:
class Programmer : public Person, public Staff
{
public:
Programmer () : Person(), Staff()
{
}
... All of the internal class stuff
};
One more thing, you should really make your destructors for your staff and person classes virtual. Otherwise if you use your classes polymorphically, the incorrect versions of the destructors will be called and you will get memory leaks.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
It would seem to me that all Staff objects would probably be people too (unless you have Robots or something!), so you would first derive Staff from Person, and then derive Programmer from Staff. Multiple inheritance can be useful, but I don't think you'll have to do it in this case.
Chris Richardson
|
|
|
|
|
Hi Thanks for replying, actually i must use multiple inheritance. I totally agree that staff derives from Person but the way the problem is set i have been told to use multiple inheritance.
|
|
|
|
|
do you have an idea when i will used this part of the problem please:
Staffoperator=(const Staff&);
Thanks
|
|
|
|
|
If you describe the actual problem you are having, I'll try to provide some information. Just from what you posted, you'll have to change that to:
Staff & operator=(const Staff&);
Chris Richardson
|
|
|
|
|
Hi, Actually i would really like to know how to use:
Person& operator=(const Person&);
and
Staff& operator=(const Staff&);
in my implementation and for the programmer class implementations. This is the part that i am failing to understand. Can you tell me what these pices of code mean and how we can use that please. thanks
|
|
|
|
|
I have a little problem here maybe someone can help me please. I have to provide a Programmer class which is a sub class of both Person class and the Staff class. I have done simple inheritance but I don’t know much about multiple inheritance. Can anyone please help me with initial part of the program. Here are the Person.h and Staff.h file:
Person.h
#ifndef __PERSON_H
#define__PERSON_H
class Person{
Protected:
char* name;
int age;
Public:
Person(char*, int);
Person(const Person&);
Person& operator=(const Person&);
~Person();
char* getName();
int getAge();
};
#endif
&&&&&&&&&&&&&
Staff.h
#ifndef __STAFF_H
#define__STAFF_H
class Staff{
Protected :
Char* post;
Public:
Staff(char*);
Staff(const Staff&);
Staffoperator=(const Staff&);
`Staff();
char* getPost();
};
#endif
|
|
|
|
|
Hello!,
I am a little stuck with this piece of code, can anyone help me please?
Actually I don’t know how to implement the assignment operator and the overloaded operator. Can you give me some tips and ideas please. As it is apparent, I have just started with C++ programming.
//file myString.h
#include <iostream.h>
class myString
{
private:
char* theString;
int length;
public:
myString();
myString(char*);
~myString();
myString(const myString&);
myString(const char*);
//the assignment operator
myString& operator=(const myString&);
myString& operator=(const char*);
int getLength();
const char* GetString();
// == operator overloaded for string comparison
friend int operator==(const myString&, const myString&);
friend int operator==(const myString&, const char*);
};
Thanks
|
|
|
|
|
I'm loading a bitmap off the disk and managing it with an IPicture pointer. What I would like to do is make a copy of that bitmap object in memory and obtain an IPicture interface pointer on this second object. This is what is giving me trouble. I've tried to make a memory device context select in a newly created bitmap, render the first IPicture, then converting the new bitmap into an IPicture, but the new bitmap is just all black.
I'm hoping there is something quick and easy I'm missing here about duplicating IPicture objects.
Ultimately my goal is to have two bitmap objects start off identically, then display one with a transparency mask in my toolbar (i can do this fine, but it alters the bits of the bitmap in memory so that is why i need the second copy) and another in my outline view as a plain bitmap.
thanks,
nebbish
Smart, Sexy, Sane. Pick two.
|
|
|
|