|
Mayank_pumca wrote:
I am simulating the application wizard without using the prperty sheet.
Why? When one dialog is destroyed/hidden and another is created/shown, there is going to be "flicker."
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Hi Mr. DavidCrow
Do you mean to say that there is no solution of this problem ?
Please reply.
Thanks and Regards
Mayank kumar
|
|
|
|
|
Anonymous wrote:
Do you mean to say that there is no solution of this problem ?
Well, you did not state the reason why you were not using a property sheet in wizard mode. That's the only (easy) solution as I see it.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Hi Mr. DavidCrow,
I know that property sheet is the best option but I am using dialog box becoz I want to use some background to make my application more attractive. And now I cant switch to the property sheet becaz my application is almost complete and I dont have much time to recreate the application using property sheet. So if u have some solution except property sheet then plz let me know.
Thanks and Regards
Mayank Kumar
|
|
|
|
|
Hi,
I m a student of MCA final year and I m working in VC. I used a dialog base application. I used BMP's for the background and for every button in the application.
The problem is that whenever I use the DoModal(), to show the next dialog, I get the flickering problem. Anyone know about this problem ??
Thanks in advance.
Please reply soon..
Mayank Kumar
|
|
|
|
|
I have an app using the CHtmlView to drive the user inteface.
I have a web page black.html, which is exactly that, a plain black page.
I have maximized the mainframe window but there is still a thin white border around the page. - How do i set this to black?
I have tried:
Overriding OnEraseBkGround - for both CHtmlView + MainFrame
<br />
<br />
CBrush backBrush(RGB(0,0,0));<br />
<br />
CBrush* pOldBrush = pDC->SelectObject(&backBrush);<br />
<br />
CRect rect;<br />
pDC->GetClipBox(&rect);
<br />
pDC->PatBlt(rect.left, rect.top, rect.Width(), rect.Height(),<br />
PATCOPY);<br />
pDC->SelectObject(pOldBrush);<br />
<br />
I still can't get rid of the thin white border - please help
Carl
|
|
|
|
|
Carl, try using a margin-less body tag in your .html file, a la:
<body style="margin-left:0px; margin-right:0px;">
...
</body> You can use a similar trick to get rid off the annoying default scroll bar.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
This is not the web page, this is the Mainframe or View. I already have all margins turned off. I i view the page in just IE, there are 'no' right or bottom this lines.
This is a tiny thin border not controlled by the web page itself.
Carl
|
|
|
|
|
Hi All,
I have a tree view containing table names which I get by using the CTable class defined in ATLDBSCH.H. Under each table is a list of field names which I get by doing this...
CColumns rsColumns;
hResult = rsColumns.Open(m_session, NULL, NULL, tableData->sName);
All this is working fine but I need to show my field names in BOLD when they are either primary or foreign keys. There are two classes for getting this information. Namely CPrimaryKey and CForeignKey. When I try to use these I do not get any errors but also I do not get ANY rows returned. It is like there is no primary or foreign keys in my table but I know for sure that there are.
If anybody could offer me any help with this I would appreciate it ever so much. Has anybody used these classes before with any success?
Thank you,
Chris Ulliott
|
|
|
|
|
Yes. Some of it is a little dependent on the database in use, as that alters what you pass in for TABLE_CATALOG and TABLE_SCHEMA. I guess that you're using NULL and NULL for both of those at the moment.
If you're using SQL Server or Oracle, you can check (by generating scripts, or by looking at the properties/indexes for a table). Similarly, you should be able to use Access to determine that you really are seeing what you think you are.
If you're using Oracle or SQL, is it possible that the default schema has tables without keys?
Steve S
|
|
|
|
|
Hi Steve,
Thanks for replying. This is how im doing it...
CPrimaryKeys rsPK;
// the table name is just that. It does not contain the schema name (NOT LIKE "schema.table")
hResult = rsPK.Open(m_session, NULL, NULL, NULL, NULL, tableData->sName);
hResult = rsPK.MoveNext();
while (hResult == S_OK) // hResult is always some wierd value but GetLastError says "Success"!
{
// Never getting into here... Same with oracle or SQL Server or Access HMPH!
CString indexColumnName = rsPK.m_szColumnName;
indexes.Add(indexColumnName);
hResult = rsPK.MoveNext();
}
Thanks,
Chris
|
|
|
|
|
Is hResult == DB_S_ENDOFROWSET, by any chance?
You can look in the VC debugger by putting "hResult,hr" in a watch window, or even a quick watch, the hr specifies the format.
This would mean there's no primary key. However, you're passing in too many NULLs. You need (session,NULL,NULL,tablename).
For indexes you need (session,NULL,NULL,NULL,NULL,tablename) and for foreign keys, you need (session,NULL,NULL,NULL,NULL,NULL,tablename).
These should give you what you want.
You're asking yourself "How does he know this?"
In the OLE DB Programmers Ref, the restriction columns are listed in order for each of the TABLES, PRIMARY_KEYS, INDEXES, and FOREIGN_KEYS rowsets.
Steve S
|
|
|
|
|
Hi Steve / Anybody,
Although the primary keys are working fine I am having terrible trouble getting the Index information.
Any ideas what I am doing wrong? Here is some code:
CIndexes rsIndex;
hResult = rsIndex.Open(m_session, NULL, NULL, NULL, tableData->sSchema, tableData->sName);
if(hResult == S_OK)
{
hResult = rsIndex.MoveNext();
while (hResult == S_OK) {
CString indexColumnName =
rsIndex.m_szColumnName;
indexes.Add(indexColumnName);
hResult = rsIndex.MoveNext();
}
}
I have also tried it with 4 NULL's and not passing the schema name but it still gives me a zero record count.
Any ideas would be appreciated!
Thanks,
Chris
|
|
|
|
|
Hi,
any idea on how to disable a menu button. What I mean is, consider internet explorer browser the menu consists of 'File', if you click on it a drop down menu appears, what api could I use to disable the close button.
Kind Regards
Caoimh
|
|
|
|
|
If you are using the MFC in your application, you can handle the ON_UPDATE_COMMAND_UI handler for your menu item (you can do this via Class wizard). Then its a matter of setting the state of your item pCmdUI->Enable(isEnabled?TRUE:FALSE);
I Dream of Absolute Zero
|
|
|
|
|
If you aren't using MFC, then you can get the menu handle for the window (normally the top level window), and then get a handle for the sub-menu from there (they start at zero, of course!), and finally modify the state of a given item.
APIs to check out are:
HMENU GetMenu( HWND hWnd );
HMENU GetSubMenu( HMENU hMenu, int nSub );
BOOL SetMenuItemInfo( HMENU hMenu, UINT uItem,
BOOL fByPos, LPMENUITEMINFO lpmii);
That should take care of most things.
Steve S
|
|
|
|
|
|
Hi,everybody,I want to know how to create chm format files?I know that the Microsoft compiler must be used,but I really don't know how to use it.Can you tell me what I should to do ?Help me,Please!
|
|
|
|
|
You can use the HTML Help Workshop[^] from the Microsoft website to create these.
I Dream of Absolute Zero
|
|
|
|
|
Oh,I think I didn't represented it clearly,sorry!
I want to create chm files by my program,I want to know how to use the Microsoft's compiler in my program.Thanks!
|
|
|
|
|
Dear All,
I just created a combo box in VC++ 6.0 enviroment. but dont know how to get the selected item. I am using MFC to create this combo box
Regards,
Anson Tong
|
|
|
|
|
Sorry, i am NOT using MFC to create this combo box
Regards,
Anson Tong
|
|
|
|
|
Without MFC
int nCurSel = (int)SendMessage(hWndComboBox, CB_GETCURSEL, 0, 0);
will give the Currently Selected Item.
or
char szText[255];
GetWindowText(hWndComboBox,szText,255);
Hope it helps
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
It is better to use SendMessage(hWndComboBox, CB_GETLBTEXT, nCurSel, (LPARAM) (LPCSTR) szText) instead GetWindowText.
|
|
|
|
|
Why?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|