|
If you have the hyperlink, call ShellExecute with the "open" verb and the url to show. Or if you have the IWebBrowser2 object you can call the IWebBrowser2::Navigate with a Target of "_BLANK" which will open it in a new window.
Cheers,
-Erik
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
My thoughts are my own and reflect on no other.
|
|
|
|
|
I really need somebody to help me!!! HOW can I change the text color from a CRichEditCtrl
I've tried everything but I can't !!!
|
|
|
|
|
Look at SetCharFormat in the CRichEditView class. In the CRichEditCtrl class you have a little more flexibility as you can use the SetDefaultCharFormat, SetSelectionCharFormat or SetParaFormat for character, selected text or current paragraph respectively. To actually set the color, look at the crTextColor member in the CHARFORMAT structure.
http://www.ratebeer.com
|
|
|
|
|
Can you tell me How to get all machine's MAC Address at Winnt LAN?
thanks in advance!
liuty
2001.9.5
|
|
|
|
|
There was somewhere an article about that on CodeProject
Use the CodeProject's search-function to find the article.
"MAC address" should be enough as a keyword
regards
|
|
|
|
|
I just wrote a code to select multiple files via the CFileDialog.
But it seems that in every case the while-loop is executed only 3 times even if more than three files have been selected
CFileDialog selfiles(TRUE,"mp3","*.mp3",OFN_ALLOWMULTISELECT | OFN_ENABLESIZING,"MP3 Files (*.mp3) | *.mp3 ||",NULL);
CStringArray array;
if(selfiles.DoModal() == IDOK)
{
POSITION pos=selfiles.GetStartPosition();
int counter=0;
while(pos)
{
CString file = selfiles.GetNextPathName(pos);
array.Add(file);
counter++;
}
UpdateData(FALSE);
}
i.e. for example if I selected 7 files and try to get the fifth filename with array.GetAt(4) I get a debug assertion
|
|
|
|
|
Oh sorry, I just found out by myself.
Was a stupid mistake
Don't care about this code anymore, it's correct, I just inserted GetNextPathName accidently two times and didn't notice it
|
|
|
|
|
Try to give some buffer for paths, it better for OFN_ALLOWMULTISELECT style.
Try! It long time when I did it last time.
Good luck.
For example like this:
CFileDialog selfiles(TRUE,"mp3","*.mp3",OFN_ALLOWMULTISELECT |
OFN_ENABLESIZING,"mp3 Files (*.mp3) | *.mp3 ||",NULL);
TCHAR* buffer;
buffer = new TCHAR[1024*5];
selfiles.m_ofn.nMaxFile = 1024*5;
selfiles.m_ofn.lpstrFile = buffer;
CStringArray array;
if(selfiles.DoModal() == IDOK)
{
POSITION pos=selfiles.GetStartPosition();
int counter=0;
while(pos)
{
CString file = selfiles.GetNextPathName(pos); array.Add(file);
counter++;
}
UpdateData(FALSE);
}
delete []buffer;
Viliam Dolinay
|
|
|
|
|
How can i disable or skip ALT-TAB in API project(not MFC) ...
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
HOWTO: Disable Task Switching on Win32 Platforms
ID: Q226359
|
|
|
|
|
Hi Tim, and thanks for reply ...
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Maybe I'm coming down a bit hard here, but this is my opinion.
Some think there are legitimate resons to disable ALT-TAB, I'm not one of them.
Perhaps the first priority would be to handle the DX "surface lost" stuff. There's not much that is more annoying than a game that crashes because I had to ALT-TAB out of it (to do something else), and then when trying to get back it crashes. If it was, it would be the neverending story of kernel-memory we can do nothing about, forcing reboots every now and then...
I am the one owning my machine, and as such I should be the one making decisions of when and how I'm allowed to do what with my machine.
|
|
|
|
|
That is where you are wrong, there are reasons to disable the computers ALT-TAB and other keys, the application that I am developing at the moment is for a network cafe. He doesn't want the people to be able to use the computer until he enables it. Being able to ALT-TAB out of the dialog makes that a pretty pointless exercise doesn't it.
|
|
|
|
|
Prompt as in the program to learn(find out) how many pages it is transmitted on the printer from other program
|
|
|
|
|
Hi, I´ve made a meteo program that draws 4 graphs, I´ve included a function detecting screen resolution, and it changes lines coordinates to fit them into the window, but when you change Windows screen configuration to 'big fonts' the draw exceed the window. Any solution to this problem? or, Is there any MFC function detecting if Windows has big or small fonts selected?
Thank you.
|
|
|
|
|
there is reg-key changing with font size change but it is not directly font size
see http://www.codeproject.com/dialog/cresizeablefiledialog.asp bottom
t!
|
|
|
|
|
You can use CDC::GetDeviceCaps(LOGPIXELSX). If it returns 96, system is using normal, 'small' fonts. Note that there are not only 'large' and 'small' settings - users can select any scaling. Your drawing routines should use GetDeviceCaps(LOGPIXELSX) and GetDeviceCaps(LOGPIXELSY) to scale the output.
KB article Q177795 has other related info.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Hi guyes,
Small problem of heap corruption (What can i do ?). Am getting this friendly error when i run through the debugger (VC++ 6.
0) in my program:
HEAP[Seq.exe]: Heap block at 13d290 modified at 13d29c past requested size of 4
With a dialog window that says "User breakpoint called from code at 0x..."
This occurs when i go through a new .. but at different places every time i debug. I mean it could happened one time with the new of the line 10 and with another session with the new at line 15.
Any suggestion to find out this error.
Thanks.
Dirar
|
|
|
|
|
The easiest way to solve the problem would be using diagnostic tool, like BoundsChecker or Purify. There should be an eval versions at www.numega.com or www.rational.com.
The message you're getting from heap manager is pretty self-explaining. You're allocating block for n objects, and writing more than n.
void foo(int n)
{
int *x = new int[n];
for (int i = 0; i <= n; i ++) x[i] = i;
delete []x;
}
Note that this can happen even if you're using std::vector from STL that ships with VC++ - there's no index checking (except from vector::at), even in Debug build.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Hi.
How can I Extract .EXE(or DLL) file's Icons & other Resources.in Runtime and without other applications
Iman Ghasr-e-fakhri
|
|
|
|
|
With the samples that come with VC6.0 there is a sample application called IconPro which shows how to extract icons from exe and dll files. To use this to get other resources requires searching for example RT_BITMAP (for bitmaps) instead of RT_ICON.
The main functions to extract the resources are
FindResource
LoadResource
LockResource
FreeResource
Hope this helps
|
|
|
|
|
Hi.
How can I Find System's Drives And Drives Type with Windows API(s)
Iman Ghasr-e-fakhri
|
|
|
|
|
Hi,
Use GetDriveType(). Don't know how to enumerate, though.
Paolo
------
"airplane is cool, but space shuttle is even better" (J. Kaczorowski)
|
|
|
|
|
To find system's drives try GetLogicalDrives, it returns a bitmask with all the drives available.
Use GetDriveType or GetVolumeInformation for extended information about the selected drive
Hope it helps!
ORi
|
|
|
|
|
> To find system's drives try GetLogicalDrives,
> it returns a bitmask with all the drives available.
For Windows < NT5 (aka W2k) it was true. Not so anymore I'm afraid.
For >= W2k you'll have to iterate volumes by using FindFirstVolume/FindNextVolume.
If you however are only interested in the drive-letter assigned volumes, this solution works.
|
|
|
|