|
I want to display data from an Access file in a List Control .For example ,a table in access has 2 fields name & address .I want to display it usng a List Control.Any such example will do
Rudra
|
|
|
|
|
Hi !
I have created my own ActiveX control, but I can not insert it on Word, what can I do to make it available for MS-Word document ?
Thanks for all, bye !
Braulio
|
|
|
|
|
Hi
I'm using the WriteFile and ReadFile WINAPI to write/read from a COM port periodically.
The protocol is : first wirte to a port and then read the response from a port (=device). The write operation occures every 50 msec at least.
Every second attempt to call WriteFile fails and GetLastError returns ERROR_OPERATION_ABORTED. Then I use PurgeComm to clean a port after the failure. The next call to WriteFile succeedes, ReadFile succeedes, and the next try to write is cancelled and so on.
Does anybody know what can cause this error?
Thanks
Natalie
|
|
|
|
|
I don't have a direct answer as to the cause, but you might want to look into overlapped IO in a situation like this - creating a file with FILE_FLAG_OVERLAPPED allows simultaneous reads and writes, and gives you a more windows like async type of operation.
Takes a little more work to set up - there's good stuff on codeproject to help - (pj naughter's class may use this approach, or both - not sure) - but once you get it going its nice - polling is soooo passe...
And don't be scared by the docs - overlapped io is available for COM devices on win9x.
Just a thought.
|
|
|
|
|
<<< In the name of GOD >>>
Hi.
Q1.
What is the performance Buffer for reading a writing in file ?
For example CFile don't use of Buffer but CStdioFile and CArchive use Buffer !!!
Do Buffer mean that my file is Binary or text mode ?
Please explain to me.
Which is faster and better ?
Q2.
Can i use of typeBinary flag for reading and writing in file by CFile class ? Why ?
Thanks.
Hadi Rezaie
|
|
|
|
|
<<< In the name of GOD >>>
Hi.
I have EditBox(m_MainEdit, it is Editbox member variable) in CEditorDlg dialog.
I want to select text from m_MainEdit, when i have focus in COtherDlg.
The fact i want to accessibility to m_MainEdit without CEditorDlg.
I wrote some code but thease codes won't work:
#include "Editordlg.h"
.
.
.
void COtherDlg::OnFind()
{
CEdit Temp = CEditorDlg::m_MainEdit;
Temp.SetSel(0, -1);
}
Please help me ...
Hadi Rezaie
|
|
|
|
|
I'm programming a application with the new features of Win2000.I use the function SetLayeredWindowAttributes(...),but it does not work.The error displayed is "SetLayeredWindowAttributes' : undeclared identifier ".My OS is Windows 2000 professional with Visual C++6.0 Enterprise which I just updated to Service Pack 6.
What the problem may be? Thanks a lot.
|
|
|
|
|
Do you have the win2k sdk? If not you can download it from m$ or you can read search here at cp for an article that use that function!
Rui Lopes
|
|
|
|
|
> My OS is Windows 2000 professional with Visual C++6.0 Enterprise
> which I just updated to Service Pack 6.
SP1 for Windows 2000 + SP5 for Visual C++ 6.0 = SP6
|
|
|
|
|
I would like to know how to underline the lines of a listview with different colors with MFC. Whom can you help me?
|
|
|
|
|
Hi all,
I'm using ADO for accessing a MS Access database file in a DLL. I then use this DLL in my application. The problem happens when I try to start any NT service (for ex, IIS Admin Service) and my application at the same time: my application seems to hang forever. I put some debug logging and find out that it get stuck in a function _RecordsetPtr->Open(...), I then try to use _ConnectionPtr instead, it also get stuck in _ConnectionPtr->Open(...). I am very confused and I don't know what's going on. Have anyone encountered this problem before? Please help.
Thank a lot,
Rocky
|
|
|
|
|
I'm looking for a way to create a texture using a .tif file in DX8. Jpgs and bmps are no problem, but I need the alpha component of a .tif file. I tried using the D3DXCreateTextureFromFileEx() function, but I can't seem to get it to work properly.
Any help is appreciated,
:
Thierry
|
|
|
|
|
Hi,
I would like to know if there is a limit number of transactions we can do when using DDE by including <ddeml.h>.
I am writing an application to read cells from Excel. This application will read more than 20.000 cells in a spreadsheet. The application starts working well, but after reading about 2000 cells, it crashes and I need to restart the computer because nothing works anymore.
The application is a dialog based app and works like this:
DdeInitialize(&idInst, (PFNCALLBACK)&DdeCallback, hInstance),
APPCMD_CLIENTONLY, 0);
//Setup HSZs for Service and Topic
hszService = DdeCreateStringHandle(idInst, szServerApp, CP_WINANSI);
hszTopic = DdeCreateStringHandle(idInst, szTopic, CP_WINANSI);
//Connect to server app
srvHndl = DdeConnect(idInst, hszService, hszTopic, NULL);
if(srvHndl == 0L) {
AfxMessageBox("ERROR", MB_OK|MB_ICONSTOP);
return;
}
else
{
//. . .
// This code is inside a loop that will get the cells
strcpy(szSendStr, "R");
strcat(szSendStr, lineNo);
strcat(szSendStr, "C1");
testData = DdeCreateStringHandle(idInst, szSendStr, CP_WINANSI);
retData = DdeClientTransaction(NULL, 0, srvHndl, testData, CF_TEXT, XTYP_REQUEST, 5000, NULL);
retD = (LPTSTR)DdeAccessData(retData, NULL);
DdeUnaccessData(retData);
DdeFreeStringHandle(idInst, testData);
//. . .
}
DdeUninitialize(idInst);
Thanks a lot for any help
Vinicius Pontes
vinicius.pontes@uol.com.br
|
|
|
|
|
Hello,
Im new to Programing, this maybe a dumb problem but Im beating my head aginst the wall.. I am trying to nest quotes into a string.. this is what I have tried..
CString strServerName;
CString strRemoteExecute;
strServerName = m_strServerList;
strRemoteExecute = """Remote Execute""";
if (m_bRemoteExec == TRUE)
WinExec("wviewnt -t"+strServerName+" -c"+strRemoteExecute,SW_SHOW);
From a command line to execute the wviewnt.exe you need to use quotes around the command, for example:
wviewnt.exe -tServerName -c"Remote Execute"
Any help would be appreciated..
Thanks
Rob Jones
|
|
|
|
|
I'm afraid that this just won't work, as you have found. To input special characters into a string, the character \ is used. This bit me a fair bit when I first started, because I always forgot that to put one slash into a string I needed to put two (\\). The first tells the compiler that you're about to specify a character that is otherwise unavailable, and the \ is unavailable because it is in charge of this task. So to put a new line into a string, to for example put two lines into an AfxMessageBox, it's \n\r ( newline/return combination ). And to put in quotes, it \"
Like this:
CString s = "\"this is a quote\"";
AfxMessageBox(s);
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
THANK YOU VERY MUCH!!!
I just put that into my code and everything works great...
Thanks again!
Rob Jones
|
|
|
|
|
CString Sample = "this is one sample with \"quotes\" nested"
I think that was the solution,...
HTH
Braulio
|
|
|
|
|
I'm developing a VC++ app that has a form view inside of a MDI child window. In what appears to be a random occurence, the program will crash when creating the MDI child window (while setting the window title text). The text is set using the standard MFC method below:
void CWnd::SetWindowText(LPCTSTR lpszString)
{
ASSERT(::IsWindow(m_hWnd));
if (m_pCtrlSite == NULL)
::SetWindowText(m_hWnd, lpszString);
else
m_pCtrlSite->SetWindowText(lpszString);
}
The program is crashing because m_pCtrlSite (a pointer to an ActiveX control) is being reassigned to a value of 0x0000041 (a garbage value), when it should be null. I've gathered what I can from the call stack and can't seem to figure out why it's being reassigned (and it doesn't happen every time, so it's difficult to catch/debug). Has anyone seen a problem like this? Perhaps a memory leak? I've already tried the Rebuild All approach. Any help would be greatly appreciated.
|
|
|
|
|
Hi,
I have created one ActiveX controls with ATL ( the control inherits from FullControl), I can put it on the ActiveX container tool that Visual C++ ships, but If I try to copy from there and paste to Word ( for example), then it doesn´t show anything, can anyone tell me why this happens ?
Thanks a lot, Bye
Braulio
/* ---------------
Braulio Díez
Software Programmer
------------------- */
|
|
|
|
|
how to make non rectangle dialog form;)
|
|
|
|
|
use the function "SetWindowRgn" in the "OnInitDialog"-function of the dialog you wish to change
|
|
|
|
|
There is a demo project here on CodeProject illustrating this.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
I use dis function but I whant make dialog form like BMP file;)
|
|
|
|
|
I'm STILL trying to append my MP3 files. I have used Hex Workshop to manually append files that won't write, to prove to myself that the same file will work once it has 128 bytes at the end awaiting inclusion. Now, here's the clincher. I put my code into switch statements to make it easier to follow. The following:
fHandle = CreateFile(filepath,
STANDARD_RIGHTS_ALL,
0,
0,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
0);
SetFilePointer(fHandle, -128, NULL, FILE_END);
WriteFile(fHandle, "TAG", 3, &sentinel, 0);
WriteFile(fHandle, myID3.title, 30, &sentinel, 0);
WriteFile(fHandle, myID3.band, 30, &sentinel, 0);
WriteFile(fHandle, myID3.album, 30, &sentinel, 0);
WriteFile(fHandle, myID3.year, 4, &sentinel, 0);
WriteFile(fHandle, myID3.comment, 30, &sentinel, 0);
WriteFile(fHandle, &myID3.genre[0], 1, &sentinel, 0);
CloseHandle(fHandle);
will rewrite the ID3V1 tag in the last 128 bytes, but replace the -128 with a 0, and nothing. The Write functions return invalid handle. Any suggestions gratefully accepted.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
I solved it - I still don't know why my file would not append, but I found another bug in the ID3 code I am using, which left the handle open if there was no ID3. Now I am using a stream to add 128 bytes, then writing the info out with the above code.
Thank goodness - it only took me two nights. As an aside, am I the only one who programs all day, comes home and works on my own code ? What's wrong with me ?
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|