|
Hello,
Thank you for your rapid answer, but it didn't worked...
|
|
|
|
|
Ok, try %09.4
That one works, I tested it. 0 is flag telling to fill the minimum length with zeroes, 9 is the length, 4 is the precision (in case someone wonders about that).
------------------------------------------
Experience is the name every one gives to their mistakes.
-- Oscar Wilde
Experience is one thing you can't get for nothing.
-- Oscar Wilde
|
|
|
|
|
Thank you!
this is one of the stupid questions that are very easy but that their answers are hard to find in the MSDN.
Once again thank you...
|
|
|
|
|
statstring.Format(" AB: %09.4lfmm - CD: %09.4lfmm - EF: %09.4lfmm - GH: %09.4lfmm",CAB,CCD,CEF,CGH);
0 indicates to fill up with zeros before the comma, 9 gives the minimal length of output (4 before the comma + comma + 4 after comma), 4 gives the numbers after the comma
--
karl
|
|
|
|
|
Thank you!
this is one of the stupid questions that are very easy but that their answers are hard to find in the MSDN.
Once again thank you...
|
|
|
|
|
I need to simulate the TCN_SELCHANGE message when my dialog starts up. Would I do this by using SendMessage from withing my dialog box? What is the actual syntax I would need to do this using Win32? eg. SendMessage(hDlg...?
|
|
|
|
|
According to MSDN It needs to be passed as a WM_NOTIFY message.
I recommend that you avoid this complication and simply put the code for your SELCHANGE in a separate place that's easy to call, like inside a separate function or perhaps your own message. Then you can just call that directly from the WM_INITDIALOG logic.
Regards,
Alvaro
Well done is better than well said. -- Benjamin Franklin
(I actually prefer medium-well.)
|
|
|
|
|
That is what I actually did, I have reproduced the code for the first tab but I thought maybe it would be better logic to write the code once and then just send the message. Why do you think that it is better this way?
|
|
|
|
|
I am trying to make a little utility, that will delete from workstations an old network printer connection, add new one and set it as the default printer. I am using NT4.0.
To be able to set the default printer, I need to know the port name. When I use PRINTER_INFO_2, I get the IP-address like "123.32.12.89:XJPRINT". I got the same using PORT_INFO.
I would need to know the "weird" NExx: port name. Like currently my default printer is in port NE04.
I can find in the registry a list of my printers (e.g. \\SERVER01\HP4100 -> "winspool,Ne04:,15,45"), but is there an another way to get that "Ne04" information??
Ps. Whatta heck is that NExx: for??? Compatibility issue with older windows versions?
------------------------------------------
Experience is the name every one gives to their mistakes.
-- Oscar Wilde
Experience is one thing you can't get for nothing.
-- Oscar Wilde
|
|
|
|
|
..and so I digged the registry.
(just talking to myself)
------------------------------------------
Experience is the name every one gives to their mistakes.
-- Oscar Wilde
Experience is one thing you can't get for nothing.
-- Oscar Wilde
|
|
|
|
|
The world of drivers... abandon all hope, ye who enter!
Even a broken clock is right twice a day.
|
|
|
|
|
hi there,
I have a dialog and in it i have a button on which I want to send mail to a particular person. It just has the email address like someone@someone.com. when i click on it I want this E-mail to be entered into outlook's To address field. How can i do so. My guess was that there should be some function or methind doing so but could not find any. Can Anyone please help..thanks in advance
Himanshu
|
|
|
|
|
Use ShellExecute with the third parameter set to "mailto:someone@someone.com". This will use the default e-mail sender which you have chosen for yourself, either Hotmail, Outlook, etc...
|
|
|
|
|
Hi,
thanks for your help..but i dould not understand how to use it can you quote and example. here i see shellexecute as
HINSTANCE ShellExecute( HWND hwnd,
LPCTSTR lpOperation,
LPCTSTR lpFile,
LPCTSTR lpParameters,
LPCTSTR lpDirectory,
INT nShowCmd
);
there are few parameters i don't know.
thanks in advance.
himanshu
|
|
|
|
|
thanks for your help i did it with the same.
thanks a lot..
cheers..
Himanshu
|
|
|
|
|
Hi!
I have to get the free space of a Network Ressource (shared folder). I used Windows 2000 all the time, but MSDN says, that the source depends on the OS. So for Windows XP it should be different.
<br />
NETRESOURCE NR;<br />
ZeroMemory(&NR, sizeof(NR));<br />
NR.dwType = RESOURCETYPE_DISK;<br />
NR.lpLocalName = "N:";<br />
NR.lpRemoteName = "\\\\MICHAEL-COMPUTER1\\NetShare";<br />
DWORD Res = WNetAddConnection2(&NR, NULL, NULL, 0);<br />
<br />
unsigned long secPerCluster;<br />
unsigned long bytesPerSector;<br />
unsigned long freeClusters;<br />
unsigned long totalClusters;<br />
int space_remaining;<br />
<br />
GetDiskFreeSpace("N:\\", &secPerCluster, &bytesPerSector,&freeClusters, &totalClusters );<br />
<br />
space_remaining = secPerCluster * bytesPerSector * (freeClusters/1000) ;<br />
<br />
CString str;<br />
str.Format("%i",space_remaining);<br />
AfxMessageBox(str);<br />
I read the whole MSDN article - but
Thanks!!!
mfg mike
PS: Sorry for my bad English
|
|
|
|
|
Is there any easy way to prevent the selection rectangle from following my mouse when clicking and dragging on the CListCtrl ?
Without having to use OwnerDrawor CustomDraw???
Thanks!
"Two wrongs don't make a right, but three lefts do!" - Alex Barylski
|
|
|
|
|
Add the LVS_SINGLESEL style to the control.
--Mike--
When 900 years old you reach, look as good you will not. Hmm.
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Thats the catch. I need multiple selection. CustomDraw or OwnerDraw, will that work?
Thanks
"Two wrongs don't make a right, but three lefts do!" - Alex Barylski
|
|
|
|
|
Hockey wrote:
Thats the catch. I need multiple selection
Ah, in that case handle the LVN_MARQUEEBEGIN notification and return TRUE to cancel the marquee.
--Mike--
When 900 years old you reach, look as good you will not. Hmm.
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Very cool...Thanks alot
Happy new years! (in about 6 morre hours)
"Two wrongs don't make a right, but three lefts do!" - Alex Barylski
|
|
|
|
|
Quick question
Why does the following not work?
BOOL CListCtrlEx::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)
{
LPNMLISTVIEW pnmv = (LPNMLISTVIEW)lParam;
switch(pnmv->hdr.code){
case LVN_MARQUEEBEGIN: break;
return TRUE;
}
return CListCtrl::OnNotify(wParam, lParam, pResult);
}
Thanks again
"Two wrongs don't make a right, but three lefts do!" - Alex Barylski
|
|
|
|
|
You have the break in the wrong place
--Mike--
When 900 years old you reach, look as good you will not. Hmm.
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Shite...I didn't even see that...
Thanks again!
"Two wrongs don't make a right, but three lefts do!" - Alex Barylski
|
|
|
|
|
I have a class, named MyListCtrl which is inherited from CListCtrl. Why I didn't get LVN_MARQUEEBEGIN notification in MyListCtrl::OnNotify() when clicking and dragging???
|
|
|
|