|
Hi I am using writeprivateprofilestring function to update two files.
Suppose Two files are A.ini and B.ini.
First we call writeprivateprofilestring for A.ini by and After
call writeprivateprofilestring for B.ini. Both file value update successfully.
but after call writeprivateprofilestring for b.ini and system is being restart then
Only second file B.ini value is update but A.ini value is not updated
|
|
|
|
|
shivanandgupta wrote: Both file value update successfully.
How are you verifying this?
"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
|
|
|
|
|
function do well.
but in case power restart then first value is not updated
but second value is updated.
|
|
|
|
|
Hi all,
i m using Rapi function ro connect with Windows based mobile phone.
but after analysis i found this function generate problem in handling of CFilDialog,
when i use CFileDialog with Rapi function than some times CFileDialog crash with AccessViolation error.
if i use CFileDialog without Rapi Functions,than its working fine in same conditions and situations.
please help me,and provide me guidance for this.
thanks in advance.
|
|
|
|
|
Le@rner wrote: please help me,and provide me guidance for this.
You should better use your debugger for this purpose. This will give you way more information than what we could.
|
|
|
|
|
Its not crash when i run it from code,its generate problem when i run application from exe.
|
|
|
|
|
Obviously having this work under a true cross platform umbrella is beyond the topic of this message. Right now I'm curious on just how hard or if anyone has been successful in taking some of the most excellent MFC controls found here and converted them to work under wxWidgets. I'm particularly interested in the XListCtrl since that is basically a control that always wows me and I feel having something like available under wxWidgets would be awesome.
I'm not asking that others do it for me, I'm just curious on if anyone has tips on where to start first and the best method to tackle it. If it's not possible or requires to completely re-invent the wheel, then maybe it's a bit over my head.
Thanks!
|
|
|
|
|
I've been playing with wxWidgets for a year or so now but mostly just to have a GUI interface for testing my machine vision tools. I used MFC for a long time before. It should be possible to do it since it's all just programming and there seems to be a very high correspondence between MFC message handlers and the handlers in wxWidgets.
I'm not familiar with the control you mentioned but a potential problem is where the MFC class is just a wrapper for a Window's control. In that case if you're looking for a truly cross platform solution, then it gets a lot tougher since the underlying control won't exist on other platforms or if a similar control does exist, you'll have to do essentially multiple implementaions under the covers to make it transparent at the top level.
MFC being Windows specific allows you get get to and use the underlying Windows API pretty easily and depending on how much that has been done may cause problems, too.
The wonderful thing about the Darwin Awards is that everyone wins, especially the members of the audience.
|
|
|
|
|
Hello;
I am a student in software engineering. I should do a project that is maze.
a game in console32 mode that define with an 20*40 array. walls and blocks in this game should be given as an input. a 2 character worm should start from a place and finish the game in another place. This program should have a timer.
CAN ANYONE HELP ME ?!?!?
<<<i've no="" word="" to="" express="" my="" seep="" gratitude="" from="" anyone="" who="" help="" me="" in="" this="" hard="" work="">>>
|
|
|
|
|
What is your trouble about? What have you done so far? Please ask specific questions.
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]
|
|
|
|
|
CPallini wrote: What have you done so far?
Are you new around here? He has copied his homework assignment to this forum, just like all the others do, like it or not. Now, can you finish it by Monday morning? it is due in the second period.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
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.
|
|
|
|