|
Depending on your MSDN version it may not be possible to link directly with VC6. I believe that after January 2002 the MSDN only links with .NET it is still accessable through its shortcut however.
Sorry it may be January 2002 is the 1st .NET only version.
Ant.
|
|
|
|
|
Hello Guys:
i want to craete a tool bar in my dialog Box i am using following code in the OnInitDialog()
..........
m_ToolBar.Create(this);
m_ToolBar.LoadToolBar(IDR_TOOLBAR1);
m_ToolBar.ShowWindow(TRUE);
but i can't see any toolbar, any solutions?..
Thanks
Muhammad Ahmed
ahmed
|
|
|
|
|
i guess you forgot to make it visible:
VERIFY( m_toolbar.Create(WS_CHILD | WS_VISIBLE | CCS_NOPARENTALIGN |
CCS_NORESIZE | TBSTYLE_FLAT | TBSTYLE_TOOLTIPS, CRect(XX, XX, XX, XX),
this, AFX_IDW_TOOLBAR) );
|
|
|
|
|
i've used
m_ToolBar.CreateEx(this,TBSTYLE_FLAT,WS_CHILD | WS_VISIBLE | CBRS_ALIGN_TOP, CRect(10,10,100,100), AFX_IDW_TOOLBAR);
m_ToolBar.LoadToolBar(IDR_TOOLBAR1);
m_ToolBar.ShowWindow(TRUE);
but toolbar is invisible
|
|
|
|
|
i've tested it. it works in my dialog.
CListCtrl m_toolbar;
m_toolbar.Create(WS_CHILD | WS_VISIBLE | CCS_NOPARENTALIGN |
CCS_NORESIZE | TBSTYLE_FLAT | TBSTYLE_TOOLTIPS, CRect(0, 0, 100, 100), this, AFX_IDW_TOOLBAR);
check if maybe sth in your program is on conflict with some of the styles.
|
|
|
|
|
u've used
CListCtrl m_toolbar;
i am using
CToolBar m_ToolBar;
ahmed
|
|
|
|
|
sorry, i'm still asleep.
i've used CToolBarCtrl.
|
|
|
|
|
You used CToolBar or CToolBarCtrl ? In dialogs, you should use CToolBarCtrl .
CToolBar is useful only in frame windows (only frame windows support docking)
Robert-Antonio
"Love without sex is like a fish without antlers"
|
|
|
|
|
I am trying to use a COleDateTime object and use the method ParseDateTime() to convert a string to date/time format.But it returns an invalid status for the object every time the method is called.I have tried all formats of date,date/time as mentioned in MSDN, but none works.
In Debug mode, I am also not able to step into the ParseDateTime function.
COleDateTime objDate;
strDate = _T("2004/01/01");
objDate.ParseDateTime(strDate, 0);
I have included <afxdisp.h>
The same code works fine in another new workspace/project. But in my project/workspace, it isnt producing any result.
Can anyone please let me know what might be wrong?
|
|
|
|
|
It seems strange that you can't step into ParseDateTime! It is declared in \Microsoft Visual Studio\VC98\MFC\SRC\OLEVAR.CPP
In my experience it would seem that the project could require a complete rebuild. Strange problems like that are normally cured with a complete clean and rebuild.
Ant.
|
|
|
|
|
I tried that too..it still doesnt work..
|
|
|
|
|
Hello!
- check with dependency viewer what libraries are truly loaded (maybe you have two copies of some dll?)
- MSDN says that only formats
DD-MM-YYYY
MM-DD-YYYY
YYYY-MM-DD
are properly handled - see VarDateFromStr
- maybe instead of ParseDateTime you can use COleDateTime::Format() ?
- check the difference in locale settings (control panel) for date/time format on machines where it works, and not.
|
|
|
|
|
Thanx will try
|
|
|
|
|
Hi. How do you set the path for your source files if they are in a different directory then the project directory in Visual C++.Net. I tried to go to Tools/Options/Projects and added the path to the list of VC++ source file directories but when I compile my code I still get link errors.
|
|
|
|
|
#define "myFold\myHeader.h"
TOXCCT alias Nicolas C.
|
|
|
|
|
Hello!
If you get link errors, maybe include source file in project? Simply add it as a existing file to project.
|
|
|
|
|
I am trying to output binary numbers to the standard stream. The problem is that I want to display them in the mathematically correct format.
Using 7.5 as a decimal example, to display it as:
111.1
Do I have to write my own function to convert these, or is there a simpler way?
Thanks,
Joe Hoppe
|
|
|
|
|
hi,
How can I check if a drive is Zip drive (and not a floppy drive). I know floppy is checked by DRIVE_REMOVABLE == GetDriveType(). What about Zip ?
regards
hari
Hari Krishnan
|
|
|
|
|
Try this:
(below code detects dvd)
<br />
<br />
STORAGE_MEDIA_TYPE GetDriveType(TCHAR A_chletter)<br />
{<br />
DISK_GEOMETRY Geom[20];<br />
DEVICE_MEDIA_INFO dinfo[20];<br />
DWORD cb; <br />
GET_MEDIA_TYPES gmedia[20];<br />
<br />
ZeroMemory(Geom, sizeof(Geom));<br />
ZeroMemory(dinfo, sizeof(dinfo));<br />
ZeroMemory(gmedia, sizeof(gmedia));<br />
<br />
HANDLE hVolume = NULL;<br />
CString drive_argument;<br />
drive_argument.Format(_T("\\\\.\\%c:"), A_chletter);<br />
<br />
hVolume = CreateFile( (TCHAR*)(LPCTSTR)drive_argument,<br />
GENERIC_READ,<br />
FILE_SHARE_READ | FILE_SHARE_WRITE,<br />
NULL,<br />
OPEN_EXISTING,<br />
0,<br />
NULL );<br />
<br />
if(DeviceIoControl (hVolume, IOCTL_STORAGE_GET_MEDIA_TYPES_EX, 0, 0, <br />
gmedia, sizeof(gmedia), &cb, 0))<br />
{<br />
UINT MediaCharacteristics = gmedia[0].MediaInfo[0].DeviceSpecific.DiskInfo.MediaCharacteristics;<br />
MediaCharacteristics = MediaCharacteristics;<br />
CloseHandle(hVolume);<br />
if(gmedia[0].DeviceType == FILE_DEVICE_DVD)
AfxMessageBox("found dvd!"); <br />
return (STORAGE_MEDIA_TYPE)(gmedia[0].MediaInfo[0].DeviceSpecific.DiskInfo.MediaType);<br />
}<br />
CloseHandle(hVolume);<br />
return (STORAGE_MEDIA_TYPE)Unknown;<br />
}<br />
<br />
see _STORAGE_MEDIA_TYPE enumeration type.
|
|
|
|
|
many thanks, Will check it out.
Hari Krishnan
|
|
|
|
|
Hi All!
How can I capture the words(, text) in edits, htmls ,buttons, static, Ms reader... from another application by hook or subclass!
Example :
autolook of dictionary or "click and see" when i click on a text then
my application how capture the selected text?
|
|
|
|
|
I believe the API has a function that allows you to capture a window based on co-ordinates. Then, call GetWindowText. I forget what the API function is called tho.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Thinking of WindowFromPoint ?
|
|
|
|
|
yeah, that was it....
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Hi,
i have a problem... RTF has this special control word called \field and i'd like to use Microsoft's RichEdit control and handle this \field myself. But i can't seem to find anyway to make the RichEdit control break out to allow me to handle this control word. Currently the RichEdit control does understand this control word but it doesn't process it, it just gives out whatever fldrslt has. I'd like to use the control to have dynamic text.
currently MS Word uses this \field to do processing of time, author, date saved and so on to dyanmically change text on the word file when it is opened.
|
|
|
|