|
Add a method called SetStringArray that takes a pointer to a CStringArray and pass in the address of the array.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
Hi,
I have a SplitterWnd with two panes. In one I have a CFormView and the other is a CView. I'd like to position the (vertical) splitter bar so that it's equal to the width of the FormView when the splitter is created. I'd also like the positioning to be dynamic, so if I edit the CFormView dialog, making it wider, the splitter will be created in the proper location.
Also, I'd like to know what message is fired before the scrollbars are displayed in the FormView. In certain cases, I'd like to prevent the horizontal scroll bar from appearing by shifting the vertical scrollbar to the right. I do this now by checking the size of the window as it's being resized and then shifting the scrollbar, but it's very sloppy because the scrollbars are displayed before I trap the resize message.
Thanks for any help you can offer.
Tom
|
|
|
|
|
I don't believe there is a message generated when a scroll bar is about to be displayed.
|
|
|
|
|
Any ideas on how to get the size of the dialog template at runtime so I can locate the splitterbar to align with the width of the dialog template?
|
|
|
|
|
Create a static frame the desired size of the dialog and use that as the frame size.
|
|
|
|
|
I am going to distribute my database-based C++ application. But I don't know how to set ODBC DSN when setup. Is there any one can tell me that, or is there any installer support that function?
Thanks,
|
|
|
|
|
If your using Installshield there is a wizard to set ODBC data sources, or you can set it in the registry under HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI
|
|
|
|
|
|
Can anyone help me in my school project?I'm a beginner at microsoft visual c++ any need help in doing a program.I would appreciate it if anyone is willing to help me doing it.Thanks alot!
|
|
|
|
|
Code Project is not a place for make your HomeWork, but We can help you making the Alpha Version, of your Project.
Cheers!!!!
Carlos Antollini.
|
|
|
|
|
What type of help do you need Ramzirex?
Please be specific, and post direct questions.
|
|
|
|
|
You get points for saying up front you are doing homework. You lose points for asking the same question twice instead of taking the advice you were given the first time. Asking if people will help you without saying what you want is pointless - by all means when you have an actual question about the project you are working on, post it and I'm sure we will be glad to help.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
Hi All!
I'm using Tree Control in my dialog and CTreeCtrl in my class
to handle it. I put in this Tree objects, so you can click on them
and view their attributes. User is allowed to mark both objects and
attributes using checkboxes inside tree (I use the TVS_CHECKBOXES style).
My problem is: when you've marked attribute of any object, and after that
collapse the tree, you can't see: have you any checked attributes inside or not. The best decision, I think, would be use tri-state checkboxes (marked, unmarked, partially-marked). I saw these things in installation programs.
The question is: Is there any way to do it inside Tree control?
Or I need to create my own image list with three bitmaps, attach it to my tree control and handle messages on it?
|
|
|
|
|
I needed to do that, And I used the ame Idea. I use a Bitmap with the three states. I Ask for the state of each child item and I decide the bitmap to use.
Cheers.
Carlos Antollini.
|
|
|
|
|
Hi,
I have a child dialogs which is created form the main dialog. Child dialog contains system icon and system menu. I like to disable minimize and remove maximize from the child window's system menu.
Thank You!
|
|
|
|
|
Hello!!
I have a window which covers teh full screen.. I do not want the image on the window to be disturbed. It will be disturbed if teh user presses the windows key i.e. the key which activates the start menu.. Can I disable this key.. In short the user should not be able to disturb teh image by pressing this key..
Please advise how???
Sandeep
|
|
|
|
|
Use SystemParametersInfo()
|
|
|
|
|
Hi all,
does anyone know how to obtain info stored in the resource.
I would like to show the version number / company name … in the about dialog box of my app. (so how can i access to the resource VS_VERSION_INFO of my mfc app?)
Any idea?
thanx in advance
Armin Zürcher
|
|
|
|
|
bool GetDllVersion ( LPTSTR szDllFilename, CString& sProductVersion )
{
DWORD dwHandle, dwInfoSize;
BYTE* pBuffer;
void* pvVersion;
UINT uBufLen;
dwInfoSize = GetFileVersionInfoSize ( szDllFilename, &dwHandle );
if ( 0 == dwInfoSize )
return false;
pBuffer = new BYTE [dwInfoSize];
if ( NULL == pBuffer )
return false;
__try
{
if ( 0 == GetFileVersionInfo ( szDllFilename, dwHandle, dwInfoSize, pBuffer ))
return false;
if ( 0 == VerQueryValue ( pBuffer, _T("\\StringFileInfo\\040904B0\\ProductVersion"),
&pvVersion, &uBufLen ))
return false;
sProductVersion = (LPCTSTR) pvVersion;
}
__finally
{
delete [] pBuffer;
}
return true;
}
--Mike--
http://home.inreach.com/mdunn/
Ford: How would you react if I said that I'm not from Guildford after all, but from a small planet somewhere in the vicinity of Betelguese?
Arthur: I don't know. Why, do you think it's the sort of thing you're likely to say?
|
|
|
|
|
Thanks for your fast reply ,
but the code fails in the following line:
if ( 0 == VerQueryValue (pBuffer, _T("\\StringFileInfo\\040904B0\\ProductVersion"), &pvVersion, &uBufLen ))
is there something different when I use a german file?.
When I view the *rc file it looks like:
BLOCK "StringFileInfo"
BEGIN
BLOCK "040704e4"
BEGIN
(… all other values)
VALUE "ProductVersion", "1.0.0.1"
Perhaps I’ve to change the string from _T("\\StringFileInfo\\040904B0\\ProductVersion") to
_T("\\StringFileInfo\\040704e4\\ProductVersion").
It doesn’t work too – did I miss something?
Thanks again,
Regards
Armin Zürcher
|
|
|
|
|
hmm, I'd expect that changing the number to 040704e4 would make it work, since that is just the hex value of your language ID.
--Mike--
http://home.inreach.com/mdunn/
Ford: How would you react if I said that I'm not from Guildford after all, but from a small planet somewhere in the vicinity of Betelguese?
Arthur: I don't know. Why, do you think it's the sort of thing you're likely to say?
|
|
|
|
|
uh..
it was my fault, the right block header for the dll is 040704B0.
(040704E4 was the block header of the app)
Armin Zürcher
|
|
|
|
|
Hi !
I'm trying to catch a keyboard input (WM_KEYDOWN) in a CDialog box.
The OnKeyDown method works in a CView derived class, but not in a CDialog dervied class.
Could anyone help me about that ?
Thank you !
Damien
|
|
|
|
|
WM_KEYDOWN messages are directed to child window that currently has a focus, not to the dialog itself. Override PreTranslateMessage to handle keyboard in dialog class.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Hi there!!
I want to recreate a stored procedure when i pass it to the SQL server with ADO.
I found a example at MSDN, but its to much code. I wonder if there are any easier way to do this?
MSDN example:
_bstr_t bstrCreate ( L"create proc sp_AdoTest( @InParam int, "
L"@OutParam int OUTPUT ) "
L"as "
L"select @OutParam = @InParam + 10 "
L"SELECT * FROM Authors WHERE "
L"State <> 'CA' "
L"return @OutParam +10" );
_bstr_t bstrDrop ( L"if exists "
L"(select * from sysobjects where "
L"id = object_id('dbo.sp_AdoTest') and "
L"sysstat & 0xf = 4)"
L"drop procedure dbo.sp_AdoTest" );
_bstr_t bstrSP ( L"sp_Adotest" );
Conn1.CreateInstance( __uuidof( ADODB::Connection ) );
Conn1->ConnectionString = bstrConnect;
Conn1->Open( bstrEmpty, bstrEmpty, bstrEmpty, -1 );
// Drop procedure, if it exists & recreate it.
Conn1->Execute( bstrDrop, &vtEmpty, ADODB::adCmdText);
Conn1->Execute( bstrCreate, &vtEmpty, ADODB::adCmdText);
Thank all folks out there who taking the time to help me!!
|
|
|
|