|
plz gimme codez or u shudup!
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]
|
|
|
|
|
a-maze-ingly no.
unless you show us that you at least did something, wrote a bit of code, analyzed the problem, ...
Watched code never compiles.
|
|
|
|
|
hasani2007 wrote: CAN ANYONE HELP ME ?!?!?
Your teacher?
I'm being serious. I would hope the project is within the abilities of someone who's been paying attention during their course.
Is this an idea you thought of yourself? Is it specified homework?
Break your problem into managable bits. Can you write a console program? Have you done a timer? Refresh the screen? I wouldn't use a console for a game, but still... [*]
Can you parse input?
All these questions should be answerable for you. If not, you've chosen too challengina project, or you need to reread your notes.
Good luck,
Iain.
[*] Not since I was using vt102 terminals, anyway...
I have now moved to Sweden for love (awwww).
|
|
|
|
|
hasani2007 wrote: CAN ANYONE HELP ME ?!?!?
With what? Be specific. It is your project after all.
"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
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Hi all,
I'm new to JavaScript and Google Maps API. I got some problems but I cannot find out the reason. Hope someone can help me.
What I tried to do:
I'm trying to develop an application in MFC (Visual Studio 2005) with a html dialog showing a Google map. I will send location data from the MFC application to a JS function to calculate directions. Another JS function will return the number of routes and steps in the GDirection object. The result will be sent back as a message string. The codes I used for the HTML dialog was downloaded from CodeProject.
The problem I encountered:
If I open the html file using IE and manually input the location data and use alert function to show the message, everything works well. I can also send the location data from MFC to JS. However, after that, I cannot get the route number back... It always returns the number as "undefined".
Some codes:
function initialize() {
if (GBrowserIsCompatible()) {
map = new GMap2(document.getElementById("map_canvas"));
gdir = new GDirections(map, document.getElementById("directions"));
GEvent.addListener(gdir, "load", onGDirectionsLoad);
GEvent.addListener(gdir, "error", handleErrors);
}
}
function UpdateGPS(ar) // this is where MFC send the location data to JS
{
var a = new VBArray(ar);
var b = a.toArray();
rExp = /(\w|\s)*[^@]/ig;
var res = b[0].match(rExp); // Name @ size @ free_space
lan = parseInt(res[1]) / 1000000;
lon = parseInt(res[2]) / 1000000;
str = lan + "," + lon;
setDirections(str, "1.300983,103.772704");
}
function getRoute() // this is where JS should send information back to MFC
{
return message;
}
function setDirections(fromAddress, toAddress)
{
gdir.load("from: " + fromAddress + " to: " + toAddress, {getPolyline:true, getSteps:true, travelMode:G_TRAVEL_MODE_WALKING});
}
function onGDirectionsLoad()
{
n_route = gdir.getNumRoutes();
message = str + ". we have " + n_route + " route.";
alert(message);
}
Can someone help me here? Thanks a lot!
|
|
|
|
|
HI,
I got some code to load png image in button but it is giving error:
Could you suggest what might be the reason?
HBITMAP hBitmap;
Bitmap* bitmapfile = new Bitmap(L"test.png");
Status status = bitmapfile->GetHBITMAP( NULL, &hBitmap );
::SendMessage(m_imageBtn.GetSafeHwnd(),BM_SETIMAGE,(LPARAM)(DWORD)hHandle,0);
Error:"'Gdiplus::GdiplusBase::operator new' : function does not take 3 arguments"....
|
|
|
|
|
Googling I've found this [^] page...
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]
|
|
|
|
|
Hi,
I am working on a project, where i see a declaration of a thread local variable as below.
__declspec(thread) long g_nLock[2] = {0, 0};
And this variable is accessed with InterlockedXXX functions.
My doubt is, this variable will have the global memory local to every thread.
In that case, is it required to use InterlockedXXX functions to access the variable?
If i change the allocation and access method of this variable using TLS APIs,
do i have to take care of locking?
Thanks in advance.
Selva
|
|
|
|
|
I'm not familiar with whatever the TLS API is, but if you're accessing this variable from multiple different threads directly, you have to lock it. If you want to get around this, use only one thread to change it and post signals or windows messages to that thread telling the variable to change, that way you (probably) won't get any weird conflicts.
KR
|
|
|
|
|
You are correct, each thread will have its own copy of g_nLock that no other thread can see or modify. As such, it doesn't make sense to modify it with an Interlocked*() function.
The same would be true for any blob you associate with a TLS index via TlsSetValue().
Note: Be carefull using __declspec(thread) in dll's, read the MS docs (this may no longer be an issue in VS2010 ?).
...cmk
The idea that I can be presented with a problem, set out to logically solve it with the tools at hand, and wind up with a program that could not be legally used because someone else followed the same logical steps some years ago and filed for a patent on it is horrifying.
- John Carmack
|
|
|
|
|
|
hi
i want system Date and time with Milli second....
iam using
SYSTEMTIME st;
GetSystemTime(&st);
this one give wrong time...please any body
|
|
|
|
|
|
In the documentation for GetSystemTime[^] it states "Retrieves the current system date and time. The system time is expressed in Coordinated Universal Time (UTC).".
It's time for a new signature.
|
|
|
|
|
I use a SMTP client class in VC6 MFC project , it function , but it bother me some warnings :
:\program files\microsoft visual studio\vc98\include\utility(21) : warning C4786: 'std::reverse_iterator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const *,std::basic_string<char,std::char_traits<char>,std::allocator<char>
>,std::basic_string<char,std::char_traits<char>,std::allocator<char> > const &,std::basic_string<char,std::char_traits<char>,std::allocator<char> > const *,int>' : identifier was truncated to '255' characters in the debug information
d:\program files\microsoft visual studio\vc98\include\utility(21) : warning C4786: 'std::reverse_iterator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > *,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std
::basic_string<char,std::char_traits<char>,std::allocator<char> > &,std::basic_string<char,std::char_traits<char>,std::allocator<char> > *,int>' : identifier was truncated to '255' characters in the debug information
and I have #pragma warning(disable:4786) in top of file , but obvious don't function ..... how to solve these warnings ?
|
|
|
|
|
I want to do this without lowering my compiler warning level , if is posible ...
|
|
|
|
|
It is a bug in VC6. For more information see here[^].
|
|
|
|
|
Thanks , I solved the problem inserting
#pragma warning(disable:4786)
before to
#include <vector>
this class use
std::vector <std:string> Attachement;
could I fix the problem without '#pragma warning(disable:4786)' ?
|
|
|
|
|
mesajflaviu wrote: #pragma warning(disable:4786)
This would be better:
#if _MSC_VER <= 1200
#pragma warning(disable:4786)
#endif
Don't inflict hacks on compilers that don't need them.
Steve
|
|
|
|
|
mesajflaviu wrote: could I fix the problem without '#pragma warning(disable:4786)' ?
IMO, No.
This warning is caused by STL itself and you can disable it only for STL headers. See this[^] article for details.
|
|
|
|
|
How to load Png image on the button control in MFC application.
Can anybody send me some source code, please..
Thanks..
|
|
|
|
|
See answer to the message below.
It's time for a new signature.
|
|
|
|
|
Hi want to create a button on which three png images will be there, one image for the reght side corner, one for the left side corner and one strip from the middle will be there, the middle strip I have to render according to length of the button( as button length will be changeable according to the button text(for multi language support)). I did that with .bmp file but I want to know how I can do with png file. one png Image I am able to add, but how to add all three?
Please help..
Thanks..
|
|
|
|
|
You have already been given the answer here[^], which part of the suggested solution are you having difficulty with?
It's time for a new signature.
|
|
|
|
|
Hi all,
When i m trying to open CFileDialog my application becomes not responding and gives this error
unhandled exception in test.exe (SECUR32.dll): 0xC0000005 Access Violation
and poiint out in Disassembly"75DD21DC push dword ptr [edi+0Ch]"
and in call stack "SECUR32! 685f21dc()"
i m using this code for CFileDialog
CFileDialog fDlg(FALSE, NULL,NULL, OFN_PATHMUSTEXIST | OFN_OVERWRITEPROMPT,"Text Files (*.txt)|*.txt||");
if (fDlg.DoModal () == IDCANCEL)
return;
please help me how can i resolve it.
thanks in advance.
|
|
|
|