|
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
|
|
|
|
|
This is mixture of a C and a Visual Studio (2008 SP1) question. On a dialog I have a static control that is 1 DLU tall (I have to use Notepad to obtain this height) by several DLUs wide. It is acting as a horizontal line. It has an ID of IDC_STATIC_LINE . When I do certain things on that dialog (e.g., add other controls, move controls around, change tab order), the static control reverts back to 8 DLUs tall. Any ideas why?
- DC
"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
modified 9-Mar-12 9:22am.
|
|
|
|
|
I've never seen that.
(in the resource editor)
Is it possible that it gets "glued" to some guidelines ?
Check in notepad if there's a "GUIDELINES" section in the resource file, and remove all the section.
for example :
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO
BEGIN
IDD_ABOUTBOX, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 163
TOPMARGIN, 7
BOTTOMMARGIN, 55
END
IDD_TEST_DIALOG, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 313
VERTGUIDE, 40
VERTGUIDE, 84
VERTGUIDE, 226
VERTGUIDE, 258
TOPMARGIN, 7
BOTTOMMARGIN, 193
END
END
#endif // APSTUDIO_INVOKED
Watched code never compiles.
|
|
|
|
|
The control is just out in the open, all by itself. It's several DLUs away from any edge.
"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
|
|
|
|
|
What is the actual definition of the control as it exists in your .rc file? It may help if you paste the entire dialog definition here.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Here it is. The 1 in the highlighted line will change to an 8 on occassion.
IDD_USERBUTTONS_PAGE DIALOGEX 0, 0, 274, 298
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Buttons"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
PUSHBUTTON "Load New User defaults",IDC_BTN_LOAD,94,7,86,14
LTEXT "",IDC_STATIC_LINE,7,27,260,1,SS_SUNKEN
LTEXT "Current buttons:",IDC_STATIC,7,34,55,8
...
END
"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
|
|
|
|
|
In VS2008.
just pasted that line in one of our dialog and I observe the same behaviour; and when I edited the resource in the resource editor, I cannot resize it to one line (even after setting the SS_SIMPLE property.
Watched code never compiles.
|
|
|
|
|
David,
You failed to mention which version of the Microsoft IDE you were using. Therefore I have tested both (fully patched) VS2008-SP1 and VS2010-SP1 and do not experience the behavior you are describing. My test method is to simply create a default MFC dialog project... paste your dialog resource fragment into the .rc file and #define all of the control ID within the resource header. I am able to add/subtract controls and modify the tab order and the static control keeps its height.
It looks like I have added 24 HotFixes to the VS2008 along with latest SP1. You might want to browse all of the HotFixes to see if this issue has been previously addressed: http://connect.microsoft.com/VisualStudio/Downloads[^]
Best Wishes,
-David Delaune
|
|
|
|
|
Randor wrote: ...and the static control keeps its height.
Mine did too for quite a while. Out of the blue, however, it would revert back to its original size.
This is also an issue with VS6. I guess ~10 years is not enough time to get it fixed!
"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
|
|
|
|