|
It seems that the compiler can not determine where the function is, like if the library was not properly included.
Include the library to the project (Project->Add to project...), include the header, delete/rename the debug/release folder and try to "rebuild all..."
What happens?
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
I tried something else, now when I compile and get errors saying numerous 'struct' type redefiniton like:
<br />
d:\vistasdk\include\propidl.h(147) : error C2011: 'tagCAUB' : 'struct' type redefinition<br />
d:\vistasdk\include\propidl.h(153) : error C2011: 'tagCAI' : 'struct' type redefinition<br />
d:\vistasdk\include\propidl.h(159) : error C2011: 'tagCAUI' : 'struct' type redefinition<br />
d:\vistasdk\include\propidl.h(165) : error C2011: 'tagCAL' : 'struct' type redefinition
and more!
???
Thanks for your replay!
|
|
|
|
|
I guess you are including a header twice in your app. Because of that you are having the definitions of typedef twice, and the second one gives an error.
Check out your includes, and take a look into #pragma once
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
Hi,
I have a mobile device, I want to run my program on it, my program is written on C++ language, but when one of mobile’s keys is hit, one tool bar comes on top of my program and it does not go until I close my program and then run it again.
How can I remove the tool bar in the middle of running program?
Please help me
Thanks a lot
|
|
|
|
|
Hi all,
I have the following std::string array. How can I get hold of the first elements data? I have tried the following without success:
std::string openDoorTags[50];
char copyToBuf[128]={0}
strcpy(copyToBuf, openDoorTags[0].c_str());
Can anyone please help?
Many thanks in advance
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
Programm3r wrote: I have tried the following without success:
And what is the problem ?
|
|
|
|
|
How do I get hold of the data in the first element of the string array and copy it into the char buffer ? When perform the code above nothing happens .... the buffer remains blank although the string array element has data in it ....
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
Programm3r wrote: the buffer remains blank although the string array element has data in it ....
Uh, in your code above, all the strings in your array are empty, so it's normal that the buffer will be empty too.
What happens if you try something like this ?
std::string openDoorTags[50];<br />
openDoorTags[0] = "Test";<br />
char copyToBuf[128]={0};<br />
strcpy(copyToBuf, openDoorTags[0].c_str());
|
|
|
|
|
Cedric Moonen wrote: all the strings in your array are empty, so it's normal that the buffer will be empty too
Sorry ... I forgot to mention that the string buffer has data in it. But I will try the snippet that you supplied.
Thanks Cédric
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
Programm3r wrote: I have the following std::string array. How can I get hold of the first elements data? I have tried the following without success:
the code seems fine to me, but only thing seems problamatic to me, is if your first element contain the data more than 128 character. there could be overflow in strcpy call!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
|
What does the following produce:
cout << openDoorTags[0].c_str();
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
hello all,
i have a problem with creating a dialog inside a dialog and removing it . i mean by creating dialog is embedding the dialog with the help of a picture frame and i did that by doing this piece of code
m_GAUserEnteredOption.Create(this, IDC_S_VIEW_USERENTEREDOPTION,
IDR_F6CP_MAINFRAME,
RUNTIME_CLASS(CGADocument),
RUNTIME_CLASS(CGAMainFrame),
RUNTIME_CLASS(CDigitalUserOption),
WS_CHILD | WS_VISIBLE, 0L);
and i did this because on the original dialog i couldnt place anymore controls since it was overflowing (crossed 255) , but once i embedd this dialog i cant remove it. i tried using destroywindow() or closewindow() its not working . and i cant get to the original controls which are on this place before . how to remove this frame and dialog through code . if anybody knows it plz help me
"Men never do evil so completely and cheerfully as when they do it from religious conviction"
-Pascal
|
|
|
|
|
If you know that you will need it by all means, why dont you design it in your resource editor, stablish a class to it and use DoModal? It will be easier.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
hi ,
its not supposed to be a child window but in the same dialog i need it . it doesnt have any ok or cancel button ,its just a formview class dialog attached to another dialog . like a patch of new set of controls it will attach to original dialog and it has another class also for that. but i cant remove through code once it is attached .
"Men never do evil so completely and cheerfully as when they do it from religious conviction"
-Pascal
|
|
|
|
|
And why dont u use a simple dialog and resize it to have more working surface?
I have more than one VariabledSize Dialog in one project, and more than one view (up to 28 CFormViews in 4 types with different sizes according to the type they belong).
But I didn't mix things, CFormViews are in independant frames, and Dialogs are "unique".
To make the Dialog with variable size, I designed it in my resource editor with ALL the controls I needed and set them to not visible, then according to the parameters that determined how many of the should be visible... I used the SetWindowPos / MoveWindow to change the size and made visible just the controls that must be shown.
does the idea help you?
If not... I ask you for a better explanation, im not english speaker and I have not understood what you need
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
Hi,
I am using a CListCtrl with check boxes for the row (using LVS_EX_CHECKBOXES). Now, my requirement is to use check box in column header of the CListCtrl so that I can "Select All" or "Deselect All" items in list on a single click.
Any help would be appreciated.
Regards,
Paresh.
|
|
|
|
|
Don't mind me, but I do that by placing a button control just under CListCtrl and I place icon (looking like checked box) on it and add some code on 'OnClick' member where I loop through list and set each row as checked. Add another icon button for deselecting all rows.
Glad if I could help!
|
|
|
|
|
Thanks for your prompt reply.
I am seeking an easier solution for this.
Regards,
Paresh.
|
|
|
|
|
Paresh Chitte wrote: I am seeking an easier solution for this.
What's hard about that? It seemed easy and straight forward to me.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
See Here[^]
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Thanks for your prompt reply.
Regards,
Paresh.
|
|
|
|
|
Found solution here[^].
Thank you all for your replies.
Regards,
Paresh.
|
|
|
|
|
The function ItemHasChildren (TreeItem) returns true for a perticular node but GetChildItem (TreeItem) doesnot return a valid node without expanding the node TreeItem . This expanding and shrinking is causing flicker in the tree. Could anyone provide a better solution ?
The sample code is following -
if (ItemHasChildren (TreeItem))
{
HTREEITEM tmpTreeItem = TreeItem;
Expand (tmpTreeItem, TVE_TOGGLE);
TreeItem = GetChildItem (TreeItem);
Expand (tmpTreeItem, TVE_TOGGLE);
}
|
|
|
|
|
NishantB++ wrote: expanding and shrinking is causing flicker in the tree.
Stop the tree from redrawing while you are tampering with it.
From my CTreeView I do:
GetTreeCtrl().SetRedraw( FALSE);<br />
...<br />
GetTreeCtrl().SetRedraw( TRUE);
Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all. Douglas Adams, "Dirk Gently's Holistic Detective Agency"
|
|
|
|