|
The debugger as first aid. Then us. But you should provide us detailed info coming from the first aid tool.
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]
|
|
|
|
|
Thanks Pallini.....
am building my clint it ll take another 30 min get up... in the mean time can you tell me what are the possible senarios when thye function
Var = pField->GetValue();
can fail ..
Thanks alot....
vikas da
|
|
|
|
|
tasumisra wrote: in the mean time can you tell me what are the possible senarios when thye function
Well, this is your task, read the documentation.
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]
|
|
|
|
|
Hello,
I have a CRichEditCtrl on a CMdiChildWnd which works as an edit box on the window.But I am not able to change the color of the text in the edit box but the background color can be changed with the following.
CRichEditCtrl *T2;
COLORREF C(250);
CDC *c = T2->GetDC();
T2->Create(this,Rect2,false);
T2->SetBackgroundColor(false,C);
Thanks
Prithaa
|
|
|
|
|
Use
m_cfDefault.crTextColor = color;
m_T2->SetSelectionCharFormat(m_cfDefault);
where
CHARFORMAT m_cfDefault;
|
|
|
|
|
Hello,
Thanks,
When I do the above the color doesn't change but I get the strike out effect.
CHARFORMAT m_cfDefault;
m_cfDefault.crTextColor = RGB(0,125,0);
T1->SetSelectionCharFormat(m_cfDefault);
Thanks,
Prithaa
|
|
|
|
|
Hi,
Is there any win32 API available for date calculation?
All i need is, once the system date time is read (for EX: Mon, 10 Nov 2008 11:11:20) from this we need to add 72 hours, and the time after 72 hours should be Thu, 13-Nov-2008 12:11:20.
I am able to get the current time from system. But i like to know how to calculate date and time after 72 hours. Is there any API available for this?
Mon, 10 Nov 2008 11:11:20 - This I am able to get from system.
Thu, 13-Nov-2008 12:11:20 - I need to calculate for this date and time (that I should after 72 hours)
Can anyone help me in this regards.
-Nanadu
|
|
|
|
|
The solution is as follows.
<code>
int main()
{
time_t now = time(0);
int number_minutes=72*60;
tm* localtm = localtime(&now);
cout << "The local date and time is: " << asctime(localtm) << endl;
now += (60 * number_minutes);
struct tm* localtm_edited = localtime(&now);
tm* localtm_edited = localtime(&now);
cout <<"The local date and time i is: " << asctime(localtm_edited);
}
return 0;
}</code>
<div class="ForumSig">Somethings seem HARD to do, until we know how to do them.
;-)_AnShUmAn_
</div>
|
|
|
|
|
the "localtm_edited" redefinition..
|
|
|
|
|
is there some error you get? Please check you have not define localtm_edited variable twice in your code.
Some things seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Thanks, its working fine.
Similarly is there any way to give the time as input and get the out put calculated for next 72 hours.
For Example in-put will in the format "Thu, 13 Nov 2008 12:11:20 GMT" and i need the out-put as "Mon, 10 Nov 2008 11:11:20 GMT", this is calculated for next 72.
Is it possible to give in-time and get calculated for next 72 hours?
-Nandu
|
|
|
|
|
Just out of curiosity, why do you repeat same question 3 times
-Saurabh
|
|
|
|
|
Can someone help me?
i am making a app. and i want to heave my custom skin on it.
|
|
|
|
|
|
|
Hi friends, I have a query regarding display of image from remote machine.
In the current scenario we are displaying images from remote machine by copying the files from remote machine to local machine and displaying them using "MoveFile" method. But I can see in the preview b/w image to image there is a time delay of 10 sec
To be more specific:
I have 10 file paths of remote machine and I need to display preview of the images so we are copying files from remote machine to local machine using "MoveFile" after the preview of first image there is a time delay of 10sec to preview second image as it's being copied from remote machine. Is there any better method to reduce the time delay? or is it better to access the images directly from remote path and display instead of copying it to local machine?
Please do let me know your suggestions
|
|
|
|
|
Please do reply your suggestions
|
|
|
|
|
Super Hornet wrote: displaying them using "MoveFile" method
Huh? MoveFile displays images?
Super Hornet wrote: is it better to access the images directly from remote path and display instead of copying it to local machine?
Why don't you try it?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi all,
I want to add String, long value pair in a map. I've done it as follows.
<br />
string user_key[5] = {"cocacola", "pepsi", "cocacola", "mango", "pepsi"};<br />
unsigned long comm_val[5] = {25, 45, 24, 67, 98};<br />
<br />
map<const string, unsigned long> comm_map;
map<const string, unsigned long>::const_iterator iter;<br />
<br />
for(int i = 0; i < 5; i++)<br />
{<br />
iter = comm_map.find(user_key[i]);<br />
<br />
if(iter == comm_map.end())<br />
{<br />
comm_map.insert(pair<const unsigned="" long="">(user_key[i], comm_val[i]));<br />
}<br />
else<br />
{<br />
comm_map[user_key[i]] = comm_val[i];<br />
} <br />
}<br />
</const>
Actually in my application, this map updated around every 30 milliseconds. I mean every 30 milliseconds data is send to the map. It's fine so far.
But what I need to do is, regularly I want to send map content to a XML file. My question is, at the XML write time I want to stop updating the map. Otherwise data can be loss or some other effect. How can I avoid this? Using a flag?
Any comments,
Thanks
I appreciate your help all the time...
CodingLover
|
|
|
|
|
|
Actually I want to avoid threads and achieve for a best.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
Read this[^] regarding synchronization.
|
|
|
|
|
Hi everyone.
Please guide me how I can save following information in a bit Array.
I have different level context Menu. I want to store level information, Item ID, Position and Enable/Disable in one bit sequence.
For example:
241 ID_FILE_PRINT 3 1
2 is First Menu
4 is Sub Menu of First Menu
1 is Sub Menu of Sub Menu at 4
ID: ID of Item
3 is position at Sub Menu 1
1 is enable/disable bit
Please guide me how can i store all the information in an bit Array. How can i get specific value out from the built bit sequence.
Your help is highly appreciated.
Thank you.
|
|
|
|
|
The modern C++ way to do this with is with C++ Bit Fields.[^]
Here is an example:
typedef struct _BitArray
{
unsigned bit1:1;
unsigned bit2:2;
unsigned bit3:3;
unsigned bit4:4;
unsigned bit5:5;
unsigned bit6:6;
unsigned bit7:7;
unsigned bit8:8;
} BitArray, *LPBitArray;
TRACE1("Size of type = %d",sizeof(_BitArray));
BitArray b = {0};
b.bit1 =1;
Best Wishes,
-David Delaune
|
|
|
|
|
Thank You Dear.
destined to win
|
|
|
|