|
I had checked everything,it is fine..
|
|
|
|
|
Try with setting 1st param to -1 instead of 0. If this doesn't help, try to output strings with TRACE and CComboBox::GetLBText.
Tomasz Sowinski -- http://www.shooltz.com ** If you're going to rape, pillage and burn, be sure to do things in that order. **
|
|
|
|
|
Can you put the code?
Reagards
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
You need to start from -1 if you want that find the string from the beginning...
Neha wrote
nIndex=m_combo.FindStringExact(0, the_resstring);
You are informing 0 and not -1....
Regards
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
Well, according to MSDN the search wraps at the end of combobox and starts from the beginning if you pass non-negative value, so it should have no effect. But it's worth trying anyway.
Tomasz Sowinski -- http://www.shooltz.com ** If you're going to rape, pillage and burn, be sure to do things in that order. **
|
|
|
|
|
hi everyone..
i am using the gridctrl from chris maunder with great success.. and i really like it.. i have made some changes, that make my life with it easier.. one of the changes requires a message to be sent to the parent window..
my question know would be, what ID should i use for my message..
chris used the LVN_ Messages (from CListCtrl i guess).. the message i am sending has got no LVN_ Counterpart, so which number should i use for this message?
* is WM_USER appropiate
* or should i adapt an LVN_ Number
i am thankful for any advice.. the only thing is that my weekend starts in one hour, and so i won't be able to thank the guys that will help me (if anyone helps me)
so.. thanks in advance, have a nice weekend
bernhard (king of sparetime and part - time programmer)
Sometimes I think the surest sign for intelligent life elsewhere in
the universe is that none of them ever tried to contact us.
|
|
|
|
|
I have a problem while creating the Bitmap for an image not displayed on my view.....
I create a Bitmap of my current view.. this is done perfectly as it takes care of the scroll position and other factors...
but i want to create a bitmap of another image, which is not displayed on my current view. While creating this second bitmap, it has to be created with reference to the scroll position of my first Bitmap ...
The object of creating this second Bitmap, is to map both index positions of the 2 bitmaps correctly, so that one bitmap can be merged into the other
Thank You
|
|
|
|
|
can anyone help me find my bug. i wrote a function that would search the tictactoe board for the best possible computer move. i am using alpha beta pruning to optimize my search. the function returns the score from the search and the row and column where the computer should move. ok here is the function... the PossiblePlayerMove function is the same thing but it searches for the best possible player move.
int CComputer::CheckForMoves(const CBoard &rConstBoard,int nDepth, int nAlpha, int nBeta, int &nRow, int &nCol)
{
// Check for invalid data
ASSERT(mnDepth >= 0 && mnDepth <= MAXDEPTH);
// Check if the row and column return is a valid value
ASSERT(nRow < MAXROW && nCol < MAXCOL);
int nScore = 0; // The score from the search
mnDepth = nDepth; // Set the Depth to the new depth.
int Row = nRow; // Copy the Row and Column
int Col = nCol;
// Create a new Board and Copy the values of other board.
CBoard Board = rConstBoard;
// Base Case
if (Winner(Board) || mnDepth == 0)
{
nRow = Row;
nCol = Col;
return Evaluate(Board);
}
else
{
// Try all the possible move on a different Board
// then return the best move.
for (int row = 0; row < MAXROW; row++)
for (int col = 0; col < MAXCOL; col++)
if (Board.IsEmpty(row,col))
{
Board.SetCellValue(row,col,'O');
if (mnDepth == 0) break;
nScore = PossiblePlayerMove(Board,mnDepth - 1,nBeta,nAlpha,Row,Col);
// Set Row and Column
nRow = Row;
nCol = Col;
if (nAlpha < nScore)
nAlpha = nScore;
Board.SetCellValue(row,col,NULL);
if (nAlpha >= nBeta) break;
}
}
return nAlpha;
}
i hope this is enough... by the way.. the possible moves function is the same thing ...
Thank you very much,
John
Aloha from Hawaii
|
|
|
|
|
hi,
dose anybody no of any code that will refresh/clear all the edit boxs, radio buttons on my dilog. By the press of one button
thanks
|
|
|
|
|
You'd need to write that yourself, becuase noone knows which edit boxes and how many are in your dialog.
Just SetWindowText() them all to a blank string.
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
www.dictionary.com
If you're using poxy DDE you can reset all your variables and call UpdateData(FALSE);
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002
|
|
|
|
|
DDE? Or DDX?
Tomasz Sowinski -- http://www.shooltz.com ** If you're going to rape, pillage and burn, be sure to do things in that order. **
|
|
|
|
|
I toyed with the two, trying to remember which is which. I changed it twice, looks like I should have changed it once.,
Whatever it's called, it's useless.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002
|
|
|
|
|
Christian Graus wrote:
Whatever it's called, it's useless.
Why is it useless ?
What don't you like about it ?
|
|
|
|
|
CG doesn't like things which don't belong to STL
Tomasz Sowinski -- http://www.shooltz.com ** If you're going to rape, pillage and burn, be sure to do things in that order. **
|
|
|
|
|
Bwhahahaha - excellent point
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002
|
|
|
|
|
The data validation rules are obtrusive and annoying. I always roll my own, because otherwise the user gets a million 'please enter a number dialogs in inappropriate times - for example if I empty the dialog I'll get one before I type in a new number.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002
|
|
|
|
|
being a beginner at this im not sure what DDE or DDx is
all i want is to reset everyting in my dilog from presing one RESET button.
I cant get the code to work.
|
|
|
|
|
DDE is Dynamic Data Exchange and it's irrelevant for this discussion.
DDX is Dialog Data Exchange and it's a MFC way of moving data between member variables of your dialog class and dialog controls.
Are you using MFC?
Tomasz Sowinski -- http://www.shooltz.com ** If you're going to rape, pillage and burn, be sure to do things in that order. **
|
|
|
|
|
yes im using Microsoft Visual c++
|
|
|
|
|
mork wrote:
yes im using Microsoft Visual c++
It doesn't necessarily mean that you're using MFC. But let's assume that this is the case. You need to use ClassWizard. On its second tab you can add member variables to your dialog class - each element you want to be cleared should be associated with variable. In your 'reset' handler you should reset the variables to appropriate initial values and call UpdateData(FALSE).
Tomasz Sowinski -- http://www.shooltz.com ** If you're going to rape, pillage and burn, be sure to do things in that order. **
|
|
|
|
|
Call UpdateData(false) from the handler for your [Reset All] button, BUT DO NOT call UpdateData(...) elsewhere in the dialog class
Nish
One Nish is trouble enough.
Imagine 16 of me, dancing wild...
:jig::jig::jig::jig:
:jig::jig::jig::jig:
:jig::jig::jig::jig:
:jig::jig::jig::jig:
|
|
|
|
|
I want to draw a rect, and then earse it, :
/////////////////////////////////////////////////
CDC* pDC = GetDC();
pDC->SetROP2( R2_NOTXORPEN );
pDC->SetTextColor( RGB(0, 0, 0) );
pDC->TextOut( rect.left + 10, rect.top+50, "hello" );
pDC->MoveTo( CPoint( rect.left, rect.top ) );
pDC->LineTo( CPoint( rect.right, rect.top ) );
pDC->LineTo( CPoint( rect.right, rect.bottom ) );
pDC->LineTo( CPoint( rect.left, rect.bottom ) );
pDC->LineTo( CPoint( rect.left, rect.top ) );
//////////////////////////////////////////////////
I can earse the rect successfully, but I cannot earse the text, what's the problem?
I'm amumu, and you?
|
|
|
|
|
No one knows?
I'm amumu, and you?
|
|
|
|
|
Hi,
I have to programmed an HTML Editor, but I don't know how to start. I need help. Plz give me some advice. Is there any control, or class to do it?
perlz.
|
|
|
|