|
I write a record program ,But it's quality is very poor,What effect the
quality except the format
|
|
|
|
|
bit rate at which the recording was done,
for example 128 bps gives almost a CD-quality recording.
Other possible reason could be your hardware.
-prakash
|
|
|
|
|
Hi,
why is that some errors come in the release mode ,but not in debug mode ,like
Char ch[1];
then i try to copy the wholeno(1,2,....) into it ,it crashes in the release mode but not in the debug mode ,does it assign more space in the debug mode to the ch(in memory) more than told.
Regards
Farpointer
|
|
|
|
|
can you provide us with the copying code?
sometimes programming errors escapes in the debug mode and ideally there is no difference between the functionalit of debug and release apis.
-prakash
|
|
|
|
|
this[^] is a good resource too.
-prakash
|
|
|
|
|
thanx prakash it has wat i want
Regards
Farpointer
|
|
|
|
|
if you click print a document by Microsoft word,
I want to get the print message in my application,how to do that?
a hook can do that ?
thanks!
braden
-- modified at 21:40 Tuesday 1st November, 2005
|
|
|
|
|
This is my first time to post here. Here's my problem. I've written a code to modify my menu text from english to japanese. Translation of text was succesful but after the translation, the translated submenus were disabled. Anybody who got any idea on how I will solve this. Thanks in advanced.
|
|
|
|
|
Why is it getting disabled in the first place?
How does the chaging the text of the menu looks like?
-prakash
|
|
|
|
|
Thanks for the reply.
Here's what I did.
I don't have any idea why its getting disabled. It got disabled after translating the text from english to japanese.
First I open a text file which contains the original text and its translation.
The contents were read and was stored to a map(STL). I've also created a recursive function to traverse the menu and translate the text.
From that recursive function I get the submenus and the number of items under that submenus.
Here's the code:
void CTranslator::TranslateMenu(CMenu* pMenu, int MenuCount)
{
CMenu* SubMenu;
CString String;
char MenuString[50];
int SubMenuCount = 0;
int Index = 0;
do // while (MenuCount != Index)
{
ZeroMemory(MenuString, 50);
pMenu->GetMenuString( Index, MenuString, 50, MF_BYPOSITION);
String.Format ("%s", MenuString);
if(! String.IsEmpty())
{
pMenu->ModifyMenu(Index, MF_BYPOSITION, MF_POPUP, GetTranslation( String ) );
}
SubMenu = pMenu->GetSubMenu(Index);
if(NULL != SubMenu)
{
SubMenuCount = SubMenu->GetMenuItemCount ();
TranslateMenu(SubMenu, SubMenuCount);
}// if(NULL != SubMenu)
pMenu->EnableMenuItem (Index, MF_ENABLED);
Index++;
}while (MenuCount != Index);
}// CTranslator::TranslateMenu(CMenu *pMenu)
|
|
|
|
|
romuzu wrote: pMenu->EnableMenuItem (Index, MF_ENABLED);
try pMenu->EnableMenuItem (Index,MF_BYPOSITION | MF_ENABLED);
-prakash
|
|
|
|
|
Thanks for the reply.
I did that before but still did not enable the menu.
|
|
|
|
|
romuzu wrote: pMenu->ModifyMenu(Index, MF_BYPOSITION, MF_POPUP, GetTranslation( String ) );
I could not understand this function call and does not fit in any of the sig provided
did you mean
pMenu->ModifyMenu(Index, MF_BYPOSITION | MF_STRING,, GetTranslation( String ) );
-prakash
|
|
|
|
|
I have got so many classes in my VC++ project that I feel they are very complicated. so I want to illustrate their relationship clearly with UML. is there any software can be used to draw a diagram of the relationship of these classes for me?
or, is there any other way to do this?
thank you very much!
-------------------
I am learning C++ and English
|
|
|
|
|
|
for the moment I have no RationalRose, can I use the Microsoft Visual Modeler instead, which, you know, is a tool in the visual studio?
-------------------
I am learning C++ and English
|
|
|
|
|
I dont know much about visual modeler, I know that in RationalRose you can import the C++ files and it generates the UML which you can straighten up.
You can download the evaulation version and see if it meets your requirement.
-prakash
|
|
|
|
|
thank you very much
-------------------
I am learning C++ and English
|
|
|
|
|
I usally use 'malloc' and 'new' to allocate memory.
And I know 'free' or 'delete' should follow them.
If I forgot to release the allocated momory, I could see
a warning message (like below) for memory leak
which is displayed by MFC Tracer.
[2872] Detected memory leaks!
[2872] Dumping objects ->
[2872] G:\WORK\CaptureManager.cpp(211) :
[2872] {320}
[2872] normal block at 0x003775D8, 4 bytes long.
[2872] Data: < > CD CD CD CD
[2872] Object dump complete.
However, in some codes, LocalAlloc is used instead.
Even though LocalFree is not called to free memory,
warning message wouldn't appear.
I wonder if LocalAlloc doesn't need LocalFree,
and memory leak warning message from MFC Tracer is unreliable.
any idea is welcomed,thanks
|
|
|
|
|
plowstar wrote: I wonder if LocalAlloc doesn't need LocalFree,
and memory leak warning message from MFC Tracer is unreliable.
From[^] here, it is clear that localalloc will need its corresponding free call.
-prakash
|
|
|
|
|
Most memory trackers work by hooking the new/malloc and delete/free operators and tracking allocations versus deallocations. LocalAlloc and LocalFree are Win32 API functions which *directly* manipulate the heap, I guess that's why the Tracer doesn't detect them.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
I need some help. I’m working on a project with some schools that involve Windows and “hosts” file work. The network I’m working on requires several pre defined domains that need to be assigned to a different IP address which is achieved through using the hosts file.
The problem that I’m running into is that a hosts file over 150K will start to crash the Dnscache service under Windows 2000 and XP. I have to disable this service in order to have everything work. The problem with doing this is that resolving a host without Dnscache has considerable latency issues and an overall slow connection time without the Dnscache service running. It doesn’t matter if the hosts file is 1K or 300K, without DNS caching, it is very slow.
I would very much appreciate it if someone could assist me or even just write a small C or C++ win32 console app that can be run and installed as a service through the command line using the “sc config” and “net start” commands. It would need to be able to replace the Dnscache “dnsrslvr.dll” service. This service is nice but not very robust when it comes to actually using the hosts file for what it was designed for.
Really, it doesn’t have to load the whole hosts file into memory like the Dnscache “dnsrslvr.dll” service does. All this program would need to do is pre allocate a small chunk of memory and then just monitor domain name requests. When the IP address is returned from the DNS server out on the web or from the hosts file, it would just need to cache it into memory. The initial connection would still be the time required to ask the DNS server or hosts file for the IP address but after that, the site would load faster because all of the graphics, applets and so on would already be pointing to the IP address.
I would even be willing to compensate a bit for the time spent doing this. I know time is valuable. Please contact me at jamie@unitedcomputerservice.com
I will also keep checking the post here. Thank you in advance for anyone who could help me in this effort. I write code but this one is a bit out of my area to be comfortable. Is there any way that someone could help or at least point me in the right direction?
Thank you very much!!!
|
|
|
|
|
Writing a DNS client service should be no problem since the DNS protocol is defined in a RFC (search w3c.org)
The thing is, as u said, u should monitor name requests.
So to start with, try and find any MS docs about the DNS client service.
U'll need it to follow its protocol with apps if u write eyour own service. And who knows - maybe u'll find a way to config it not to crash...
|
|
|
|
|
I found that ExtractIcon returned the handle for the large icon,not the small.
But I just need the small icon ,and then add it to a image list.
How could I do so?
Much simple much better;P
|
|
|
|
|
Use ExtractIconEx[^]
its pretty straight forward to use, let me know if you have any problem?
-prakash
|
|
|
|