|
Have you considered using _getche() ? That way you can control exactly how many characters, and which ones, are entered.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi all!
I've a dialog, in the function : DoDataExchange(CDataExchange* pDX)
DDX_Control(pDX, IDC_BMP_NEW, test);<br />
in OnInitDialog():
DWORD dwStyle = WS_VISIBLE|SS_BITMAP|SS_NOTIFY;<br />
cRect.SetRect( 0, 0, 17, 15 );<br />
m_csNew.Create(NULL, dwStyle, cRect, this, IDC_BMP_NEW);
m_bmp.LoadBitmap(IDR_BMP_NEW1);
m_csNew.SetBitmap(HBITMAP(m_bmp));
.h file :
CRect cRect;<br />
CStatic m_csNew;<br />
CBitmap m_bmp;<br />
CMyClass test;
anf, finally, i get a error when i compile :
Debug Assertion Failed!
...
File : wincore.cpp
Line : 312
Do u see my pb?? Help me
PS: when i delete DDX_Control(pDX, IDC_BMP_NEW, test);
--> it's OK, but i have any actions!
I think, we have to declare m_csNew.Create(...) before DoDataExchange , but i don't know how to do it
|
|
|
|
|
thanh-hai.bui wrote:
i get a error when i compile :
Debug Assertion Failed!
Assertions happen at run-time not compile-time.
thanh-hai.bui wrote:
File : wincore.cpp
Line : 312
Have you set a breakpoint on line 312 of wincore.cpp?
thanh-hai.bui wrote:
PS: when i delete DDX_Control(pDX, IDC_BMP_NEW, test);
--> it's OK, but i have any actions!
From the code snippet you've provided, two CStatic variables (m_csNew and test ) are being mixed. If you already have a static control as part of the dialog template (test ), why are you creating another at run-time (m_csNew )?
Unless you are bent on using a static control to display the image, why not just use a picture control. It's much easier and doesn't require any code.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
hi,
i am learning c code, and i am looking for a function 2 calculate the short way in a map, does anyone have such function, thx
|
|
|
|
|
isn't the shortest way between two points the line ?
;P
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
I think we were thinking the same thing
|
|
|
|
|
yep,i mean there are lotz of points, find the shortest way bewteen 2 points
|
|
|
|
|
I think this will depend a lot of how your map is implemented. You know, if I had to respond to your question like it is asked, the response is simple: it's the straigh line !! But I suppose it's not the solution you want to hear isn't it ? So try to be a little bit more precise...
You can also look for the A* pathfinding algorithm (a google search gave me these links[^]
Maybe it will be helpfull...
|
|
|
|
|
first of all, i am using dos
second , there a lot of points, there r different distance bewteen 2 points, and i need a function 2 calculate the shortest path bewteen 2 given points
|
|
|
|
|
THX FOR THE HELP!!!!!!!;);););););););););)
|
|
|
|
|
BY THE WAY, DO U HAVE THE SOURCE CODE FOR C OR C++, THX
|
|
|
|
|
I have implemented this algorithm but for a specific application (a game in fact). But I was using hexagonal cells and the distance between two 'cells' was always 1 in my case.
So I think your implementation will be very different... But I can send you what I've done if you want to have an example... I don't have it here so I will send it to you when I'm back home. Just give me your e-mail adress.
Also, there are plenty of examples on the web and I think once I saw an example that was describing exactly the scheme you are asking for: the distance between two points is not equidistant (and there you'll have to play with the weight of the path between the two points).
|
|
|
|
|
THX, MY EMAIL IS zhuangfanyin@hotmail.com
|
|
|
|
|
u might want to take a look at dijkstra's algorithm. google it and take the first link.
|
|
|
|
|
Hello,
How to set text vertically in a Microsoft FlexGrid cell?
TIA,
Regards,
Jahfer V P
|
|
|
|
|
I'm trying to programmatically adjust the playback volume of media files. Let's say u simultaneously play two .mpg files, one file plays at a very low volume, and the other plays at a very high volume.
does anyone know how the playback could be adjusted to 'equalize' the playback volume? without adjusting the device_volume, of course...
(currently using directshow, but any solution is welcome)
thanks
|
|
|
|
|
Hello. When i use .Net Framework 1.1 and i add any key event in text box. In program while i press ENTER, i hear a sound. Hod do i disable sound or override it?
I Use c++ and .NET Framework 1.1.4322
|
|
|
|
|
I have found a workaround. In keyPress event there should be e->Handled = true;, note that it can block all keys when active, so you must add at the end
if (e->KeyChar == 13)
{
e->Handled = true;
}
I also notice that this post shoud be in .NET Framework or in managec c++ catagory
|
|
|
|
|
I can’t open a workspace in VC Project by Windows Visual Studio .NET .
When I open project, .NET shows “the project is version 7.1, you can only open version 7.0”.
What needs to be done in this regard.
laiju
|
|
|
|
|
Hello guys,
Requirement:My Application should work with any baudrate starting from 01- 256k ideally and i need to implement for 76800 baud with out fail.
Constraint:We are able configure the bauds from 0 - 9600 (all the numbers), 10400,14400,19200,38400,56000,57600,etc..... when i give different baudrate from the above list, the error comes is Invalid Parameter.
Question: Is there any work around to overcome this constraint.It's really urgent.
can someone through light on this.????
Thanks in advance.
Adi
|
|
|
|
|
|
Hi All
I need to store upto 3000 characters of text in a variable
CString is not quite big enough.
Can any one offer any aletrnative solution ? or a way i could
hold that much info in a single var
thanks
si
|
|
|
|
|
You're doing something wrong. A CString can hold up to 2 billion characters.
------- sig starts
"I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
John Simmons / outlaw programmer wrote:
You're doing something wrong. A CString can hold up to MAX_INT (2 billion) characters.
any idea what then ? all i am doing in copying the text from an edit control
to a CString, but it doesnt copy all the text from the edit control
ta
si
|
|
|
|
|
Write exactly what you are doing, it will be easier to tell you whats wrong when i look at the code
m0n0
|
|
|
|