|
Here is very good ebook for begginer in database:
http://lnrpc2.irb.hr/ebooks/0672313502/index.htm
Mazy
Don't Marry a Person You Can Live With...
Marry Someone You Can Not Live Without
|
|
|
|
|
I know what a string table is and how to use it. My question is -- is it worth it? Do those strings remain on disk and LoadString() reads them from there, or are they really loaded into ram memory during program startup?
|
|
|
|
|
Strings table are embedded inside the executable image (the .EXE file), that gets loaded to virtual memory at program startup. It is the processor's responsibility to bring virtual memory pages to RAM or store them in the disk cache (the swapping file) depending on whether the pages are being referred to or not (and some other optimization policies); so the question of whether the string table is loaded into memory or not is a fuzzy subject --probably it won't get loaded if you don't use resource at all.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Joaquín:
very educative!!!
I am surprised!!!
CLAP, CLAP, CLAP!!!
Regards....
The programmer's national anthem is 'AAAAAAAARRRRGHHHHH!!'.
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
You'll make me blush
Actually, there are inaccuracies in my explanation --read only sections of the executable probably won't ever do it to the swapping file (they're retrieved directly from the .EXE file itself and simply dismissed when not needed), and stuff like that.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I want to represent some data from a database to the user.
Is it most convenient to use a table. What kind of
table should I use. There is no table available in the
standard controls. Is MSFlexGrid from the ActiveX controls
a good choice?
|
|
|
|
|
MSFlexGrid is for DAO,and it is old technology,It is better to use ADO.
For this you can use MS Datagrid(I think it is in visual studio6 not v7) or you can find very nice datagrids in codeproject
Mazy
Don't Marry a Person You Can Live With...
Marry Someone You Can Not Live Without
|
|
|
|
|
You can find several samples of datagrid in CP.
Look here
Regards...
A printer consists of three main parts: the case, the jammed paper tray and the blinking red light.
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
I am using a FindWindow call and supplying the window class name and sure enough when an app is running with that class, I get a handle to the window returned to me. But suppose there are several instances of the app running and so I use the handle to GetWindowText to search for a specific instance. What API call is available to 'walk through' all windows with a given class name? Does such an animal exist or do I need to put something together myself? Suggestions welcomed.
Thanks.
Chris Meech
|
|
|
|
|
I don't if it can help you:"GetWindowThreadProcessId"
Also check "Window Functions" in MSDN
Mazy
Don't Marry a Person You Can Live With...
Marry Someone You Can Not Live Without
|
|
|
|
|
Look up EnumWindows
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
Thanks Nish and Mazdak for your suggestions.
I ended up doing the following and it has tested out fine.
HWND hWnd = ::GetDesktopWindow();
HWND hSessionA = NULL;
do
{
if ( hSessionA == NULL )
hSessionA = ::GetWindow(hWnd, GW_CHILD);
if ( IsWindowVisible(hSessionA) )
{
CString strWindowText;
char* pWindowText = strWindowText.GetBufferSetLength(sizeof(szSessionA));
GetWindowText(hSessionA, pWindowText, sizeof(szSessionA));
strWindowText.ReleaseBuffer();
strWindowText.MakeUpper();
if ( strWindowText.Compare(szSessionA) == 0 )
break;
}
hSessionA = GetWindow(hSessionA, GW_HWNDNEXT);
}
while ( (hSessionA) || AfxMessageBox("Please start your SESSIONA and then click OK to search for this session again or you may click Cancel in order to quit.", MB_ICONQUESTION|MB_OKCANCEL) == IDOK );
When I drop out of the while loop, hSessionA is either NULL or contains a value that is the HWND for the window I'm looking for.
Thanks again.
Chris Meech
|
|
|
|
|
Hi,
Can anyone tell me how to change the exponent from the type double? Basicly what I want to do is to extract the exponent form:
<--------------------all the bytes(8 total)------------------->
(SXXX XXXX) (XXXX MMMM) (MMMM MMMM) (MMMM MMMM) ... (MMMM MMMM)
(where x represents the exponent)
do some calculations and place it back in. I want to this with a large amount of numbers so I seek a pretty fast way to do it. Anyone got an idea? thx already.
greetings,
Filip Govaerts
Belgium
|
|
|
|
|
double d;
unsigned char * d_layout=reinterpret_cast<unsigned char *>(&d);
int exp=int(d_layout[6]>>4)+(int(d_layout[7]&0x7FU)<<4);
d_layout[6]&=0x0FU;
d_layout[6]|=(exp&0x0F)<<4;
d_layout[7]&=0x80U;
d_layout[7]|=(exp&0x7F0)>>4;
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
respect...
thx a lot
Filip Govaerts
|
|
|
|
|
in using MDI, can i load an icon to my main frame or childframe upon an action? for example when i click a button, the mainframe's icon will change
|
|
|
|
|
See your initinstance ofyour application:(this line from it)
if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
return FALSE;
You do the same as this function
Mazy
Don't Marry a Person You Can Live With...
Marry Someone You Can Not Live Without
|
|
|
|
|
i have tried using that. but it cant work. is there any other commands i can try?
|
|
|
|
|
what's your code that it does't work?
Mazy
Don't Marry a Person You Can Live With...
Marry Someone You Can Not Live Without
|
|
|
|
|
i tried with a new MDI project. with the original icon IDR_MAINFRAME. when i edit/color the icon, and compile it, the mainframe does not contain the icon i have. it still have the old original MFC icon. how do i go about changing it?
|
|
|
|
|
Sorry,I made mistake There is an example in MSDN that you can find your answer,MDIDOCVW,check it ,you'll find the answer
Mazy
Don't Marry a Person You Can Live With...
Marry Someone You Can Not Live Without
|
|
|
|
|
Why doesn't this code work, and can you complete it?
CFileFind finder;
BOOL bWorking = finder.FindFile("fcc32.exe");
while (bWorking)
{
bWorking = finder.FindNextFile();
CString str = finder.GetFilePath();
MessageBox(str, "", MB_OK);
}
It's simple, I want to searc over the C drive to look fpo the file fcc32.exe and then show a message box with the path to the file...
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
The problem is that when the file is on the root of your drive the bWorking
will be true so you don't messagebox.
Mazy
Don't Marry a Person You Can Live With...
Marry Someone You Can Not Live Without
|
|
|
|
|
CFileFind is not recursive, so it won't search subdirectories. You need to do something like this:
CString FindMyFile(LPCTSTR apszFromDir)
{
CFileFind finder;
CString search;
search.Format(_T("%s\\*"), apszFromDir);
BOOL bWorking = finder.FindFile(search);
while (bWorking)
{
bWorking = finder.FindNextFile();
if (!finder.IsDots())
{
if (finder.IsDirectory())
{
return FindMyFile(finder.GetFilePath());
}
else
{
if (finder.GetFileName().CompareNoCase(_T("fcc32.exe")) == 0)
{
return GetFilePath();
}
}
}
}
return _T("");
}
------------------------
Derek Waters
derek@lj-oz.com
|
|
|
|
|
urgh sorry about the title i didn't know how to express myself. Here's my question:
When you have the following code, does the variable change inside the if-statement cause the else to be called or does it cause any unwanted effects???
m_bBool = false;
if(m_bBool==false)
{
// This gets called... or the other way around
m_bBool = true;
}
else
{
// Does this get called? afterall we changed the value to true...
m_bBool = false;
}
I hope you understand what i mean...
Thanks
Kuniva
--------------------------------------------
God gave man a penis and a brain but not enough blood to make both of 'em work at the same time.
|
|
|
|