|
I'm french
"excusez moi" for the faults
i'd make an appli with two different String tables
i need to switch dynamically between this two resources
(a radio button allows me to set up a memeber variable)
Is it possible ??
Can i keep the same ID for the string in the two tongues
and thus how transmit the good table with the good version
By default if you can't help me for the code
can you correct my english!!!
tankyou
|
|
|
|
|
What you have to do depends on which OS you are targeting. If you have the luxury of targeting only for Windows NT/2000 then you can use multiple string tables in the same app. If you need to target Windows 9x/Me, then you need to use other means.
Also keep in mind that if you're using MFC, you need to take into account MFC's quirks as well.
|
|
|
|
|
Everyone, good afternoon.
It is worried in the way of restoring Registory.
Information on Registory is kept by using RegSaveKey in the file. After that, Registory is changed, and it tries to be restored with RegReplaceKey.
The executive result of RegReplaceKey is successful.
The BackUp file made after the practice is being made, too.
But, Registory isn't being restored.
Is it improper if anything isn't done before carrying out RegReplaceKey so that it may be restored to the normality?
Example.(Save)
HKEY hKey;
RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE", 0, KEY_ALL_ACCESS, &hKey);
RegSaveKey(hKey, "C:\\HKLMSOFT", NULL);
(Restore)
HKEY hKey;
RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE", 0, KEY_ALL_ACCESS, &hKey);
RegReplaceKey(hKey, NULL, "C:\\HKLMSOFT", "C:\\HKLMSOFT.bak" );
or
RegOpenKeyEx(HKEY_LOCAL_MACHINE, NULL, 0, KEY_ALL_ACCESS, &hKey);
RegReplaceKey(hKey, "SOFTWARE", "C:\\HKLMSOFT", "C:\\HKLMSOFT.bak" );
But, it isn't restored.
Thank you for reading it.
sakurajyousui
|
|
|
|
|
Hi all, I have this BIG and URGENT problem:
I developed an ocx in VC++ 5.0 and I want to use a recordset object which is opened into a VB application (DAO 3.5). How can I use this object in my OCX?? I mean: How can I pass the Recordset from VB to Vc++ ??
Thank you very much in advance
Carlo Comino.
|
|
|
|
|
when i had a similar need (passing a recordset from a vb client to a c++ dll) i ended up using a temporary db table to store the results in the recordset and reading it from the c++ code
there's prolly a better way but i couldn't find it
mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
|
|
|
|
|
If I want to create a new thread in my code & run it in Debug Mode what are the visual C settings?
Can I create this in a Console App, should it be Debug Multithreaded ?
My code compiles, but the new thread never kicks in when I run it??? Any help appreciated...
Gerry.
|
|
|
|
|
If I want to create a new thread in my code & run it in Debug Mode what are the visual C settings?
--> C/C++ Code Generation : DEBUG_MULTITHREADED ... should be all
Can I create this in a Console App, should it be Debug Multithreaded ?
--> YES and IT MUST BE MULTITHREADED!
My code compiles, but the new thread never kicks in when I run it??? Any help appreciated...
--> CAN`T SEE THE CODE! This can have a lot of reasons - maybe your thread never gets an object it is waiting for .... Do you use any WaitFor..() functions ???
Greatings Mario ///
Greatings Mario ///
----------------------
www.klangwerker.de
mario@klangwerker.de
----------------------
|
|
|
|
|
Have any idea about how to invoke a context menu on right
click of Network Neighborhood computer. Say u want to display two menu
items like connect and disconnect of a n/w neighborhood computer using
ShellExtensions.
Any idea or suggestions highly appreciated..
Pls. provide how to register the component , i mean under what hive to be
registered.
Thanks & Regards,
soma
|
|
|
|
|
I found that there are some memory leaks when running it in NT.
Here are the source codes.
#include <windows.h>
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
#include <malloc.h>
#include <string.h>
typedef struct DATA
{
char *data;
DATA *next;
} DATA;
void test2(DATA *d)
{
if (NULL == d->data) {
d->data = new char [100000];
if (NULL == d->data) {
printf("No memory for d->data.");
return;
}
}
else {
DATA *dp = d;
while (dp->next != NULL) dp = dp->next;
dp->next = new DATA;
if (NULL == dp->next) {
printf("No memory for dp->next.");
return;
}
memset(dp->next, 0, sizeof (DATA));
dp->next->data = new char [100000];
if (NULL == dp->next->data) {
printf("No memory for dp->next->data.");
return;
}
}
}
void main(void)
{
printf("Press ENTER to start.\n");
_getch();
int i;
DATA d, *dp, *next;
memset(&d, 0, sizeof (DATA));
for (i = 0; i < 200; i++) {
test2(&d);
test2(&d);
test2(&d);
test2(&d);
test2(&d);
}
printf("Press ENTER to continue.\n");
_getch();
delete[] d.data;
dp = d.next;
i = 1;
while (dp != NULL) {
next = dp->next;
delete[] dp->data;
delete dp;
dp = next;
i++;
}
printf("i = %d.\n", i); // 1000 expected.
printf("Press ENTER to finish.\n");
_getch();
}
Pls help...;)
|
|
|
|
|
I found out this mysterious memory leak too, but I am really puzzled because my testing program can't be simpler (see below). I used VC++6/SP4 to compile it and checked it with MemCheck 5.0. The latter said "no HeapFree for HeapAlloc" four times and "no HeapDestroy for HeapCreate". I am not even using the new and delete operators, but why is the program calling HeapAlloc and HeapCreate AND not calling HeapFree and HeapDestroy to clean up the mess?
#include "stdafx.h"
#include <stdio.h>
void main(void)
{
char c;
printf("Test to see if there is memory leak...\n");
c = (char) getchar();
printf("The character is %c.\n", c);
}
|
|
|
|
|
Well... the c lib is calling the HeapAlloc/HeapCreate for internal data, but since that data needs to be allocated for all live of your program there is no need for calling HeapDestroy/HeapFree. When your program ends the OS automatically frees all the memory that has been allocated by you (in this case by the c lib) so there is no leak at all...
Bye,
Rui Lopes
|
|
|
|
|
I want to implement refresh, back and forward buttons in my browser!! how can i do this?
Please help. I would also like to impement an favourites button or something like that.
THANKS!!!!!
DAMION
|
|
|
|
|
Could I have some example code for C++ MFC to create and display a simple property sheet, or Tabbed dialog box, with the Tabs positioned along the bottom please?
Thanks
David
|
|
|
|
|
Use the TCS_BOTTOM style wich is defined in CommCtrl.h (line 5067 in my version).
With the best regards, Vitaly.
|
|
|
|
|
My program has some property settings and so i make a dialog box with some textboxes and checkboxes to display all those settings. I allow the user to change the settings and save them. I want to update the Dialog view when the user click the checkbox. For example, there are 8 checkboxes represent 8 bit binary number and there is a textbox to represent this 8-bit binary in hex number. I want the textbox display the most updated binary information from those 8 checkboxes.
So, I send message to the dialog when the user "click" the checkbox. However, i don't know how to update the Dialog box so that it can update the textbox.....
Can anyone help me?
|
|
|
|
|
Invalidate(false) redraws a window ( which both the text box and dialog box are ) without erasing the background first, thus avoiding flicker. Invalidate(true) erases the background first.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
I think you want CWnd::UpdateData().
|
|
|
|
|
Dear all,
How can I pass the string in a char array or CString array in this Speak() function?
e.g. char chararray[5][5];
chararray[0] = "Hello";
or
CString cstringarray[5][5];
cstringarray[0] = "How are you";
HRESULT Speak (PCWSTR pszSpeak);
Since the parameter should be a pointer of WCHAR, do anyone know how to convert the string to the suitable parameter?
Looking forward to your sincere reply. Thanks a lot!
|
|
|
|
|
Vickie,
usually when I write applications I decide to either use wide characters (Unicode) strings everywhere or to use normal characters thus avoiding problems like yours. But I have had the same problem you are having numerous times. There are two ways that I have used to convert plain old char arrays to wide characters:
1. Windows provides two API calls to help things along:
WideCharToMultiByte and MultiByteToWideChar these functions take quite a few parameters and can be quite cumbersome to use.
2. Use wcstombs and mbstowcs (this is the method I prefere). Look them up in your doco but this will give you an idea:
char mBuf[255];
wchar_t wBuf[255];
i = mbstowcs( bBuf, mBuf, 255 );
hope this helps
Accept that some days you are the pigeon and some days the statue.
|
|
|
|
|
ummm
is the app a unicode (or wide char) app? if so all your strings will be wide char so passing a string ptr is as easy as Speak(szString) or Speak ((LPCTSTR)csString)
if the app isnt unicode then u have to use the conversion macros
USES_CONVERSION;
W2A(blah blah blah)
A2W(blee blee blee)
mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
|
|
|
|
|
<<< In the name of GOD >>>
Hi.
I want to display icon inside the text in ListBox
in VC++, but i don't know how can i use of WM_DRAWITEM
message and DRAWITEMSTRUCT structure.
Please help me ...
Thanks.
Hadi Rezaie
|
|
|
|
|
Take a look at CComboBoxEx. Just define an image list using SetImageList() and then select the desired image when you add an entry. Voila.
|
|
|
|
|
I compile my (any) WTL Project with following settings:
Project/Settings/C++/Calling Convension: __stdcall.
In release configuration I'm forcedly compile with Debug Run-time library (instead release lib; Project/Settings/C++/Use run-time library),
else : "The instruction at ... referenced memory at ... . Memory could not be read" - with any release lib - single threaded, multithreaded, multithreaded DLL.
Thanx for any help.
|
|
|
|
|
Hi,
I've got to develop a snap-in for the Microsoft Management Console (mmc). I dont have documentation to do that. If someone have a link or an example to help me it would be very apreciate. I usually seen the msdn documentation but it's not very clear in my head and I have trouble with the example.
Thanx for helping me !!!
|
|
|
|
|
I've wrote one...
If it's still actuelle, write me - reznitskiy@softlab.ru
|
|
|
|