|
This is the most likely cause... at least for the first error... +5 (+10 if I could )
|
|
|
|
|
Thanks but you're too kind. Errors such as this are basic stuff that the average developer should be well able to diagnose; especially if they are being paid for their work.
|
|
|
|
|
You're very welcome and very true about the being paid part...
|
|
|
|
|
Your use of MFC can be either way. But the restriction is that for both projects, the use must be the same. So even though you have a static library project, it may use or include MFC either statically or dynamically. Regardless of which of those two settings you apply to your static library project, you must apply the same setting to your second project that is linking with your static library.
Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]
|
|
|
|
|
Hello Friends
I want to know about lay out diagram of an application.My Application is having One main Toolbar with Some buttons and have four Other toolbar having around 20 controls in those toolbars.
For each Toolbar ,I created a separate dll. Main toolbar Will consist of main.Now,i want to know that how can i use four other toolbar dlls in main so that
1)if i want to remove one of four toolbar i remove that dll and it doesnt affect whole application.
2)And I want to initialize those four toolbars only one time and want to use their values in between four toolbars and main toolbars,like static.
3)want to consider memory and other speed issues.
Thanks In Advance.
Regards
Yogesh
|
|
|
|
|
So that's getting on for 100 controls, which is far more than the average user can handle. You may want to consider:
1. Looking at the Windows Ribbon Bar - see Michael Dunn's Ribbon series[^].
2. Redesigning your application to reduce the number of tools required in toolbars.
|
|
|
|
|
Hello,Thanks for Reply.
i am using Ribbon Toolbar for this but i want to know that How do i link all these dlls.
Which Architecture should I follow?
Regards
Yogesh
|
|
|
|
|
yogeshs wrote: Which Architecture should I follow?
The architecture of the Ribbon Toolbar, as referred to in the link in my previous message.
|
|
|
|
|
Hi,
I am using CRichCtrl for displaying text. I have data in columns.
It is coming is correct format. But If line is having a space in starting then It is not displaying the space because of that my formatting is not coming correct.
If data is
10
9
it is displaying like
10
9
I can no not use Right aligned becuase my other data will get spoiled.
Please suggest.
|
|
|
|
|
john5632 wrote: I am using CRichCtrl
I assume you actually mean CRichEditCtrl[^]. In order to line up columns you need to use a fixed width font for that field; see the difference as follows (I use the character i in order to demonstrate the width clearly:
10
i9 - variable width
10
i9 - fixed width
|
|
|
|
|
You are right its CRichEditCtrl.
Please suggest me which fixed width font I need to use?
|
|
|
|
|
john5632 wrote: Please suggest me which fixed width font I need to use?
Use whichever one offers the clearest type for you and your users.
|
|
|
|
|
john5632 wrote: I am using CRichCtrl for displaying text. I have data in columns.
Wouldn't a grid or list control be better suited for this?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Some people are making such thorough preparation for rainy days that they aren't enjoying today's sunshine." - William Feather
|
|
|
|
|
Hi All,
I have two project one in mfc and othe in Win32
from MFC project i create on .cpp file that used in win32 API application
so i want to execute MFC application first and on the click of OK i want to execute WIN32 API application
|
|
|
|
|
Ok. But where are you stuck??
Every new day is another chance to change your life.
|
|
|
|
|
Thanks for reply becouse for lots of trial i get first reply
now my problem is strait forward
i have two application on depend on another
like
i have mfc application for user selection to generate some data to create .cpp file
now this .cpp file used by WIN32 API project to create a Win32 api exe my second project.
my concern only with win32 exe not with MFC exe so
i want to execute win32 exe after mfc application selection complete
|
|
|
|
|
Coder Block wrote: i want to execute win32 exe after mfc application selection complete
Yes but again, what is your problem? You want to do something after some other event, so add some code to your MFC app to start the second app at the appropriate time.
|
|
|
|
|
Coder Block wrote: so i want to execute MFC application first and on the click of OK i want to execute WIN32 API application So have you tried using ShellExecute() or CreateProcess() ?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Some people are making such thorough preparation for rainy days that they aren't enjoying today's sunshine." - William Feather
|
|
|
|
|
Your question is not clear, those two should work fine side by side and interchangeably. MFC is based around the Win32 API, although you can't call MFC directly in a pure Win32 application without including the necessary libraries and linking the associated compiled MFC libraries.
|
|
|
|
|
Hi,
I would like to convert this function from C to C++.I attempted the conversion below, but not sure if I got it correctly.
- note: debugger would crash at msg[i] = nul in the c-like code.
-I also have the feeling this function can be written in 2 lines with strings!
Thanks
#define NUL 0
char z_buf[4095]
void replace_html_delimiters(char *msg)
{
for(i=0; ; i++)
{
if(msg[i]== NUL)
break;
if(msg[i]=='<')
{
msg[i] = NUL;
strcpy(z_buf,msg);
strcat(z_buf,"<");
strcat(z_buf,msg+i+1); strcpy(msg,z_buf);
}
}
}
//C++
<pre lang="c++">
#define NUL 0
char z_buf[4095]
void replace_html_delimiters(string msg)
{
for(i=0; ; i++) //Why no upper limit here?
{
if(msg[i]== NUL)
break;
if(msg[i]=='<')
{
msg[i] = NUL;
strcpy(z_buf,msg.c_str());
z_buf += "<";
strcat(z_buf,msg.rightOf[i]);
strcpy(msg,z_buf);
}
}
}</pre>
modified on Wednesday, September 14, 2011 2:30 PM
|
|
|
|
|
You could do it like this:
string replace_html_delimiters(string msg)
{
for(int i=0;msg[i];i++)
if(msg[i] == '<')
msg.replace(i,1,"<",0,4);
return msg;
}
The msg[i] == NUL has been moved to the for-loop and the replace[^] function is used for replacing '<'-characters with & l t ;.
Note that unlike with a char array, a string will not be modified when passed to a function like this. I solved this by returning the output string, but you could also convert your function to accept a string pointer as argument.
modified 13-Sep-18 21:01pm.
|
|
|
|
|
Great, I think this is what I needed. I ma not sure about the for(int i=0;msg[i];i++)
as a terminating condition. Did you mean to put something else instead of msg[i]?
|
|
|
|
|
when msg[i] = 0, the loop will stop. ('false' = 0, in C/C++)
|
|
|
|
|
for(int i=0;msg[i]=0;i++) crashes.
for(int i=0;msg[i] !=' ';i++) seems to be okay.
|
|
|
|
|
Software2007 wrote: for(int i=0;msg[i]=0;i++) crashes.
msg[i]=0 is an assignment. (sorry, i wasn't speaking C, when i typed it, in my comment above)
'msg[i]' in a conditional is equivalent to 'msg[i]!=0'
|
|
|
|