|
I am drawing the text using gdi plus . How can I change the text outline width and text outline color
Trioum
|
|
|
|
|
Gdiplus::GraphicsPath::AddString
Gdiplus::Graphics::DrawPath
logics
|
|
|
|
|
Hi All
i am useing Edit box for display some values.Values enter in Edit box at the run time.I want to prevent enter duplicate values in edit box.I am useing this code for enter a values
if(m_str.Trim().IsEmpty())
{
SetDlgItemText(IDC_EDIT_DIR_TO_MONITOR,b);
}
else if(m_strDirectoryToMonitor2.Trim().IsEmpty())
{
SetDlgItemText(IDC_EDIT_DIR_TO_MONITOR2,b);
}
Plz help me
|
|
|
|
|
What has to do your code with duplicate values?
What is b ?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I have no idea how to remove duplicate values?
B is a String type variale which have some values.
Plz help me
|
|
|
|
|
You know an edit box can have just 1 value at time, hence how can be duplicate values?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Different Edit box have same value.Like that
Edit a1="a"
Edit a2="a"
Just i don't want to store a2="a". So how can i remove sir
|
|
|
|
|
Well, it is not difficult: compare the two strings, if they're equal prompt an error message to the user. What is your trouble about?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
You can use of CString:Find and if result is ok you can use of your code.
|
|
|
|
|
Thanks every body
|
|
|
|
|
I glad our answers was helpful for you.
|
|
|
|
|
when calling the win32 dialog box function I got the error code using GetlastError() function
1814
DialogBox(NULL,(LPCTSTR)IDD_DIALOG1,hwnd,(DLGPROC)DialogProc);
id = GetLastError();
id =1814
how to solve the problem
Ashish
|
|
|
|
|
ashishmax47 wrote: DialogBox(NULL,(LPCTSTR)IDD_DIALOG1,hwnd,(DLGPROC)DialogProc);
Change to
DialogBox(NULL, MAKEINTRESOURCE(IDD_DIALOG1), hwnd, (DLGPROC)DialogProc );
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Still getting the same error
Ashish
|
|
|
|
|
Well, then just make sure you have the corrensponding dialog resource (i.e try for instance with IDD_ABOUTBOX if you have one).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
1814 means "The specified resource name cannot be found in the image file."
Pass a valid HINSTANCE as the first parameter.
|
|
|
|
|
Check whether IDD_DIALOG1 is a valid dialog ID and make a "Rebuild all".
Greetings from Germany
|
|
|
|
|
Check this:
DialogBox(AfxGetApp()->hInstance,(LPCTSTR)IDD_DIALOG1,hwnd,(DLGPROC)DialogProc);
|
|
|
|
|
using System;
using System.Collections.Generic;
using System.Text;
public class Minimax
{
static void Main(string[] args)
{
// generate a simple game tree, starting with the root
Tree tree = new Tree(0);
// children of the root
tree.children = new Forest(new int[] { 0, 0 });
// children of the left child of the root
tree.children.first.children = new Forest(new int[] { 0, 7, 9 });
// children of the right child of the root
tree.children.rest.first.children = new Forest(new int[] { 4, 8, 6 });
// children of the leftmost child of the left child of the root
tree.children.first.children.first.children = new Forest(new int[] { 5, 3, 1 });
// write the expected and calculated minimax values to the console
Console.WriteLine("Expected minimax value is 5");
Console.WriteLine("Calculated minimax value of the tree " + tree.Minimax(true));
//Console.Write(tree.children.first);
Console.WriteLine("Press any key to exit ...");
Console.ReadKey();
|
|
|
|
|
This is the Visual C++ forum, so please post your question in the C# forum.
|
|
|
|
|
please adhere to the forum rules and regulations.
|
|
|
|
|
On an existing MFC Application, that used to work just fine when compiled with VS 2003, I get now a crash on exiting the application when compiled with VS 2005, SP1, under XP-SP2.
The crash points to MFC80.DLL, trying to step through the debugger just tells me it is outside of the application, with ATLASSERT() inside CstringData in the method Release().
Hope someone can help me out here…
Cheers
Alex
|
|
|
|
|
AlexEvans wrote: with ATLASSERT() inside CstringData
What's the code at the assertion? Seems you have a CString getting
messed up somewhere.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi MArk,
Really apprecite you taking the time to try help me out here.
As I step through the code - in the last stage of exisiting, inside my "OnDestroy"
void CMainFrame::OnDestroy()
{
CFrameWnd::OnDestroy();
}
The debuger stops on the following "ATLASSERT()", obviously it expects nRefs to equal zero, and it is not so, but what does it refer to, I have no idea, or how do I find out either. This is inside "ATLSIMPSTR.H", ad I suspect it was there before, but VS 2003 was more forgiving...
void Release() throw()
{
ATLASSERT( nRefs != 0 );
if( _AtlInterlockedDecrement( &nRefs ) <= 0 )
{
pStringMgr->Free( this );
}
}
My application's name is MDPD.EXE - here is the call stack dump at the point of the crash...
mfc80d.dll!ATL::CStringData::Release() Line 107 + 0x3 bytes
mfc80d.dll!ATL::CSimpleStringT<wchar_t,1>::~CSimpleStringT<wchar_t,1>() Line 287
mfc80d.dll!ATL::CStringT<wchar_t,StrTraitMFC_DLL<wchar_t,ATL::ChTraitsCRT<wchar_t> > >::~CStringT<wchar_t,StrTraitMFC_DLL<wchar_t,ATL::ChTraitsCRT<wchar_t> > >() Line 1260 + 0x8 bytes MDPd.exe!`dynamic atexit destructor for 'RL7''() + 0x2b bytes
msvcr80d.dll!doexit(int code=0, int quick=0, int retcaller=0) Line 553
msvcr80d.dll!exit(int code=0) Line 398 + 0xd bytes
MDPd.exe!__tmainCRTStartup() Line 610
MDPd.exe!WinMainCRTStartup() Line 414
|
|
|
|
|
There's a CString being destructed twice.
AlexEvans wrote: destructor for 'RL7''() + 0x2b bytes
What is "RL7"? Is that possibly the name of the CString object?
If so, that's the one you want to look through your code for and
make sure it's only destroyed once.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|