|
Try :
CComboBox* combo = (CComboBox*) GetDlgItem(YOUR_COMBO_ID);
|
|
|
|
|
Thanks!!!
--
Nice greets, Daniel.
|
|
|
|
|
Daniel S. wrote:
pocket pc with eVC++ 3.0
I have no idea about this platform. So all I can say is for the 'real' MFC.
But if you have a CComboBox , you can use AddString() , or CB_ADDSTRING as a message to the control.
For loading all entries at once like a menu, you could load the menu, get the texts, and call AddString() with it in a derived class.
|
|
|
|
|
I've created an MFC-dll.
Now I want to execute the app inside the dll. Which program do I have to use for that? Rundll.exe, Rundll32.exe (what's the difference)?
Or are there any other programs?
This is what I did (and it didn't work ):
Inside vc6 I pressed ctrl-f5 to run the app, a popup appeared requesting a dll-executer. I browsed to windows/rundll32.exe and selected it. But the dll was never executed.
What am I doing wrong?
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
|
|
|
|
|
, you can't run dll's?
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
yes you can
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
|
|
|
|
|
Do you want to run a specific function exported from your dll?
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
syntax : rundll32 DllName,FunctionName [Arguments]
Where FunctionName is an entry-point (any function) with the following prototype :
void CALLBACK EntryPoint(
HWND hwnd,
HINSTANCE hinst,
LPTSTR lpCmdLine,
int nCmdShow
);
Interesting stuff is that WinMain() has this prototype too, but this was easily predicted.
MSDN doc[^]
rundll.exe is the former 16-bit counter part (now legacy).
If the DLL is an in-proc COM component, you may instead use the DllHost.exe surrogate process, though it works differently.
MS quote (http://www.microsoft.com/ddk) : As of September 30, 2002, the Microsoft® Windows® 2000 DDK, the Microsoft Windows 98 DDK, and the Microsoft Windows NT® 4.0 DDK will no longer be available for purchase or download on this site.
|
|
|
|
|
I'm calling rundll from VC6.
So the settings are:
Executable for debug session:
c:\windows\rundll32.exe
Working directory:
empty
Program arguments:
empty
Remote executable and path name:
empty
Where do I have to put the functionname?
Is it fn() or just fn without ()?
I don't have to state the dll-name, isn't it?
btw:
I've tried several combinations, but none of them work.
I can switch to release version if debug doesn't work.
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
|
|
|
|
|
The functionname should be put in the Program arguments field, (may be with additional quotes to make sure that space chars are properly interpreted).
Your operating system already uses many times rundll32.exe xxx, so I guess this could help you figuring it out. Just do a search in the registry!
MS quote (http://www.microsoft.com/ddk) : As of September 30, 2002, the Microsoft® Windows® 2000 DDK, the Microsoft Windows 98 DDK, and the Microsoft Windows NT® 4.0 DDK will no longer be available for purchase or download on this site.
|
|
|
|
|
StephaneRodriguez wrote:
The functionname should be put in the Program arguments field
I entered this: ,functionname
whithout quotes or brackets, like it's defined in .def file.
Now rundll says that it cannot find the path to other dll's needed by my dll (mfc dll's I guess). But they are probably in windows\system directory.
I've also tried to enter my projects pathname, but that doesn't make any difference.
and another question:
I saw once that dll's are called by the RunDll-function, instead of the WinMain-function for regular apps. Is that true? Can't find it anymore.
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
|
|
|
|
|
These are my codes about printing bitmap:
<br />
CDC dc;<br />
CPrintDialog printDlg(FALSE);<br />
if (printDlg.DoModal() ==IDOK)<br />
{<br />
dc.Attach (printDlg.GetPrinterDC());<br />
DOCINFO di;<br />
memset(&di,0,sizeof(DOCINFO));<br />
di.cbSize =sizeof(DOCINFO);<br />
di.lpszDocName ="ͼÏó´òÓ¡";<br />
CString filename="MONEY.bmp";<br />
HBITMAP bmp=NULL;<br />
bmp=(HBITMAP)LoadImage(NULL,filename,IMAGE_BITMAP,0,0,LR_LOADFROMFILE|LR_CREATEDIBSECTION);<br />
<br />
CBitmap bitmap;<br />
bitmap.Attach (bmp);<br />
BOOL bPrintingOK = dc.StartDoc(&di);<br />
CPrintInfo Info;<br />
Info.m_rectDraw.SetRect(0,0, dc.GetDeviceCaps(HORZRES), dc.GetDeviceCaps(VERTRES));<br />
StartPage(dc);<br />
<br />
<br />
CDC dcMemory;<br />
dcMemory.CreateCompatibleDC(&dc);<br />
<br />
dcMemory.SelectObject(bmp);<br />
BITMAP bm;<br />
bitmap.GetBitmap(&bm);<br />
<br />
dc.StretchBlt (0,0,bm.bmWidth,bm.bmHeight,&dcMemory,0,0,32,32,SRCCOPY);<br />
EndPage(dc);<br />
EndDoc(dc);<br />
DeleteDC(dcMemory);<br />
dc.Detach ();<br />
}<br />
DeleteDC(dc);<br />
<br />
The compiler told me there are 0 errors,but I can't see the bitmap appear on the paper after the program is executed.Why?
|
|
|
|
|
This is the classic case of trying to print a device-dependant bitmap (DDB). What you need to do is to convert the bitmap to a device-independant bitmap (DIB) before you print it. There are articles on www.codeguru.com[^] describing it and probably also here somewhere...
Look at the bitmap section[^] at codeguru for some code.
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
I have a CString variable.How can I add new line in it,something like this:
"firstline";
Then make it like this:
"firstline
second line"
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
CString theString = "Firstline\nSecondline";
STL is a religeon. Enquiries to Reverend Christian Graus
|
|
|
|
|
Can you help me with this program
Write a program to implement "Add to save" feature to a document. Hint: Use Timer event
|
|
|
|
|
Hint:
Use SetTimer and if using MFC use OnTimer function to handle event.
If using WTL create a OnTimer message cracker.
Developing with C++ is like programming by the seat of your pants
|
|
|
|
|
Hi everybody. Need build MDI application with tabbed view. Left pane of view must be scroll view and right pane must consist some control. Is anybody know simplest way how do it ? Thanks
|
|
|
|
|
Ranger wrote:
tabbed view...Left pane...right pane
Are you thinking of a tabbed view (PropertyPages) or of a splitter view, which has a bar between two views (like windows explorer)
|
|
|
|
|
Can anyone suggest me the line of codes and the data type of the field through which we can store files in an SQl Server Database through an ODBC Recordset
Samir Sood
|
|
|
|
|
http://www.codeproject.com/database/excel_odbc_write.asp
The idea is the same, u just have to modify it in a way that the driver is pointing to your SQL server and not Excel
Papa
Murex Co.
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
I Developed a Tree Control using Microsoft Tree Control API
in Win32 SDK. When i adding more nodes or items to the Tree Control i am getting memory problem, how can i avoid this problem ?
Any help...
thank you
|
|
|
|
|
how to creat service in vc++?
r00d0034@yahoo.com
|
|
|
|
|
|