|
HI,
Plz tell me How can i get ITem ( item no. or its attribute) by selecting it with mouse..
i means any method for getting seletec item Number
or any thing else like attributes
thanx
|
|
|
|
|
int nIndex = myListCtrl.GetNextItem (-1, LVNI_ALL | LVNI_SELECTED);
while (nIndex != -1) {
TRACE ("Item %d is selected\n", nIndex);
nIndex = myListCtrl.GetNextItem (nIndex, LVNI_ALL | LVNI_SELECTED);
} /ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
hi all,
I am want to get embedded objects from a powerpoint slide. Then I want to handle the actions of each of those objects from each buttons of my application.
If anyone can please help me ASAP.
Best regards,
Faisal
(al.faisal@vmclbd.com)
Faisal
|
|
|
|
|
can someone point me to an example of using the Tab control which changes content when the tab changes
i really dont want to go through 20 controls and hide them just to change the content
|
|
|
|
|
Put your controls in one or more modeless dialogs - then just show the appropriate dialog (and hide the others) when the tab selection changes. Alternatively, you could use a modeless property sheet (and property pages).
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
ok, i found this artical -> http://www.codeproject.com/dialog/embedded_dialog.asp
its exactly what i needed, bit i dont want the dialog to have a border when its embedded in the main dialog, so how do i take away the border?
|
|
|
|
|
The border is a property of the dialog, just turn it off.
--
Joel Lucsy
|
|
|
|
|
Set the dialog's border style to "None" in the resource editor.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
HI Dear,
How r u ?
Actully I got same problem as you may faced(Multithread control) in VC++.
I want to place Items in list box. but all placing of items in List must be done in thread. so that all other work can be done side-wise.
Can you get me idea..as you may have solved this type of problem.;)
PLZ PLZ..Thanks..Sumit Kapoor
---Sumit Kapoor---
|
|
|
|
|
One solution is messages. Send a message to main thread and have it update the control.
Kuphryn
|
|
|
|
|
Hi Sumeet,
Nice to see you again....
I find the solution of my problem by calling the SendMessage(IDC_xxx_xxx) to call the ON_BN_CLICKED message directly from your thread function.I also works even in case of User-Interface Thread.
Like that you may place ur item directly from your thread program. It will work eeven if you are using User-Interface thread. This may help you.
Wish you all the best..
Bye
|
|
|
|
|
how can I change the color of status bar with vc6? I mean the bottom of the window.Thanks a lot.
hi all
|
|
|
|
|
How can I make a property in an ActiveX control (ATL) have the choices enumerated so that they appear as a drop-down list in VB?
Thanks,
Jory
|
|
|
|
|
Okay, just to maybe save someone else some time in the future, I get a RPC_X_BAD_STUB_DATA (1783) windows error code if I pass a buffer that is too LARGE into this function. When I reduced it to 4096 bytes, the call works fine.
|
|
|
|
|
Hey,
When I print on a normal Printer, all the text prints fine, but when I have it print on a Laser Printer, all the text gets squahsed together, and text is wirrten over other text, it is a whole mess. Anyone know why it is doing it?
Here is the code.
<br />
<br />
CPrintDialog dlg(FALSE); <br />
CDC dc; <br />
#if 0 //Show print dialog. <br />
if (dlg.DoModal() == IDCANCEL) <br />
return; <br />
dc.Attach(dlg.GetPrinterDC());<br />
#else //Don't show print dialog. <br />
PRINTDLG prtDlg; <br />
AfxGetApp()->GetPrinterDeviceDefaults(&prtDlg);
dlg.m_pd.hDevMode = prtDlg.hDevMode; <br />
dlg.m_pd.hDevNames = prtDlg.hDevNames; <br />
dc.Attach(dlg.CreatePrinterDC());<br />
#endif <br />
dc.m_bPrinting = TRUE;
CRect printArea; <br />
CRect printArea1; <br />
CRect printArea2; <br />
CRect printArea3; <br />
CRect printArea4; <br />
CRect printArea5;<br />
CRect printArea6; <br />
CRect printArea7; <br />
<br />
printArea.SetRect(500, 0, dc.GetDeviceCaps(HORZRES), dc.GetDeviceCaps(VERTRES));
printArea1.SetRect(700, 1500, dc.GetDeviceCaps(HORZRES), dc.GetDeviceCaps(VERTRES));
printArea2.SetRect(750, 1750, dc.GetDeviceCaps(HORZRES), dc.GetDeviceCaps(VERTRES));
printArea3.SetRect(1250, 1750, dc.GetDeviceCaps(HORZRES), dc.GetDeviceCaps(VERTRES));
printArea4.SetRect(750, 1825, dc.GetDeviceCaps(HORZRES), dc.GetDeviceCaps(VERTRES));
printArea5.SetRect(1250, 1825, dc.GetDeviceCaps(HORZRES), dc.GetDeviceCaps(VERTRES));
printArea6.SetRect(325, 250, dc.GetDeviceCaps(HORZRES), dc.GetDeviceCaps(VERTRES));
printArea7.SetRect(750, 500, dc.GetDeviceCaps(HORZRES), dc.GetDeviceCaps(VERTRES));
DOCINFO docinfo; <br />
memset(&docinfo, 0, sizeof(docinfo)); <br />
docinfo.cbSize = sizeof(docinfo); <br />
docinfo.lpszDocName = _T("Edit Control Print"); <br />
dc.StartDoc(&docinfo); <br />
dc.StartPage(); <br />
<br />
CFont font;<br />
font.CreatePointFont(480, "Arial", &dc);<br />
<br />
CFont font1;<br />
font1.CreatePointFont(280, "Arial", &dc);<br />
<br />
CString str("Text Text Text");<br />
CString str1;<br />
CString str2("Test");<br />
CString str3("Test");<br />
CString str4;<br />
CString str5;<br />
CString str6("Test");<br />
CString str7("Test");<br />
<br />
CSize size = dc.GetTextExtent(str);<br />
CFont *pOldFont = dc.SelectObject(&font);<br />
dc.DrawText(str, printArea, DT_NOPREFIX | DT_WORDBREAK);<br />
dc.DrawText(str6, printArea6, DT_NOPREFIX | DT_WORDBREAK); <br />
dc.DrawText(str7, printArea7, DT_NOPREFIX | DT_WORDBREAK); <br />
dc.SelectObject(pOldFont);<br />
<br />
<br />
m_name.GetWindowText(str1);<br />
CSize size1 = dc.GetTextExtent(str1);<br />
CFont *pOldFont1 = dc.SelectObject(&font1);<br />
dc.DrawText(str1, printArea1, DT_NOPREFIX | DT_WORDBREAK); <br />
dc.SelectObject(pOldFont1);<br />
dc.DrawText(str2, printArea2, DT_NOPREFIX | DT_WORDBREAK); <br />
dc.DrawText(str3, printArea3, DT_NOPREFIX | DT_WORDBREAK); <br />
<br />
m_DEPdate.GetWindowText(str4);<br />
m_Shipdate.GetWindowText(str5);<br />
dc.DrawText(str4, printArea4, DT_NOPREFIX | DT_WORDBREAK); <br />
dc.DrawText(str5, printArea5, DT_NOPREFIX | DT_WORDBREAK); <br />
<br />
dc.EndPage(); <br />
dc.EndDoc();<br />
}<br />
<br />
After it printed weird on a Laer Printer I thught it was the code and tried it on anomral printer again, and it worked fine, so is printing on a lser printer something different on code?
Thanks for any help
|
|
|
|
|
You must take differences in printer resolution into consideration. Your printing rects have hardcoded coordinates, which is bad, bad, bad. To get the resolution for a single inch of the printer, call dc.GetDeviceCaps( LOGPIXELSX/LOGPIXELSY); . Use values based on the return for the start coordinates in your SetRect -calls.
|
|
|
|
|
I'm getting LNK Error 2005
nafxcwd.lib(afxinl1.obj) : error LNK2005: "public: virtual void __thiscall CObject::Serialize(class CArchive &" (?Serialize@CObject@@UAEXAAVCArchive@@@Z) already defined in mfc42ud.lib(MFC42uD.DLL)
It appears the conflict MAY be caused by a library file (I do not have source) included in Project/Settings/Link.
However, I've examined the functions in the link file and it does NOT appear that they are dups of the 100 functions listed in Output (Unicode functions) with the LNK 2005 error.
BACKGROUND
This is my first attempt at ActiveX. ActiveX appears to need Unicode. ActiveX being developed under Win98.
QUESTIONS:
Where do I go from here??????
Thanks
David
|
|
|
|
|
Are FSCTL_GET_NTFS_VOLUME_DATA and FSCTL_GET_RETRIEVAL_POINTERS0 valid as dwIoControlCode for DeviceIoControl() on NT4?
The reason I ask is that the Platform Documentation incdicates it is only available on Windows 2000 and XP. However, the include file "winioctl.h" indicates it is available on NT4 and above.
Which is true ?
Can someone verify it on NT4 please.
Thanks
|
|
|
|
|
I have this cd burning app that I have been working on.
I added a dialog to show progress along the way. Now
this dialog implements a interface and these methods
are called during the burn. (These methods are callbacks
that windows calls duriing the burn. So surely they are
called from a different thread) I added some members to
represent the controls on this dialog, 2 CStatics and
a CProgressCtrl. I added the DDX_Control stuff. Now
I know that I am not supposed to work with a control from
different threads other than the one it was created with.
If that is the case how do I set the window text and the
progress step from these methods?
Thank You
Bo Hunter
|
|
|
|
|
Instead of executing the callback methods, you might want to consider posting messages to the dialog. The message indicates a "progress event". The dialog would query the CD burning thread for its progress, in response to the message.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
I'm having problems with VC++ 6 SP5 creating larger than normal Release Executables.
I've noticed it when compiling (in Release mode) a couple of projects:
1) ToDoList (www.codeproject.com/tools/ToDoList2.asp) - The official dll is 153KB, and mine is 202KB.
2) QCD Monkey's Audio input plugin (http://quinnware.com/bin/plugins/input/sup_QCDApeSrc.zip) - The official version is 340KB, and mine is 444KB.
I don't tamper with any of the configuration, and compile as it comes. All I do is make sure the Release Configuration is selected.
It has nothing to do with Optimizing for small size.
Everyone else I speak to has no problems producing the smaller dll/executable.
What is going on ? What is wrong with my compiler setup/compiler ?
Can anybody else re-create my problem ?
How do I "fix" it ?
Help!!!!!!!!!!
|
|
|
|
|
Is it possible to make a dll in C++ that VB can call to start functions on a thread? For instance, I'd like to get a recordset, divide by ten on the number of records, then call a DoThread() function from vb ten times, sending as the LPARAM the number in the recordset for the thread to start processing on so that all 10 threads could be running at the same time. Any help or comments would be greatly appreciated.
If it's broken, I probably did it
bdiamond
|
|
|
|
|
you can create threads with vb only, too!
Don't try it, just do it!
|
|
|
|
|
That is entirely possible. In C++ you can start threads using the C++ runtime library functions beginthread and beginthreadex. Also available are the Win32 function CreateThread. There is also the MFC Class CWinThread and a global function named something like AfxBeginThread.
There are many articles on MSDN about thread creation in C++ here is just one:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/creating_threads.asp[^]
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
I have a function, from a third party library, that takes a variable number
of arguments, like so
int RealFunc(int var1, ...)
I have a define that I actually call to use this function, like so
#define StubFunc RealFunc
I need to change the define to more of a macro that would allow me to pass
the variable number of arguments to the macro and they gets passed to the
real func call with other functions being called in between, like this
#define StubFunc(int var1, ...) { \
CallOtherFunc() \
RealFunc(var1, ...) // Passing all arguments passed to the macro \
CallOtherFunc2() \
}
Can this be done? Any ideas?
|
|
|
|
|