|
You got to set the DEVMODE in CPrintDialog before you call DoModal(...) making a call afterwards will not work.
|
|
|
|
|
How can I draw some arrows and some lines in the ClistView?
When I click one item in the ClistView, the item's color turns red, how can I do?
help me,thank you very much!
|
|
|
|
|
A wonderful article by Michael Dunn..
http://www.codeproject.com/listctrl/lvcustomdraw.asp[^]
Love Forgives--Love Gives--Jesus is Love <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
thank you very much.It is very helpful for me.
|
|
|
|
|
Dear Owner drawn,I want to ask you if it is the best method when I draw some arrows and some lines in the ClistView?how to do it effectively?thank you very much!
|
|
|
|
|
Anyone familiar with the TB_CUSTOMIZE message?
I'm looking for an example in Win32 C++ code.
Thanks in advance,
Ward
|
|
|
|
|
LRESULT MsgNotify(HWND hwnd, UINT uMessage, WPARAM wparam, LPARAM lparam)
{
static UINT i=0;
LPNMHDR lpnmhdr;
lpnmhdr = (LPNMHDR)lparam;
if (lpnmhdr->code == TBN_QUERYINSERT || lpnmhdr->code ==
TBN_QUERYDELETE)
{
return TRUE;
}
if (lpnmhdr->code == TBN_GETBUTTONINFO)
{
LPTBNOTIFY lpTbNotify = (LPTBNOTIFY)lparam;
char szBuffer [20];
if (lpTbNotify->iItem < 12)
{
lpTbNotify->tbButton = tbButtonNew[lpTbNotify->iItem];
LoadString(hInst,
4000+ lpTbNotify->iItem,
szBuffer, sizeof(szBuffer)/sizeof(szBuffer[0]));
hr = StringCchCopy
(lpTbNotify->pszText,
sizeof(lpTbNotify->pszText)
/sizeof(lpTbNotify->pszText[0]),
szBuffer );
if(SUCEEDED(hr))
{
lpTbNotify->cchText =
sizeof(szBuffer)/sizeof(szBuffer[0]);
}
else
{
TODO: Write error handler.
}
return TRUE;
}
else
return 0;
}
return 0;
}
Love Forgives--Love Gives--Jesus is Love <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
This was what I already found myself on the msdn site. But it is not a very complete example, is it?
It is somewhat the only example I was able to find on the Internet.
But thanks anyway,
Ward
|
|
|
|
|
Yeah it is complete with the one that I didn't paste. Search in MSDN documentation for the other one.
The search is titled "Using toolbar controls".
It has got a comprehensive coverage of what you want. I just pasted the interesting(for me) part.
Love Forgives--Love Gives--Jesus is Love <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
Ok, I will give it an in depth look
Ward
|
|
|
|
|
Where is TB_CUSTOMIZE event used or processed here?
-Prakash
|
|
|
|
|
TB_CUSTOMIZE is to be send to the toolbar itself. The toolbar then sends notifications to the sender of TB_CUSTOMIZE.
When you properly return data on these notifications, a customize dialog pops up. But this last part is the trickiest.
Ward
|
|
|
|
|
This is what i got after doing a brif search in google hope its useful
TB_CUSTOMIZE
-------------
Display the Customize dialog for a toolbar
The standard windows customization dialog for toolbars can be displayed by sending the toolbar the TB_CUSTOMIZE message.
SendMessage(hwndToolbar, TB_CUSTOMIZE, 0, 0);
You must remember to handle the TBN_QUERYDELETE and TBN_QUERYINSERT notifications, and return non-zero for both of these. Without them, the customize dialog will appear very briefly and then vanish.
-Prakash
|
|
|
|
|
This I already found by myself.
But thanks anyway for doing the trouble to do the search.
Ward
|
|
|
|
|
in a video stream, user will select an region/object in the first frame
i an in need of algorithm to set the all the pixel to BLUE except the selected region , in all the frames of the video stream,
can any of u suggest me, or help me in finding some useful links/algori/free source/lib for it. vc++(mfc)6.0
|
|
|
|
|
I am devloping an application for Window CE.NET device running on x86 board.I want to debug my program in my workstation(a window xp based pc)by conecting the target device through eVC++'s platform manager.HOW COULD I CONNECT THE TARGET DEVICE USING TCP/IP FOR WINDOW CE?
I have selected the startup server as manual server,then the platfom manager dialogg box gave some file names to be present in my target device and told to run a command line to run in my target device.I ahve searched for those files,ofcourse they are present there in my target device but that command line is not working in my target device.PLZ help me...
thanx in advance.
birajendu
CyberG India
Delhi
India
|
|
|
|
|
Hello,
I'm looking for the easiest way to find the folder of a file. I have a string that represent the path to a file, something like:
C:\Temp\Test\File1.txt
From that path I want to retrieve the folder of the file, which is:
C:\Temp\Test\
Ok, so far so good, not very difficult to do. But now, the path can also be relative, so it can take one of the following form:
File.txt (if the file is in the working directory)<br />
..\Test\File1.txt
The purpose is to append to the resulting string another filename or folder:
C:\Temp\Test\OutputDir\
Is there any simple way of doing that (without having to check every possible case) ? Maybe something like opening the file and then from that retrieve its folder...
Any suggestion are welcome
|
|
|
|
|
Create an absolute or full path name for the specified relative path name.
char *_fullpath(
char *absPath,
const char *relPath,
size_t maxLength
);
wchar_t *_wfullpath(
wchar_t *absPath,
const wchar_t *relPath,
size_t maxLength
);
Each of these functions returns a pointer to a buffer containing the absolute path name (absPath). If there is an error (for example, if the value passed in relPath includes a drive letter that is not valid or cannot be found, or if the length of the created absolute path name (absPath) is greater than maxLength) the function returns NULL.
Love Forgives--Love Gives--Jesus is Love <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
Thaks
That's funny because I just figured it out how to do it (the same as you) and I wanted to post a message here to explain.
And to complete what you said, I can then call _splitpath to retrieve the drive letter and combining it to the directory path to obtain what I'm looking for.
But thanks for your answer
|
|
|
|
|
I was going to give you a sample code.
Because of you I got something to learn. He he. That's why I go hunting in these forums. He he
Love Forgives--Love Gives--Jesus is Love <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
Cedric Moonen wrote: I'm looking for the easiest way to find the folder of a file.
Programmers are LAZY.
Love Forgives--Love Gives--Jesus is Love <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
Owner drawn wrote: Programmers are LAZY.
This is sooo true
|
|
|
|
|
(if the file is in the
working directory)
Use GetModuleHandle as ur console Module and File.txt are same Directory
never say die
|
|
|
|
|
You can also use PathRemoveFileSpec() to separate the pathname from the filename. Use PathRelativePathTo() for your second requirement.
"The words of God are not like the oak leaf which dies and falls to the earth, but like the pine tree which stays green forever." - Native American Proverb
|
|
|
|
|
Thank u Sir
never say die
|
|
|
|