|
if you get this error on DrawText maybe problem is of lpszText,are you sure its valid?
|
|
|
|
|
Ya it should be because it gives this problem only when I set the combobox property to Drop List rather than Drop down.
I'm not able to find a way to do it as per my requirements
Regards,
Gaj
|
|
|
|
|
Dear all,
Currently i am working in creating a property sheet inside a dialog and i am also working in creating a property sheet inside a property page.
There is no problem in creating such a sheet and property pages inside a dialog.
But the problem comes in positioning the property sheet tab controls in right side of the dailog and in vertical positions and to add some images in tab control.
I have used this code to set icons in the tab controls.But it is not working.
CImageList m_imageTab;
m_imageTab.Create(16,16,0,3,3);
m_imageTab.Add(AfxGetApp()->LoadIcon(IDI_ICON1));
m_imageTab.Add(AfxGetApp()->LoadIcon(IDI_ICON2));
m_imageTab.Add(AfxGetApp()->LoadIcon(IDI_ICON3));
CTabCtrl *pTab = internal_sheet.GetTabControl();
pTab->SetImageList(&m_imageTab);
TC_ITEM tcItem;
tcItem.mask = TCIF_IMAGE;
for(int i = 0; i < 3; i++ )
{
tcItem.iImage = i;
pTab->SetItem( i, &tcItem );
}
// I used this member function to set the tab control vertical and i aslo tried the differnt combination of styles.but in vain
internal_sheet.GetTabControl()->ModifyStyle(0,TCS_VERTICAL);
Please some body help me to short out this problem.
:->
Manjunath S
GESL
Bangalore
|
|
|
|
|
hello,
i use vc++ 6.0 and i have a project, that has properly worked !!
I don't know what i have done(with the operating system or something else),
but suddenly the project wouldn't link ? i can compile it but then the linker gives me
the following fault:
error LNK2001: Nichtaufgeloestes externes Symbol "__declspec(dllimport) public: __thiscall std::_Winit
To your information: i use standard-library from objectspace(hp). i have set the path in the options of vc. when i don't set "ignore all standard library" in project settings, then
all is ok. but this means, that i use microsoft stl. but i want't objectspace stl !
Check this, too: the same project, with the same compiler, with the same settings, same stl work
really well on my laptop !
Perhaps somebody out there who can give me a tip ?
thanx
eddyroth
|
|
|
|
|
Hi,
I am interested in developing a file transfer library for use with C++ applications. I need information on how the "resume" feature in download managers like DAP, star-downloader etc work. I would be grateful if someone could direct me to the relevant windows APIs or to some existing open-source projects addressing this issue.
SDX-{5A853460-2944-42f8-84B8-2432DE3657EF}
|
|
|
|
|
SDX-{5A853460-2944-42f8-84B8-2432DE3657EF} wrote: or to some existing open-source projects addressing this issue
Have you looked at WGet[^] it's what I use at home for any large downloads.
SDX-{5A853460-2944-42f8-84B8-2432DE3657EF} wrote: could direct me to the relevant windows APIs or to
There are a couple of articles here at CP, Pause & Resume at Protocol level. (You can implement it in any language)[^]
I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:
|
|
|
|
|
Hey, thanks for the help. I will take a look at both. By the way FYI also take a look at "True Downloader" it's an open-source download manager written in VB 6.0!
SDX-{5A853460-2944-42f8-84B8-2432DE3657EF}
|
|
|
|
|
SDX-{5A853460-2944-42f8-84B8-2432DE3657EF} wrote: written in VB 6.0!
I like VB, but that just seems like an application that's steping out of VBs purview. WGet is Open Source, written C++ and is cross platform. Its a command like application that can set it self to run in the back ground which is very cool...
Good luck with True Downloader, hope it works well for you.
I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:
|
|
|
|
|
hi,
i have a dialog box with its Context help property to be true.Wats the use of this property?? can any one expalin in detail about it.
i have created a winhelp file is there any possibility to make use of Context help property to access the winhelp file??
thanx in advance,
zari
|
|
|
|
|
zareee wrote: have a dialog box with its Context help property to be true.Wats the use of this property?? can any one expalin in detail about it.
It add question mark, along with close button on title bar.After that , on clicking any cotrol, it receives WM_HELP message.
|
|
|
|
|
can u give me sample code using WM_HELP message??
zari
|
|
|
|
|
Have a look at this[^] article.
|
|
|
|
|
|
Is it possible to create a single device using CreateDevice() function and share in multiple views?
Thanks & Regards,
Suman
|
|
|
|
|
What does CreateDevice() do?
To share data in multiple views, you can store it in document class.
From view class, you can use GetDocument to get document class's pointer and use it's data.
|
|
|
|
|
Thanks.
It creates a device to represent display adapter.
I will try and let you know tomorrow.
Thanks & Regards,
Suman
|
|
|
|
|
It seems we cannot use the single device returned by CreateDevice() in more than one view. Because Create device takes the HWND handle of the view.
Thanks & Regards,
Suman
|
|
|
|
|
rp_suman wrote: CreateDevice()
Is it a DirectX API ?
|
|
|
|
|
Yes it is DirectX API.
Thanks & Regards,
Suman
|
|
|
|
|
Environment: VC 6.0 sp5, MFC, Access97/2000 database, W2000/XP pro.
I have upgraded my app to run msjet4.0 as described by Microsoft when using VC6.0 and MFC in shared DLL:
AfxGetModuleState()->m_dwVersion = 0x0601;
Thats easy!
But, when I start a thread (AfxBeginThread/user or worker), doing some Dao-interface, I get problems:
When I construct a CDaoDatabase and open it from within the InitInstance of the CWinThread, I get:
"First-chance exception in Test2.exe (DAO360.DLL): 0xC0000005: Access Violation."
If I do the same in the constructor of the CWinThread, there's no errors!
Running the dao-interface in a MDI og SDI app, works fine.
Going back to msjet3.0 and access97 target database, works fine. I have searched the web for error reports like this, but it seems that I'm completly alone to have this problem...!
Does anybody have a clue or an idea to solve this problem?
In advance, thanks.
PS! I'm stucked with dao for a little more time - I know, ADO would be the answer...;)
Code example:
CDaoDatabase MyDBS;<br />
MyDBS.Open("C:\\Au2PC\\Database\\Au2PC.mdb");<br />
TRACE( "Database engine ver=[%s]\n", MyDBS.GetVersion());<br />
CDaoRecordset rsMedd(&MyDBS);<br />
rsMedd.Open(dbOpenDynaset, CString("SELECT * FROM MeddUd"));<br />
Anders
|
|
|
|
|
Since it works in an MDI/SDI app, but not from the thread's InitInstance(), I would guess (without looking at the MFC source at this point) that it's related to running a separate thread.
It working in the constructor kind of confirms this, since the object is most likely being constructed (and hence the ctor executes) in the context of the original thread, whereas InitInstance() is run in the new thread.
Obvious stuff;
1. Have you used any of the CDao* classes in the first thread? MFC keeps state information on OLE and DAO which for the new thread might be wrong/misleading.
2. Have you called AfxOleInit() or CoInitialize() in your new thread's InitInstance()?
Steve S
Developer for hire
|
|
|
|
|
Hi Steve. Thanks for your reply - unfortunately, none of your suggestions worked. I can get it to work if I declare my CDaoDatabase and CDaoRecordset as pointers in the WinThread class and allocate them in InitInstance()! Then, when I start another thread with same database construction, it fails again.
Now I have my database interface running only in the main thread (a CDialog based class) The workerthreads calls databasefunctions using the SendMessageTimeout(..) function - a messagehandler in the CDialogbased class handles the requests and return the result. It's a bit clumsy, but it works!! Fortunately, the number of operations on the database is limited, so it's easy done.
I can't figure out what the trick is to get it running directly from the threads. The upgrade from msjet3.5 to msjet4.0 hasn't been that easy!
Anders (still hanging around VC6)
|
|
|
|
|
I confess, at this point, that I don't make much use of CDao* classes these days. I still use (well, the people I contract to do) VC++6, but I tend to use the ATL OLEDB classes for data access.
In your original, were you making any CDao* calls (including object construction) in the main thread? If I have time, I might dig a bit deeper into what's happening, so a look at your original InitInstance() might help me.
Steve S
Developer for hire
|
|
|
|
|
i am trying to use stored procedure to store data in my dtabse getting from remote server....but i dont know from where to start...
i have done ole db connection to database with the help of ATL consumer wizard....now how to proced further...can anybody help me....
|
|
|
|
|
You need to write the stored procedure in your database. Then test it from your app. Here[^] is an example. Googling will give you plenty of results to start with.
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|