|
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. )
|
|
|
|
|
What information are you looking for? It's encrypted at
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\IntelliForms\SPW
|
|
|
|
|
I'm looking for information, that i can see in (inputbox) element on web - page (login names, etc.).
And info, that are presented in "Address" string of Explorer.
Does it possible to get this data from my application and change it (delete for example) ?
|
|
|
|
|
When the Autocomplete list comes up, you can select an item from the list and hit the Delete key. I do not know of a way to do this programmatically.
|
|
|
|
|
Is there some way of getting a HWND from a long value?
|
|
|
|
|
Raggamuffin wrote:
Is there some way of getting a HWND from a long value?
Assuming that the long truly is a HWND you can cast it:
HWND hWnd = static_cast<HWND>( LongValue );
if ( ::IsWindow( hWnd ) )
;
Neville Franks, Author of ED for Windows. www.getsoft.com
Make money with our new Affilate program
|
|
|
|
|
Along the lines of the suggestion above, if there is no acceptable conversion to your HWND, and you are certain you know what you're doing, you can try:
HWND hWnd = reinterpret_cast<HWND>(lYourLong);
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
And Why not?
HWND hwnd = (HWND)lValue; ;)
Carlos Antollini.
Pi Five[^]Creator
Sonork ID 100.10529 cantollini
|
|
|
|
|
Because being the good C++ programmers we are we should never use old style C casts anymore. On a more serious note I had a serious problem a few years back using a C style cast, and changing it to the new C++ casts resolved it. Since then I've completely stopped using C style casts.
Neville Franks, Author of ED for Windows. www.getsoft.com
Make money with our new Affilate program
|
|
|
|
|
I'm using a tab control that will contain several different dialogues. The tab control works fine and all the dialogues show up nicely but none of the buttons in the dialogues work...
Just to test i want the button to popup a Messagebox to check that it works. I've tried alot of stuff like using DoModal and calling a function from the parent window but that doesnt work either.
So now im asking if anyone else has used a tab control with child windows as tab pages. And if so maby they know were i've made mistakes
The tabs a added to a CObArray called m_oaTab:
CDialog* temp1 = new CDialog;
temp1->Create(IDD_DIALOG1, &m_tabben);
m_oaTab.Add(temp1);
CDialog* temp2 = new CDialog;
temp2->Create(IDD_DIALOG2, &m_tabben);
m_oaTab.Add(temp2);
CDialog* temp3 = new CDialog;
temp3->Create(IDD_DIALOG3, &m_tabben);
m_oaTab.Add(temp3);
//m_tabben is the CTabCtrl variable
m_tabben.InsertItem(0, "Tab nummer 1");
m_tabben.InsertItem(1, "Tab nummer 2");
m_tabben.InsertItem(2, "Tab nummer 3");
m_uiLastDlg1 = 0;
NMHDR pNMHDR;
long uiRes;
pNMHDR.idFrom = IDC_TAB1;
OnSelchangeTab1(&pNMHDR, &uiRes);
And here is the OnSelChangeTab1 method
void CTabbarDlg::OnSelchangeTab1(NMHDR* pNMHDR, LRESULT* pResult)
{
UINT uiCurDlg;
WINDOWPLACEMENT winp;
CRect rect;
m_tabben.GetWindowPlacement(&winp);m_tabben.GetWindowRect(&rect);
winp.rcNormalPosition.top = 25;
winp.rcNormalPosition.left = 5;
winp.rcNormalPosition.bottom = rect.Height() -5;
winp.rcNormalPosition.right = rect.Width() - 5;
uiCurDlg = m_tabben.GetCurSel();
((CDialog*)m_oaTab[uiCurDlg])->SetWindowPlacement(&winp);
((CDialog*)m_oaTab[m_uiLastDlg1])->ShowWindow(FALSE);
((CDialog*)m_oaTab[uiCurDlg])->ShowWindow(TRUE);
m_uiLastDlg1 = uiCurDlg;
*pResult = 0;
}
I know its not to easy to look at someone elses code and try to find faults (or perhaps it is in my case ) but maby you know what mistakes people "usually" do
thanx
/Eric
|
|
|
|
|
Why don't you use the CPropertySheet? it's like the tab control but it allow you to handle all the dialog events (the ones that happen in the pages) in each page...
it is very very easy to use a property sheet...
you have only to add the pages you want and you are done...
each page is a dialog that can be programmed as you program normal dialogs...
Hope this helps...
|
|
|
|
|
thanx for your reply
actually i've never used property sheets before (never used tab control either ) how do i add a property sheet in the resource view? or do i have to do everything in code?
thanx
/Eric
|
|
|
|
|
you have to do everything by code...
but it is very easy:
----------------------------------------------------
here's how to embed a property sheet inside a dialog box: (THE HARD ONE)
this->m_pPSEstacio = new CPSEstacio("", this, 0);
this->m_pPSEstacio->Create(this, WS_CHILD | WS_TABSTOP | WS_VISIBLE);
this->m_pPSEstacio->ModifyStyleEx(0,WS_EX_CONTROLPARENT);
take a look at the documentation... (it's easier than it seems...)
----------------------------------------------------
Creating a modal property sheet
you've only to call DoModal()...
Hope this helps...
|
|
|
|
|
yes i already got it to work before i read your post but thank you so much for your help, this is much easier than tab control
/Eric
|
|
|
|