|
if i want to load bitmap from browse path,how can i use here.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
By using the magical tool, Google and finding this[^] with it.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
|
|
|
|
|
Is it possible to split as follows
2 rows and one of the row into 3 columns, how can i do that?
|
|
|
|
|
|
I've tried the simple examples included in the MFC Feature Pack - Samples and not one of them show how to link=up a window-pane with it's sub-menu(a self created "Menu" ) ie System DB(pane) IDR-SYS_DB, Create, Add, Edit(Create, Add, Edit sub-menu selections(buttons)). The MDIDemo.sin only shows the "View" and "Window" panes and only the "Windows" pane has a menu attached to it but nowhere does it show how the linkage is made(or at least I can't find it.) Is there an example out there that someone may know of that will show how to link up "Panes" with the sub-menu "Buttons"? please point me to the web-page if you know of one. Thanks in advance.
A C++ programming language novice, but striving to learn
|
|
|
|
|
CreateFile() is failing and GetLastError() returns 2, file not found, when attempting to open any LPT port. The same code works on all previous versions of windows and I can successfully open COM1. Can anyone suggest what has changed in Windows 2008? Is there some kind of policy setting that disables all LPT ports by default?
|
|
|
|
|
|
Thanks for the suggestions but I've found out now it was down to how I was opening the port. I was treating the LPT port like a communication resource which requires the dwCreationDisposition to be set to OPEN_EXISTING. I used PROCMON.EXE from SysInternals to check what 'dir >LPT3' was using and that showed the dwCreationDisposition was set to CREATE_ALWAYS. A quick change to my program and all is working again. I've also tagged this information onto the MSDN help for CreateFile().
|
|
|
|
|
I was going to mention this in my initial reply but decided to leave it out.
Glad that you figured it out.
Best Wishes,
-David Delaune
|
|
|
|
|
Hi All,
I had a piece of code on COleDateTime.
COledateTime shiftStart;
if (shiftStart.invalid)
shiftStart += COleDateTimeSpan(1,0,0,0);
in this piece of code shiftStart is invalid when i do an arthimatic on this i am getting an assertion.
I want to convert the invalid datetime to valid datetime thru arthimatic.
in VC++6.0 there is no assertion as the COledateTime code in AFXOLE.INL dosent have assertion check.
in VC++ 9.0 ATLCOMTIME.INL have the assertion check for valid date.
how can i force the compile to use the old AFXOLE.INL or is there a way arround to fix it in the code?
Thanks Everyone.
|
|
|
|
|
pratap1980 wrote: how can i force the compile to use the old AFXOLE.INL
They're not adding the assertion in for fun - it's because what you're doing is (strictly) erronous.
You need to think about why your COleDateTime is invalid and fix it some other way.
It's always better to think beyond the immediate problem and find the root cause of your problem...
|
|
|
|
|
When handling this message, is it possible to get the text for the header that was clicked?
void CSomeFancyListCtrl::OnColumnclick(NMHDR* pNMHDR, LRESULT* pResult)
{
NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
..
..
*pResult = 0;
}
Is there a GetItem() or GetItemText() using either pNMHDR or pNMListView that would work? Thanks.
Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
|
|
|
|
|
As stated here[^], iSubItem tells you which column was clicked, then you can use this[^] to obtain a pointer to the header control itself and use this[^] to get the information you need about the column.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
|
|
|
|
|
Thanks for such an excellent response. It's perfect.
Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
|
|
|
|
|
I try to implement the FTP Command APPEND on a WinCe5.0 Device but get allways a access violation exception. Although the prgramm crashed the text was appended to the file on the server.
Thank you for your help.
hRootHandle = InternetOpen(TEXT("WinCeFtp"), INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0);
hFtpHandle = InternetConnect(hRootHandle, TEXT("server"), INTERNET_DEFAULT_FTP_PORT, TEXT("user"), TEXT("password"), INTERNET_SERVICE_FTP, 0, 0);
WCHAR szTemp[256];
wsprintf (szTemp, TEXT("APPE %s"), TEXT("DestFile.txt"));
int bRet = FtpCommand(hFtpHandle, TRUE, FTP_TRANSFER_TYPE_ASCII, szTemp, 0, &hResponse);
if (!bRet) {
wprintf(TEXT("FtpCommand failed, error: %i\n"), GetLastError());
return 1;
}
sprintf(buffer, "This data will be appended to the file");
DWORD dwLength = strlen(buffer);
if (!InternetWriteFile(hResponse, (LPVOID)buffer, dwLength, &dwWritten)) {
wprintf(TEXT("InternetWriteFile failed, error: %i\n"), GetLastError());
return 1;
}
InternetCloseHandle(hFtpHandle);
InternetCloseHandle(hRootHandle);
|
|
|
|
|
Where does it crash?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
|
|
|
|
|
It crashs in the InternetWriteFile function with a access violation exception.
|
|
|
|
|
You should set the second parameter to FALSE when don't excect answer from FTP server.
Or you need to call the InternetReadFile function before.
fExpectResponse
A Boolean value that indicates whether the application expects a data connection to be established by the FTP server. This must be set to TRUE if a data connection is expected, or FALSE otherwise.
|
|
|
|
|
Hai!
suppose
CString str = "This is our Book";
CString strSub = "my";
is there any function which can modify str with the value in strSub
like str.MODIFY(strSub, 9, 2);
then str must become "This is my Book"
|
|
|
|
|
Your productivity and efficiency will increase exponentially if you refer the documentation.
CString::Replace
|
|
|
|
|
Well, just think about the problem. You want to make a new string from a left section of the old string, some new string, and the right section of the old string.
That should be enough hints!
Iain.
|
|
|
|
|
Yeah perfect.
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
See the suggestion here.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
I have a vector that contains POSITIONs. When I try to push_back or clear, the program crashes. The callstack shows _invalid_parameter_noinfo in one of the frames. I googled and found a solution(defining _HAS_ITERA.... and _SECURE_SCL to 0) , but was not effective. I'm using VS2008 with MFC feature pack installed on vista.
Please help.
Thanks
|
|
|
|
|
Can be due to a lot of reasons. Could you please provide relevant code snippet and call stack during crash?
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|