|
This looks like a very complicated way to start a Windows application. Why not just use the standard Framework - View model that has been used since Windows first appeared?
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
I want to call this dialog from another mfc application, it loads fine working properly. only the toolbar is not coming.
|
|
|
|
|
It's difficult to suggest anything but it may have something to do with the RepositionBars() calls. You should try a bit of debugging to see what is happening at each step in this function.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
I wanna to print
utf-8 string in cmd via C++/C.
How ?
|
|
|
|
|
Your question is not very clear, please try and add some more detail. Or do you just mean that you want to use a printf() statement in a console application?
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
I have this code in C++ but it give the error:
Please Help :
#include <iostream>
#include <conio.h>
#include<string.h>
#include<fstream>
#include <sstream>
#include<wchar.h>
using namespace std;
int main( void )
{
char ch;
wchar_t c;
wstringstream o;
wstring wstrIn;
const char* pFile="test.txt";
FILE* in;
in=fopen (pFile,"rb");
if(!in)
{
cout<<"Error."<<endl;
exit(0);
}
int i=0;
int len=sizeof(wchar_t);
c=fgetwc(in);
while(c!=0xFFFF)
{
c=fgetwc(in);
o<<c;
}
wstrIn=o.str();
fclose(in);
getch();
}
The Error Is :
`wstringstream' undeclared (first use this function)
|
|
|
|
|
What compiler are you using?
Why are you mixing 'old style' headers with new ones?
Veni, vidi, vici.
|
|
|
|
|
I am Using
Bloodshed Dev-C++<br /> for compiling . So Plz Help.
Thanks for Reply.
|
|
|
|
|
MingW (used by Dev C++ ) had issues with wstringstream (see, for instance, here[^]). I don't know if they are fixed now (and I don't know which version you have).
You may also try a different IDE , like Visual C++ Express Edition[^].
Veni, vidi, vici.
|
|
|
|
|
#include "iostream"
int main(int argc, char* argv[])
{
std::cout << "utf-8 string in cmd";
return 0;
}
Independent ACN Business Owner- Check out the possibilities for your future!
- Financial independance
- Full time or Part time
- In more than 20 countries through North America, Europe, Asia and the Pacific
- Featuring the ACN IRIS 5000 video phone. See the person you are talking to.
Within you lies the power for good - Use it!
|
|
|
|
|
<pre lang="c++"><code>
#include "iostream"
int main(int argc, char* argv[])
{
std::cout << "سلام";
return 0;
}</code>
No use!
Please Help.
|
|
|
|
|
The problem is not how to display your text with C/C++, but rather how to get the console to use a font that is able to display your text. I do not know the answer for that one.
Independent ACN Business Owner- Check out the possibilities for your future!
- Financial independance
- Full time or Part time
- In more than 20 countries through North America, Europe, Asia and the Pacific
- Featuring the ACN IRIS 5000 video phone. See the person you are talking to.
Within you lies the power for good - Use it!
|
|
|
|
|
I wanna to print <big>"سلام"</big> in Console App!
Via Bloodshed Dev-C++
|
|
|
|
|
Hi all,
Is it possible that i create a dll in mfc and then call it functions in c# code
Thanks in advance
|
|
|
|
|
try this link [^]
Every new day is another chance to change your life.
|
|
|
|
|
I created a view and on a button click of that view I am opening a folder dialog.
When I Destroy that view using Back button, control does not come back from DestroyWindow() function.
If I dont click "folder dialog open button" it s working fine.
code is here:
CString CRecoverFoundFileDlg::GetDestinationPath()
{
CString szPath;
BROWSEINFO bi = { 0 };
TCHAR path[MAX_PATH];
bi.lpszTitle = _T("directory");
bi.pszDisplayName = path;
LPITEMIDLIST pidl = SHBrowseForFolder ( &bi );
if ( pidl != 0 )
{
szPath= path;
IMalloc * imalloc = 0;
if ( SUCCEEDED( SHGetMalloc ( &imalloc )) )
{
imalloc->Free ( pidl );
imalloc->Release ( );
}
}
return szPath;
}
|
|
|
|
|
John,
When you ask for help it is very important to use the same verbiage as your peers and be very detailed.
john5632 wrote: When I Destroy that view using Back button, control does not come back from
DestroyWindow() function.
When you say that 'control does not come back' are you referring to application focus or something more?
Best Wishes,
-David Delaune
|
|
|
|
|
Have you initialized COM (using something like CoInitialize() or OleInitialize() )?
john5632 wrote: szPath= path;
Should you be calling SHGetPathFromIDList() here?
"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
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
I've got a dialog-based app that has two buttons: one button spawns a modal dialog, the other button spawns a property sheet (with multiple pages). The background color of the dialog is RGB(240,240,240) . The background color of the property pages are RGB(255,255,255) . Why the difference? I know there are a few settings in the .rc file that need to be changed when creating a property page, but so far none of the ones I've changed have made a difference.
"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
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
It's not clear what you want to do. Do you want to make them both the same, and no matter how you adjust the RC file, they don't come out the same?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Yes, I'd like them both to be the same as the dialog. I can add a WM_CTLCOLOR handler to each of the property pages, but that seems like overkill.
"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
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
These are the default colours for the controls in question. If you want them changed then you will need to subclass them and add your own handler for background paint events.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Hi Richard. I'm not wanting to change the color of the controls, only the background color of the property page. I can do this in the page's WM_CTLCOLOR handler, but it just didn't feel right. Since CPropertyPage is derived from CDialog , I guess I was just expecting them to have the same background color.
"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
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
DavidCrow wrote: Since CPropertyPage is derived from CDialog ,
And its 'parent' CPropertySheet [^] derives from CWnd , which is probably why they take the colour that they do. I agree it's somewhat confusing, but I'm sure Microsoft can explain why they did it this way.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
David,
I don't understand your question. Those colors have always been a part of your window theme[^]. Microsoft window controls use the GetSysColor function[^] for choosing colors for the controls associated with the default window classes.
DavidCrow wrote: The background color of the dialog is RGB(240,240,240) .
I am not on your computer so I do not know what window theme you are using. However for the last 20 or so years the dialogs have always used the GetSysColor(COLOR_3DFACE) for the dialog background.
DavidCrow wrote: The background color of the property pages are RGB(255,255,255) .
Again, this has always been dependent on your windows theme and the property pages are probably using GetSysColor(COLOR_WINDOW) which happens to be 255,255,255 (or a softer shade of white) in most of the window themes I have seen.
Who are you and what have you done with the real David Crow? We demand that you release him.
Best Wishes,
-David Delaune
|
|
|
|