|
Great! Now if I click on a vS6 dsw, what program will be launched? VS6? Or do I have to first start VS6, then load the VS6 project into it?
Appreciate your help,
ns
|
|
|
|
|
If you have installed VS6 before VS7 dsw file type (and of course all files connected with VS) will be connected with VS7, therefore VS7 will be launched, so you will have to load project manually in VS6.
greetings
|
|
|
|
|
Okay. makes eminent sense. Thanks
Appreciate your help,
ns
|
|
|
|
|
Hi,
I have a VC++ project;
I have a dll with several classes that I export (one of them is this one, with static members declared in a header file and initialized in it’s .cpp file), and I’m using them from another dll. For the other classes I had no troubles (I included the header files and used them normally) but I don’t know what happens with this one.
When I see the dll’s depends it’s all ok; I can see the class and its attributes, but when I try to use it from another dll (like className::attributeName ), at linking time, I got an ‘unresolved external symbol’ error, but it compiles well.
I’ve tried:
- Include the class header file with __declspec(dllimport) in the dll that uses it
At linking time returns ‘error LNK2001: unresolved external symbol’
- Make a header file with extern sentence ( extern string className::attributeName; );
At compiling time returns: file.h(53) : error C2720: [attributeName] : 'extern ' storage-class specifier illegal on members
- The same header file, but with extern “C” sentence
( extern “C” string className::attributeName )
At linking time return:
file.obj : warning LNK4006: "public: static class string className::attributeName already defined in file2.obj; second definition ignored
Can someone help me to resolve this?
Thanks
Paranoico? yo???
|
|
|
|
|
It should work - it does for me. I guess your second dll (the one which should import) is having problems with correct __declspec. Can you create small exe which links dynamically with dll exporting static members?
Tomasz Sowinski -- http://www.shooltz.com
*** Si fractum non sit, noli id reficere. ***
|
|
|
|
|
It was a good idea, but It returned the same errors.
Paranoico? yo???
|
|
|
|
|
Now that it checks(thanks ), I am doing:
UpdateData(FALSE);
if(m_checkDont.GetState() & 0x0003 == 1)
{
value = xDont;
}
I check the box , and the press the button which runs the above snipppet> But my code skips the if. I got the mask test out of MSDN.
(If its checked, I want to set value )
Appreciate your help,
ns
|
|
|
|
|
Why don't you use CButton::GetCheck instead?
(if you insist on messing with GetState, use '!= 0' instead of '== 1')
Tomasz Sowinski -- http://www.shooltz.com
*** Si fractum non sit, noli id reficere. ***
|
|
|
|
|
I had grabbed the first likely CButton function I saw (my first time using the checkbox - I actually hunted for CCheckBox and finally figured out from class wizard its a CButton!). GetCheck works fine.
Thanks a bunch.
Appreciate your help,
ns
|
|
|
|
|
I put a checkbox on my form and ran it. It wont check if I click in it! I want to do stuff if its checked so I use GetState() to get that info, but I cant even get it checked at runtime! What do I need to set? I didnt set its initial state as checked or anything so its blank when it starts...
Appreciate your help,
ns
|
|
|
|
|
are u looping somewhere???
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Do you do an UpdateData(FALSE) BEFORE checking the state of the button in your callback?
Michel
It is a lovely language, but it takes a very long time to say anything in it, because we do not say anything in it, unless it is worth taking a very long time to say, and to listen to.
- TreeBeard
|
|
|
|
|
No. Does it matter that I have a CBUtton variable called m_check whose state I want to check? I'll try the updatedata(false) idea right now...
Appreciate your help,
ns
|
|
|
|
|
Do you have 'Auto' style set for this particular checkbox in resource editor?
Tomasz Sowinski -- http://www.shooltz.com
*** Vodka. Connecting people. ***
|
|
|
|
|
No> I set it to lefttext....is that okay?
Appreciate your help,
ns
|
|
|
|
|
'Left text' and 'Auto' flags are not mutually exclusive (because they have totally different meaning). Without 'Auto' your code is responsible for switching the state of checkbox when user clicks. Turn 'auto' on and you'll be OK.
Tomasz Sowinski -- http://www.shooltz.com
*** Vodka. Connecting people. ***
|
|
|
|
|
Right you are! I didnt know what auto meant....
Appreciate your help,
ns
|
|
|
|
|
I didn't know that either. Cool info, tx
Michel
It is a lovely language, but it takes a very long time to say anything in it, because we do not say anything in it, unless it is worth taking a very long time to say, and to listen to.
- TreeBeard
|
|
|
|
|
|
attach a int to this radio button using classWizard member variable, then set this to the number of the radio button in the group:
Lets say group is like follows:
o Red (Group checked in the ressource editor)
o Green
o White
and u wanna set White so u attach an int let say its named iRadioChoice and u put somewhere:
iRadioChoice = 2; // Bettter to name the values in an enum!
UpdateData ( FALSE ) ;
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
I'm using Win32 not MFC thanks anyway man
|
|
|
|
|
Are you using Win32 API or MFC? One solution is SetCheck().
Kuphryn
|
|
|
|
|
|
Here is one solution.
// Enable a dialog control
EnableWindow(GetDlgItem(hDlg, ID_EDIT), TRUE)
// Disable a dialog control
EnableWindow(GetDlgItem(hDlg, ID_EDIT), FALSE)
Kuphryn
|
|
|
|
|
I have a
char* a ="a sentence" . I need to copy this into another char* b , after allocating enough memory to b.
I am very unsure about how to get the length of a so I can do
char *b = new char[a_length+1];
If I use strlen , how exactly do I code this?
a_length = strlen(*a);
or
a_length = strlen(a);</
Appreciate your help,
ns
|
|
|
|