|
Did you see Database section on the codeproject?
|
|
|
|
|
Hi Hamid!
Do you know any body from "Kermanshah".
I think I know you.
Inform me at info@parasum.com
|
|
|
|
|
Usef Marzbani wrote: Do you know any body from "Kermanshah".
No,but some members on the codeproject are of ir.
Usef Marzbani wrote: I think I know you.
Maybe you asked questions here and I answered to them.
|
|
|
|
|
Here is an example:
I have 2 files
HtmlHelp.h
htmlhelp.lib
in directiry
D:/Develops/VisualCPP/Lib/Microsoft/Help/
I add director
D:/Develops/VisualCPP/Lib/
as "include files" and "library files" in VC options.
so the include can use related path in the way:
#include "Microsoft\Help\HtmlHelp.h"
works well.
(a) but the library file in related path:
#pragma comment(lib,"Microsoft/Help/htmlhelp.lib")
is not working.
I have to use whole absolute path:
#pragma comment(lib,"D:/Develops/VisualCPP/Lib/Microsoft/Help/htmlhelp.lib")
Question:
I hope library file can be used in related path as (a).
Do you know how to do that?
|
|
|
|
|
How to save sound from microphone and video from web camera to one stream?
|
|
|
|
|
|
Dear all
I have an multithread application that works with Sound Card and it uses Socket Connection. this application works perfectly on a single core computers, but when I run it on dual-core computers, my application occur two kind of exception. first one is, when i want to work with sound card that need socket connection's data,exception occur(in this case socket connection thread and sound card thread work with eachother asynchron) .second one, some times some Icones hide in my GUI. I guess that is cause of multithraed on multicore systems.
is anybody have experiment on multithreaded programming that have contentions with hardware on dual core systems?
|
|
|
|
|
e_yp wrote: first one is, when i want to work with sound card that need socket connection's data,exception occur(in this case socket connection thread and sound card thread work with eachother asynchron)
This sounds like you are not properly synchronizing access to the socket data between the two threads.
e_yp wrote: second one, some times some Icones hide in my GUI.
This one sounds like you are trying to use MFC objects from multiple threads, which is not allowed. I'm surprised it worked correctly in the single-core situation. It's also possible that you have one thread destroying the icon before a second thread is finished using it.
e_yp wrote: I guess that is cause of multithraed on multicore systems.
Multi-core systems tend to expose defects in your thread handling more often. Your application appears to work correctly on a single-core only because that doesn't fully exercise the capability of multiple threads of execution.
|
|
|
|
|
AFAIK even Linux kernel (I don't remember the version, though) had (synchronization) issues on multicore processors.
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
|
|
|
|
|
Hi All,
I have a assignment and it is urgent. I have two dates, one is String and the format is "dd/mm/yyyy", and other is Date with Time, format is "mm-dd-yyyy".Example(4/2/2008 2:56:50 pm).I have to remove the time and compare the two date..plz help me
How can I change format from one to other so I can compare?
Thanks in advance.
Hi,,
I am sharan.Working as a software Engineer in Indo-Fuji Software Company located in BTM Layout.Bangalore.India.
I have Completed my B.E(COmputers)in 2006.ANd I am having 2 years of Exp in VC++.
thanking you
sharan
|
|
|
|
|
Use a function like sscanf() to get the day, month, and year values from the String into integer variables.
Use member functions in the Date class to get the day, month, and year values from it.
Compare the values.
|
|
|
|
|
Hi
I am not clear with sir...
Actually i have two dates to compare with..
1)First date is in the format dd/mm/yyyy(19/04/2008).
2)Second Date is in format mm/dd/yyyy(04/19/2008 2:21:11 PM)..It also has time in it.
I have to take only date format from second format...
and then compare two dates..plz help me...
Hi,,
I am sharan.Working as a software Engineer in Indo-Fuji Software Company located in BTM Layout.Bangalore.India.
I have Completed my B.E(COmputers)in 2006.ANd I am having 2 years of Exp in VC++.
thanking you
sharan
|
|
|
|
|
Use the difftime() function.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi,,
In my application I have to use large number of buttons(AROUND 112),
all buttons will call the same function " DoMyDuty(int a) ",
variable 'a' is different for all buttons.
here is sample code for better understand
void MyClass::OnB1()
{
int a;
a=1; -----Only this value changed
DoMyDuty(a);
}
void MyClass::OnB2()
{
int a;
a=15; -------Only this value changed
DoMyDuty(a);
}
.....
.
.
.
.
.....
void MyClass::OnB112()
{
int a;
a=30; -------Only this value changed
DoMyDuty(a);
}
The CODE SEEMS TO BIG but simple to do...
iS THERE ANY ALTERNATIVE LOGIC TO DO THIS......??????
Any other control behaves like this????
thank u.
verma
|
|
|
|
|
If you are using MFC, you can have a single handler respond to a group of controls using ON_CONTROL_RANGE() [^]. This would let you have a single handler, like this:
ON_CONTROL_RANGE(BN_CLICKED,IDC_B1,IDC_B112,OnB)
void MyClass::OnB(UINT ID)
{
static struct {
UINT ID;
int a;
} table[] = {
{ IDC_B1, 1 },
{ IDC_B2, 15 },
{ IDC_B112, 30 }
};
for (int i = 0; i < (sizeof(table) / sizeof(table[0])); i++) {
if (table[i].ID == ID) {
DoMyDuty(table[i].a);
break;
}
}
} The handler is called with the resource ID of the button that was clicked. It then uses a simple table to look up the value of 'a' to use for the call to the DoMyDuty() function.
|
|
|
|
|
Another similar approach:
ON_CONTROL_RANGE(BN_CLICKED,IDC_B1,IDC_B112,OnB)
void MyClass::OnB(UINT ID)
{
DoMyDuty(ID - IDC_B1 + 1);
}
Hope that helps.
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
I don't think that works. The value of 'a' in his original post didn't vary predictably according to the button pressed, so you needed a lookup table approach.
|
|
|
|
|
Thanks gary!!!!!
It works fine.....
|
|
|
|
|
|
I don't understand you problem. Could you elaborate? Anyway, there's a Math forum [^] here at CP.
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
|
|
|
|
|
I dont know why after you answer to questions we cant see orginal question!?
|
|
|
|
|
Timid children, I suppose.
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
|
|
|
|
|
CPallini wrote: Timid children, I suppose.
No Hamid Children.
OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus
Best wishes to Rexx[^]
|
|
|
|
|
Maybe Hamid child or....Are there a lot of him ?
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
|
|
|
|
|
CPallini wrote: Maybe Hamid child or....Are there a lot of him ?
I think its yet for me
|
|
|
|