|
If you try to compile c code for make a c++.net dll you will be get some errors I think you need to change some things on your code.
|
|
|
|
|
Using Visual C++ 6.0 MFC in SDI application
When my window gets redrawn, I want to display a message using
pDC->TextOut(...)
but I want a different message (of different length) displayed depending on the circumstances when the window gets redrawn. I do not understand how to erase the old message unless I keep a copy of the old text and rewrite it with the background color. If I just try to write a long text string with all blanks such as tstr = " " to erase the old message before I display the new message I have to make the text string extremely long as the character size for a space seems to be different then the character size for letters. Should I just display a rectangle of an appropriate size in the background color to erase my old text, or is there a better method of erasing this old text each time the window gets redrawn?
Thanks
|
|
|
|
|
Have you tried Invalidate () ???
Regards.
--------
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
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Using Visual C++ 6.0 MFC in SDI application
I would like to put the & symbol in a dialog window to save some space instead of using the word "and", but the compiler recognizes the & symbol as a special character to associate the next letter as a command key. How do I just get the symbol with no special operation associated with it into the dialog window?
Thanks
|
|
|
|
|
Instead of single & , put && . For Instance for getting string like this - "B&utton" put "B&&utton" as caption.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
|
|
Please read the other answers given to the OP before adding yours.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Hello!
I have created a custom edit control that uses COleDropTarget to accept/insert text drops. This works very fine.
However, when putting the edit control into a group control in the resource editor of Visual C++, the group control prevents the edit control from getting drag&drop notifications.
Is there any way to make the group control "forward" the drag&drop notifications? Or any other way such that the edit control sees the drop?
Best regards
Dominik
|
|
|
|
|
Hello....
As per my knowledge there will be some drop target ambiguity arises while u drops text on group. Check your code well for this ambiguity...!
Good Luck...
Jagdish Bhimbha
S/W Developer
|
|
|
|
|
????????!!!!!!
|
|
|
|
|
It was a test or a reply(question)?
|
|
|
|
|
I don't know how to do this properly but does this[^] workaround helps?
-Saurabh
|
|
|
|
|
Yes, thanks a lot!
I've changed the tab order such that the group control comes after the edit control, and now it works perfectly.
|
|
|
|
|
Great! You are welcome.
-Saurabh
|
|
|
|
|
Hi,
Can somebody please point out why I'm getting a heap corruption error for the below code? I'm free all of the resources I've allocated with malloc.
Thanks
void TestMultiDim()
{
char** mArray;
int rows = 50;
char* p;
char* q;
int i;
char* data = "John Doe";
size_t len;
len = rows * sizeof(char*);
mArray = (char **)malloc(len);
if(mArray == NULL)
{
exit(EXIT_FAILURE);
}
for(i = 0; i < rows; i++)
{
mArray[i] = (char*)malloc(len);
if(mArray[i] == NULL)
{
exit(EXIT_FAILURE);
}
}
for(i = 0; i < rows; i++)
{
mArray[i] = data;
}
for(i = 0; i < rows; i++)
{
printf("%s\n", mArray[i]);
}
for(i = 0; i < rows; i++)
{
free(mArray[i]);
mArray[i] = NULL;
}
free(mArray);
}
|
|
|
|
|
Due to this line :
gp343 wrote: mArray[i] = data;
The reason is that you are changing the pointer at mArray[i] to that of data. Now data was noy dynamically allocated and moreover all mArray[i] points to same data. So free will fail. For copying string you should use.
strcpy(mArray[i], data);
-Saurabh
|
|
|
|
|
Sauraub, many many thanks for this. It worked!
|
|
|
|
|
You are most welcome.
-Saurabh
|
|
|
|
|
Hi all,
i m creating a resizable propertysheet with the help of this article.
http://support.microsoft.com/kb/325613[^]
But i have one problem.
In my Propertysheet the three buttons are created,those are "OK","CANCEL",and "APPLY",Apply button is disabled.
but i dont want all these button so please tell me how can i do this.
how can i remove all these buutons.
Thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
ThatsMe. wrote: In my Propertysheet the three buttons are created,those are "OK","CANCEL",and "APPLY",Apply button is disabled.
but i dont want all these button so please tell me how can i do this.
You can call SetWizardButtons method of CPropertySheet and set appropriate buttons.Typically it's called from CPropertyPage::OnSetActive .
Another option for you is to directly use control ids in a property page/sheet to hide or disable them as you need, control ids are...
ID_APPLY_NOW
ID_WIZBACK
ID_WIZNEXT
ID_WIZFINISH
AFX_IDC_TAB_CONTROL or use GetTabControl
Another function that might interest you is CPropertySheet::SetFinishText .
Nibu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
modified on Saturday, June 14, 2008 3:54 AM
|
|
|
|
|
After this please tell me how can close the Property sheet when i click the button of Property page.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
How about EndDialog() ?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
i m using this but the property sheet not closed.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Hi all,
I installed VC6 with SP6 on my Vista x64 system and have noticed the following problem with my MFC application. When I run in debug mode and am stopped at a breakpoint (or the debugger has stopped because of an error), and then I press Shift-F5 to stop debugging, then the IDE will return to it's normal non-debug state but my application will not be stopped. I can see the application in the task bar but just get the error dialog "This program is not responding" when I try to close it.
After the problem occurs I cannot make changes to any files because I get the following link error when I try to rebuild: LNK1168: cannot open [filename].dll for writing.
The application will close properly if I use Shift-F5 from the IDE when the debugger is not at a breakpoint. Also if I close and restart the IDE the zombie processes will be closed as well but this is not an ideal workaround. Does anyone know how to properly fix the problem so the application will always be closed when I use Shift-F5 (this is what used to happen when I was working on my Win2000 system).
Thanks,
Kevin
|
|
|
|