|
I did work with MSHFlexGrid a lot last year, but unfortunately I don't have any source code with me right here and right now. However, I remember that there was an option where you could let the control draw itself automatically. Now I don't know if you have enabled that option and at the same time you are redrawing the grid manually as well. But that would be my first and only guess, because I never had a flickering problem.
// Afterall, I realized that even my comment lines have bugs
If the sun were to blow up, it would take us 7-8 minutes to realize it.
|
|
|
|
|
hello,
I've got a simple question, some time ago I've wrote an application that creates a binary search tree and now I need it to be used into my win32 appliaction, since importing dll function is not difficult, how do I import structures? I've included in my project the bst.h file that contanins all the definition but at link compiler I get errors... as no bst_node struct is found...... my question is : How I tell the compiler to import a structure from a dll?
for all the funcions that needs to be exported I inserted
__declspec( dllexport )
but it doesn't work with str.
Thanks!
|
|
|
|
|
I have better idea for you,
Create A class instead of Structure and and made it variable public accesible.
and now export/import class using the AFX_EXT_MACRO.
note:for this you have to craete the MFC extention Dll
-----------------------------
"I Think It will Work"
Formerly Known As "Alok The Programmer" at CP
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
thanks, but I'm not familiar with MFC, I've never done anything with it...thanks for the advice btw!
|
|
|
|
|
I produce a document in MS word.
I added tables and I would like to add Rows to those tables by using
Rows.Add(VARIANT* BeforeRow) command
as fallowed but I could not do it.
How can I do it?
Thank you in advance.
m_Tables=Document.GetTables();
m_Selection=m_Table.Cell(2,6);
m_Selection.Select();
m_lpcstr="somestring";
m_Selection.SetText(m_lpcstr);
VariantInit(m_Var);
m_Var->vt=VT_VARIANT;
m_Var->pvarVal=(VARIANT*)2;
// or
m_Var->vt=VT_I4;
m_Var->lVal=2;
m_Table=m_Tables.Item(4);
m_Rows=m_Table.GetRows();
cnt=m_Rows.GetCount();
m_Row=m_Rows.Item(2);
m_Row.Select();
m_Rows.Add(m_Var);
|
|
|
|
|
Ive a CListCtrl
I would like to do the opposite of an InvalidateRect on a section.
i.e. I want to redraw the entire control EXCEPT a certain region (rectangle)
how does one go about this?
cheers
bryce
---
Publitor, making Pubmed easy.
http://www.sohocode.com/publitor
|
|
|
|
|
ValidateRect()
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it!
|
|
|
|
|
|
Hello dear programmers,
Please help me with this one ...
I'm having trouble copying a worksheet in VC++ (MFC).
I'm accessing an Excel object and trying to manipulate it.
So far, some function that i've used was working fine except the copy function of Worksheet class. There's no error during compilation, but at runtime a message is displayed stating that "Copy method of worksheet class failed."
By the way, I am using MS Office 2000.
Thanks in advance.
|
|
|
|
|
I wanaa to start timer on clicking button Btn_Start
and here i will disable button Btn_Start
(GetDlgItem(BTN_START ))->EnableWindow (FALSE);
SetTimer( 21, 1000 * 60 * 180, NULL);
as my calculations 1000 * 60 * 180 = 3 hours or 180 mint
is it ?
after expiry of 180 minuts in ON_TIMER Event
I will Enable Start Button
GetDlgItem(BTN_START ))->EnableWindow (TRUE);
KillTimer( 21 );
But it not complete its time of 180 mint ,,
it enable it early ,,,,
Y??
any reason
thanx
|
|
|
|
|
not sure what you're on about
but are you catching the OnTimer event?
and making sure you deal with only the correct timer event (21)
cheers
bryce
---
Publitor, making Pubmed easy.
http://www.sohocode.com/publitor
|
|
|
|
|
Wts is timers life time ,, means i wanaa say its maximum limit to set it..
if i set a timer for 24 hours ,, will work
or SetTimer (...) have any time range for timer
thanx
|
|
|
|
|
mate, i have no idea what you're on about
you have not provided enough information for anyone to give you any decent answer
bryce
---
Publitor, making Pubmed easy.
http://www.sohocode.com/publitor
|
|
|
|
|
According ot MSDN,Maximum limit is 0x7fffffff or 597 hr. for setting Timer
-----------------------------
"I Think It will Work"
Formerly Known As "Alok The Programmer" at CP
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
I have no idea what "wts" and "wanaa" mean. If you are looking for the max value for SetTime(...), look at the function prototype.
SetTimer(
HWND hWnd ,
UINT nIDEvent,
UINT uElapse,
TIMERPROC lpTimerFunc);
It looks like uElapse is of type UNIT, so probably the max number of milliseconds is UINT_MAX.
Details on UINT_MAX can be found at msdn.microsoft.com
|
|
|
|
|
Set timer interval to 1000 (1 second) when creating timer.
You will need to create a member data and then increment it in the timer:
CMyDialog::OnTimer(...)
{
m_seconds++;
// then you can calculate m_seconds and do whatever
// other code
}
|
|
|
|
|
You should use the value returned by SetTimer for KillTimer.
From MSDN
=========
Return Value from SetTimer(...)
The timer identifier of the new timer if the function is successful. An application passes this value to the KillTimer member function to kill the timer. Nonzero if successful; otherwise 0.
|
|
|
|
|
sir i am having one static link library file,i want to create an application by using that library,plz give me the steps which i have to follow in order to use the library
|
|
|
|
|
In my program, i m using CDaodatabase for database connectivity. i then use CDaorecordset to entry/modify data in the database.
My question is::
I do not use DSN anywhere in my program. Does CDaodatabase handle DSN internally. Wat is the better implementation - using DSN or using CDaoDatabase implementation? and wat is the main diff between the two?
|
|
|
|
|
CDaoDatabase constructs a CDaoDatabase object. The path to the database will have to be provided and connection can be opened with Open() method.
|
|
|
|
|
can u point out the difference between connecting vis CDaodatabase and connecting via DSN?
|
|
|
|
|
DSN stands for Data Source Name. Data Source can be a database, spreadsheet, text file etc. We assign DSN to a data source so that irrespective of the data source details and location, we can use that data source; add, modify or delete records, just by knowing it's DSN. From the application use CDatabase class to connect to a data source.
Where as in CDaodatabase, full path to the database needs to be provided to connect.
If the path of the data source changes, if a DSN exists, then changing path in the settings is all that is needed. Code doesnt have to be changed.
|
|
|
|
|
Dear programmers,
We use a device to provide X and Y coordinates similar to a mouse. Using VC++ I create a very small dialog box and refresh its position using the SetWindowPos funtion (at a rate of 120 HZ and setting it as TopMost window). I can also left-click by bringing the mouse to the corner of the small dialog's position and clicking and sending back the mouse cursor to its original position. This way I fully simulate a mouse cursor. Everything works perfect. Except when the window clicks on a menu (i.e. File, Edit, View, Tools, ...). Then the menu that contains all the menu items covers the small dialog box and user cannot see where they are pointing at.
Is there anyway I can highlight menu items when the position of my small dialg box is within the menu item's region? Just like when the mouse moves over the menu item? By the way, remember that the menu item is not a part of my program. It can be in any program.
This is the last part of my project. PLEASE PLEASE if you can think of a solution let me know. I have worked on this project for 4 months. I can further explain the program if you want.
Thank you in advance,
|
|
|
|
|
Hi everyone,
I am using the SetCursor function of VC++ and I want to be able to set the cursor type not just when the mouse is over my program (client area). I want the mouse cursor to change wherever it is. Any suggestion would be most greatly appreciated.
Thanks,
|
|
|
|
|
I have a CFormView that contains about 40 child dialogs, each of which contains at least 5 dialog controls (customer request, not our idea, so don't even think about suggesting another way to do this).
Can anybody come up with a way to allow the user to TAB between these dialogs using the tab key?
Basically I want the user to be able to tab from control to control, as if the chiold dialogs were one great big dialog.
The first person that comes up with something viable with not be verbally abused for one whole week, no matter how absurdly stupid their messages are.
------- sig starts
"I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|