|
hi,
i think it is impossible. you can only select one or more cols.
Dr-Kuulun
|
|
|
|
|
DWORD dwstyle = m_myListControl.SendMessage(LVM_GETEXTENDEDLISTVIEWSTYLE,0,0);
dwstyle |= LVS_EX_FULLROWSELECT;
m_myListControl.SendMessage(LVM_SETEXTENDEDLISTVIEWSTYLE, 0, dwstyle);
this is the hard way, but in VC5 it was the only way to get it work properly.
hope it helps
Greetings
Jens
|
|
|
|
|
try this
DWORD dwStyle = m_listctrl.SendMessage(LVM_GETEXTENDEDLISTVIEWSTYLE);
dwStyle |= LVS_EX_FULLROWSELECT;
m_listctrl.SendMessage(LVM_SETEXTENDEDLISTVIEWSTYLE, 0, (LPARAM)dwStyle);
i hope this works
ahmed
|
|
|
|
|
use
API
ListView_SetExtendedListViewStyle(handle of ur listctrl, LVS_EX_FULLROWSELECT)
or CListCtrl Member Function
SetExtendedStyle(LVS_EX_FULLROWSELECT)
CodeTheDreams();
|
|
|
|
|
hi:
i am using the following code to load an icon for the ok button of the property sheet but this is not woking
//////////////OnInitDialog//////////////////////////////
BOOL CMyPropertySheet::OnInitDialog() {
BOOL bResult = CPropertySheet::OnInitDialog();
// other code
CButton* pButt=(CButton*)GetDlgItem(IDOK);
CWinApp* pApp=AfxGetApp();
HICON hIcon=::LoadIcon(pApp->m_hInstance,MAKEINTRESOURCE(IDI_CLOSE));
if(hIcon==NULL)
AfxMessageBox("null handle of icon");
pButt->SetIcon(hIcon);
return bResult;
}
/////////////////////////////////////////////////////////
i cant see the icon ..can any one help me....
thanks
Ahmed
ahmed
|
|
|
|
|
Is Your porpertysheet in WIZARD MODE ????
CodeTheDreams();
|
|
|
|
|
hi:
the issue is solved it should have been like
CButton* pButt=(CButton*)GetDlgItem(IDOK);
DWORD newstyle = ::GetWindowLong(pButt->m_hWnd, GWL_STYLE) | BS_ICON;
::SetWindowLong(pButt->m_hWnd, GWL_STYLE, newstyle);
CWinApp* pApp=AfxGetApp();
HICON hIcon=::LoadIcon(pApp->m_hInstance,MAKEINTRESOURCE(IDI_CLOSE));
if(hIcon==NULL)AfxMessageBox("null icon");
pButt->SetIcon(hIcon);
return bResult;
thanks
ahmed
|
|
|
|
|
Hiya, I have 2 apps, one calling the other with CreateProcess(). How do I hide the second apps MAIN WINDOW when called??
|
|
|
|
|
CreateProcess takes a LPSTARTUPINFO lpStartupInfo,
and in it u have a WORD wShowWindow; which u can set to SW_HIDE
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
if you invoke a console application , there is some flags in CeateProcess API itself.
the 6 th argument dwCreationFlag - put CREATE_NO_WINDOW
will hide the coonsole window.(not applicable for MS_DOS programms).and remember this only valid for WIndows NT/2000/XP Operating systems
there is another method you can follow if u creatw with WinExec() API, the second argument is the window style...just put WS_HIDE simple but a little dirty way...;)
CodeTheDreams();
|
|
|
|
|
OK, thanks. Have done this:
ZeroMemory( &StartupInfo,sizeof(StartupInfo) );
StartupInfo.cb = sizeof( StartupInfo );
StartupInfo.dwFlags = STARTF_USESHOWWINDOW; // Problem line
StartupInfo.wShowWindow = SW_HIDE; // Problem line
if( CreateProcess( lpApplicationName,lpCommandLine,
NULL,NULL,FALSE,0,NULL,NULL,&StartupInfo,&ProcessInfo ))
{
WaitForSingleObject(ProcessInfo.hProcess,INFINITE );
CloseHandle( ProcessInfo.hThread );
CloseHandle( ProcessInfo.hProcess );
}
else
{
AfxMessageBox( "Error - Opening Invoicing" );
return;}
As soon as I put the StartupInfo.dwFlags and StartupInfo.wShowWindow lines, it fails. It leaves a white shape of my dialog I just called and then errors.
Am I putting these in wrong..
Thanks,
|
|
|
|
|
Just as a side note,
<br />
STARTUPINFO StartUpInfo;<br />
ZeroMemory( &StartupInfo,sizeof(StartupInfo) );
is just the same as
STARTUPINFO StartUpInfo = {0};
but the latter is shorter and IMHO more to the point.
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
We have an MFC app with a 'dynamic' splash screen. It uses dc.TextOut to paste text from the version resource over a background bitmap. To make it look a little cooler, I'd like to be able to antialias the TextOut output.
Is this possible? Anyone have an tips? I can't find anything that looks helpful....
Dan
|
|
|
|
|
When you create your font, you can pass ANTIALIASED_QUALITY for the nQuality parameter to specify that the font should be drawn with antialiasing if available (and applicable for that point size).
Hope this helps.
- Mike
|
|
|
|
|
Mike,
Just the ticket
Cheers.
Dan
|
|
|
|
|
Is the import wizard from Excel accessible for use in my own programs? Alternatively, can anyone recommend a similar component? Thanks.
|
|
|
|
|
You must to import the excel.tlb library with the classwizard.
Then you will have the classes that permit tou to access to Excel with OleAutomation.
When you will have acces to each cell you will can import o export data by program.
Carlos Antollini.
Pi Five[^]Creator
Sonork ID 100.10529 cantollini
|
|
|
|
|
Oh, so I would actually be running Excel and then grabbing the data from its spreadsheet. Thanks.
|
|
|
|
|
Hi
Is it possible to subclass 2 times a Edit field.
Like the first subclass, makes sure only the correct information is entered.
This subclass is used for like 5 items.
But on 1 item i want to change the textcolor. So i made another subclass, which i tested out in another project (worked well).
But i get a 'Debug Assertion Failed, wincore.cpp line 312' error.
Can't i subclass an item twice?
Greetings
Jens
|
|
|
|
|
Yes, a class can be derived from multiple base classes.
class CCorrectInfoEdit : public CEdit
{
};
class CColoredEdit : public CEdit
{
};
class CMyEdit : public CCorrectInfoEdit, public CColoredEdit
{
};
|
|
|
|
|
JensB wrote:
'Debug Assertion Failed, wincore.cpp line 312'
This is not nearly enough information. CWnd::Attach() is where your problem shows, but the 'Why?' is something completely different.
Please show more about what you called when the error occured
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
I've got an editbox IDC_EDIT which is attached to a control CString m_edit by classwizard.
Then i've subclassed on InitDialog()
CCheckNumber acEditNumber;
acEditNumber.SubclassDlgItem(IDC_EDIT, this);
-> this checks if input is ok or not.
Now i add:
CColorEdit acColorEditNumber;
acColorEditNumber.SubclassDlgItem(IDC_EDIT, this);
acColorEditNumber.SetTextColor(RGB(250,0,0)); // RED
the program crashes when i subclass the IDC_EDIT again.
But 'ColorEdit' works fine.
And i don't know how i can trace at what line the error occured. When i remove the 2de subclass, programs runs ok.
Greetings
Jens
|
|
|
|
|
Yes, a class can be derived from multiple base classes.
class CCorrectInfoEdit : public CEdit
{
};
class CColoredEdit : public CEdit
{
};
class CMyEdit : public CCorrectInfoEdit, public CColoredEdit
{
};
this i can not use neither because CMyEdit does not have always 2 base classes.
|
|
|
|
|
Why do you do your subclassing the hard way of manual labour?
Derive a class CCheckNumber from CEdit and derive CColorEdit from this one. You do not have to bother with SubclassDlgItem() again. DoDataExchange() will do that.
[EDIT] Maybe this link[^] will help you. It is about your exact problem. [/EDIT]
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
How to get information about autocomplete database (items) in IE (or NN, etc. )
|
|
|
|