|
> 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.
|
|
|
|
|
its called enthusiasm
damn fine quality too ... why i remember when i was a youngster ...
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
I remember when I was a youngster, but the memory is fading fast... ( I'm 32, and everyone else here is barely 20 ).
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
Hello,
I would like to know if it is possible to insert an item(i mean a string) on two lines in a List Control.
I try something like this but it doesn't work:
MyListCtrl.InsertItem(0,_T("my great \nstring..."));
Thanks for help
Gero
|
|
|
|
|
I made image-bar program to manage in window
It is operated in win98 well but
It isn't operated in win2000
I want to know each image management method.
quickly!!!-_-;;
|
|
|
|
|
Pl. do let me know using VC++, how to convert a custom file format PDS(Picture description format) to PDF format used in the acrobat.
Although this can be done when you print the document using the adobe acrobat distiller, but how this can be done programatically.
How to convert this format to a GDI Format. Please give some ideas on this.
With Regards,
K M Bansal.
|
|
|
|
|
hi,
you can get the acrobat pdf sdk for converting files to pdf format.
if you are talking about the image on the client dc .. you can save it to metafile and do the necessary conversion.
hope this helps
Cheers
Kannan
|
|
|
|
|
How to create a CButton array, and how to use it like Create(),
I implement it :
CButton* m_Button;
m_Button->Create("Button1",WS_VISIBLE|WS_CHILD|WS_TABSTOP,rect,this,1111);
I run it ,and have some problem, then crash ....
please help me ...
thanks.....
|
|
|
|
|
CButton* m_Button;
m_Button->Create("Button1",WS_VISIBLE|WS_CHILD|WS_TABSTOP,rect,this,1111);
You defined a pointer to a CButton object but you have not allocated space for it. The pointer points to some memory space for which you do not own and is not a CButton object. So when you call Create on the m_Button pointer it will crash because you are accessing an address space for which you do not own.
Add "= new CButton()" to the end of your CButton* m_Button declaration like so:
CButton* m_Button = new CButton();
Then you can call Create on the pointer.
Regards,
-Erik
|
|
|
|
|