|
I think you would need to call:
RedrawItems(index, index);
UpdateWindow();
To move up the WM_DRAWITEM calls.
Roger Allen - Sonork 100.10016
If your dead and reading this, then you have no life!
|
|
|
|
|
Roger,
the problem still exists.
|
|
|
|
|
i have two IDD forms (MFC) and i want to be able to click a button on one to open up the other i have added the onclick handler but just cant get the code for opening anywhere can anyone help
|
|
|
|
|
|
And if it is a CFormView you need to create a new document, like this.
POSITION templatePos = GetFirstDocTemplatePosition();
while(templatePos != NULL)
{
CDocTemplate* pTemplate = GetNextDocTemplate(templatePos);
CString strDocName;
pTemplate->GetDocString(strDocName, CDocTemplate::docName);
if(strDocName == "Form you want to open")
pTemplate->OpenDocumentFile(NULL);
}
Alfredo
|
|
|
|
|
I've created an ActiveX control using MFC ActiveX control wizard. But, when I add that control to another MFC Dialog Window, I couldnot run the application. When run in the debug mode, i couldn't include the necessary system dll files. Help me.
Shenthil.
|
|
|
|
|
Have the controls been registered?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Hi all,
I wanna Create a word document,and then create a table with 3 cols and 5 rows,fill the table with some text, and then insert a row at the end of the table, then fill the text"ok" in the new rows.
Could somebody give me a hand and show me some samples related to VC++ operateing the office WORD?
Thanks!
|
|
|
|
|
|
Sorry, if this seems like a stupid question, but I simple cannot figure out how to run macros in VS.Net 2003.
I have pasted some macro functions into the MyMacro module, but when I try to assign a key to the macro only the predefined macros in the Samples module appear in the listbox.
Any help is much appreciated.
|
|
|
|
|
Can u pls help me out with code in VC++.
I have got a bitstream/ compressed form of audio in a file "compresed.bts" by passing the Audio wav file through some graph filters in DirectShow.
Precisely I have used GSM 6.10 Encoder as a filter. Now how do I decode this Bitstream back to the original wav file. Please help !!!
Do I have to use decode filter in the playback graph but I do not know how to get the GSM 6.10 decoder filter.
Pls help....
|
|
|
|
|
hi,
my project is using some third party controls(crystal reports) i need to know what are all the dll depends on the project. any one help to me.
thanks in advance.
|
|
|
|
|
Use the Dependency Checker utility that ships with Visual Studio.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
There is concept of CODEPAGE in VC++. How I can use this feature, if I want to make my application in a language like Greek or Gujarati? I need more help on the CodePage property. How we can use it or define it in our applicaiton?
Gaurang Shah
|
|
|
|
|
Hi everybody!
Do someone know how to compare sequence number for packets I recieve? I will check if there is a packet missing when I recieve mpeg-2 packets.
Thankful for your help,
|
|
|
|
|
I want to access database which is in MY SQL on Linux machine from my "C" prgram without creating DSN. For that i have used function SQLDriverConnect as follows.
#define MAXBUFLEN 255
SQLHENV hEnv = SQL_NULL_HENV;
SQLHDBC hDBC = SQL_NULL_HDBC;
SQLHSTMT hStmt = SQL_NULL_HSTMT;
SQLCHAR ConnStrIn[MAXBUFLEN] =
"DRIVER={MYSQL ODBC 3.51 driver};SERVER=192.168.1.60;"
"UID=mWD=m;DATABASE=ftp;";
SQLCHAR ConnStrOut[MAXBUFLEN];
SQLSMALLINT cbConnStrOut = 0;
RETCODE retcode; // Return code
retcode = SQLDriverConnect(hDBC,// Connection handle
NULL, // Window handle
ConnStrIn, // Input connect string
SQL_NTS, // Null-terminated string
ConnStrOut, // Address of output buffer
MAXBUFLEN, // Size of output buffer
&cbConnStrOut,// Address of output length
SQL_DRIVER_NOPROMPT);
It returns SQL_ERROR.
Can you please suggest me where i am going wrong. I think it is in the "ConnStrIn".
|
|
|
|
|
I have a dialog with some buttons and MFC GridCtrl's. When the focus is on the last cell of the grid and the tab key is pressed, I want to set the focus to the next control. How do you do this?
I have played around with the GetDlgCode() etc. but haven't really been able to get this working.
|
|
|
|
|
Have you tried SetFocus() ????
Best Wishes,
ez_way
|
|
|
|
|
I think I haven't explained myself correctly. What I need to know is where to catch the tab key and set the focus to the next control. Normally (e.g. with buttons etc.) the dialog seems to handle this.
|
|
|
|
|
Hi Brian
Please don't yell for a stupid idea but the tab order you set with CTRL+D shows the tabs,... yes?
Well with that in mind can you not set focus whereever you wish?
I know this is really not a great answer but it worked for me in a tabbed prj.
Best Wishes,
ez_way
|
|
|
|
|
Martin,
thanks for your reply, but that will not work for me as my controls are dynamically created.
|
|
|
|
|
Oh yes, one more thing
when you set the focus please make sure to note the overload function.
SetFocus(GetDlgItem(hDial, ID_VERT_RES));
Best Wishes,
ez_way
|
|
|
|
|
Yes sure but what about using TRY/CATCH to do the validation?
Best Wishes,
ez_way
|
|
|
|
|
|
Validating control contents when switching focus from one control to the next is done by handling the EN_KILLFOCUS notification sent by the edit control that is losing focus.
You could trap TRY/CATCH this and send it along the way in a altered state!
Best Wishes,
ez_way
|
|
|
|