|
You're welcome
Don't be embarassed! Everybody has to learn sometime
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Alison Pentland wrote:
Which 2 should I choose for int and float?
Best choice would be obviously
std::vector< int >;
and
std::vector< float >;
SCNR to plug the standard.
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
Hi,
I've got an application that loads driver DLL's. Those driver DLL's have some setup options. Now I want those driver DLL's to display a property page in the application setup dialog that already has a property sheet with pages.
The solution is simple, just let the DLL create a MFC CPropertyPage. But I don't want that, I don't want that the Driver DLL's must be MFC dll's (and compiled with a matching VC++ version/libraries).
I tried creating a CPropertyPage in the DLL and then returning the propertypage HWND to the application. The application then attaches the HWND to a CPropertySheet. That runs into al kind of problems.
Lookign trough the MSDN library a found al sorts of ATL and COM anwsers, but there must be something simpler.
Note: Of course the driver DLL must handle the window messages for its property page.
Thanks,
John Janssen
Topcon Europe B.V.
|
|
|
|
|
Why not expose a function from the dll to add the property page(s), given a propsheet handle. Then, in your CPropertySheet::OnInitDialog(), simply call the function prior to calling the base. This may work (have never done it). See PropSheet_AddPage() macro for more info.
onwards and upwards...
|
|
|
|
|
Hello Folks
WINAPI->Remote Access Services->
How to make particular phone-book entry default?
This is non-trival question. I've searched the Web, read MS SDK,
docs - perhaps anybody can point me out the place where to find the anwser?
Regards
Darek
|
|
|
|
|
Hi,
i have several program that execute one after another using the following fuction. However, one of the program hide it's window b4 it finishes its process, so there is a big time delay b4 the next process begins.. how do i actually detect if a process calls a hid window command?
CreateProcess.
WaitForSingleObject( pi.hProcess, INFINITE )
Thanks
|
|
|
|
|
hi,
So far my program is 150KB in size, and the only way to get the size down is to reduce the size of the image. At the moment the dialog is made from a region of a bitmap (using CreateRegionFromFile). I now want to do the same except with a jpeg image. Does anyone know if it is possible to load a jpeg into a HBITMAP variable on-the-fly, or another way of creating the correct region??
Chris
|
|
|
|
|
You will have to use GDI+ or a third-party lib to be able to load the jpg.
~RaGE();
|
|
|
|
|
Hi ,
I am searching for a good sample code or article that takes a tab delimited file as input and imports it prograamatically in an access database.I don't want to loop through all the records in the text file and then put them individually into access.I want to import the whole file programmatically into an MS ACCESS table.May be it requires OLE.
Any help will be appriciated.
Thanks and regards.
|
|
|
|
|
Connecting to the MDB using DAO classes and looping through the records in the CSV file and inserting them isn't that bad an idea.
I think ODBC allows a DSN to be associated with a tab delimited file. It might be workable to assign a System DSN to the tab delimited file and then you could use ODBC to move the CSV file to an Access table.
I'm going to live forever or die trying!
|
|
|
|
|
Or, simply define the text file as an ODBC DSN and create an external Link in acess. Then, you can do a standard insert/select query right in access.
onwards and upwards...
|
|
|
|
|
HI,
THANKS FOR REPLY.BUT I COULDN'T UNDERSTAND YOUR SUGGESTION
PROPERLY.WHAT DO U MEAN BY EXTERNAL LINK?HOW IT IS CREATED ,CAN U TELL ME THROUGH A SMALL SAMPLE CODE?
THANKS AGAIN.
|
|
|
|
|
I created a dll with MFC as shared library. In order for me to have different name and type of dll for each mode (debug and release), i used this code in MyDllLib.h. This file will be called by exe from stdafx.h file.
#if defined _AFXDLL
#ifdef _DEBUG
#pragma comment(lib,"MyDlld.lib")
#pragma message("Automatically linking with MyDLLd.dll")
#else
#pragma comment(lib,"MyDll.lib")
#pragma message("Automatically linking with MyDll.dll")
#endif
#endif
but whenever i compile in debug mode, i got this warning..
Linking...
Creating library ./bin/MyDlld.lib and object ./bin/MyDlld.exp
MyDlld.exp : warning LNK4070: /OUT:MyDll.dll directive in .EXP differs from output filename "./bin/MyDlld.dll"; ignoring directive
it doesn't have any problem in the release mode... can anybody tell me why this is happenning..
One more thing, when compile in debug mode, my exe will search for release mode of MyDll.dll and not debug mode (MyDlld.dll)...
Thanks in advance
|
|
|
|
|
Hum.. Seems like you will have to change the output names in your project settings...
~RaGE();
|
|
|
|
|
my setting in the output setting is.. MyDll.dll for release mode and MyDlld.dll for debug mode...
|
|
|
|
|
You probably have a module-definition (.def) file which has a LIBRARY statement in it.
The LIBRARY statement is actually unnecessary, you can simply remove it.
--
Mike Dimmick
|
|
|
|
|
Does this means that my dll do not have any problems?
How about the second question? my Exe (in debug mode) still looking for MyDll.dll (release version) and not the debug version.. aaahhhh,...
|
|
|
|
|
I m developing a whiteboard program.
I need to implement text drawing on a view as in Win Paintbrush.
Could anyone give me some suggestion?Some sample code is better.
Thanks
|
|
|
|
|
A good basis for something like this would be the SCRIBBLE sample program that comes with MSDN.
You could have a toolbar which switches between graphic modes. In Text mode, you can detect a
OnLButtonUp event in your view and pop a box asking for text.
There are plenty of text input dialog boxes here on CodeProject you could use. And its not hard
to get ClassWizard to make a dialog box with an edit box in it for you. If you are clever, you
could handle EN_CHANGE notifications from the edit box and live-update the view with the text
you are typing in.
For drawing the resultant text, just use
pDC->DrawText (...) function.
I hope that helped,
Iain.
|
|
|
|
|
Thanks!!
With your reply ,I get the way to solve my question!
Just 3 type as you said, right?
1. make a resource to tell my view that i will draw text on it
2. catch LBUTTONUP message and pop a edit box
3. Notify the view and DrawText
baybe it ll take me sometime to solve it.Anyway, thanks for your advise!
|
|
|
|
|
I would do this in the following order:
Forget about the UI to start with, amd simply practice drawing text into the View at a hard
coded place. This will let you learn about CFont, pDC->SelectObject, pDC->SetTextBkMode,
pDC->TextOut / pDC->DrawText.
Then make a toolbar so you can switch between graphic modes (pen, line, text, etc).
Create Command Handlers for them, so the button / menu for the current tool is inset / ticked.
Then in your mouse button handler, pop up a box to input some text. Add the text and its
coordinates (from the mouse position) to a list of some kind in your CMyDocument. Redraw
the screen with the new text.
Relax in a warm glow of achievement. Have a or to taste.
Iain.
|
|
|
|
|
Class CA
{
protected:
CA();
private:
int a;
int b;
CRect c;
}
CA::CA():c(0,0,100,100){
a=0;
b=0;
}
What's the difference between both of the initialization ways in function "CA()"?
Thank you in advance!
|
|
|
|
|
The initialisation list you used with you variable c is executed before the constructor is even called - it is part of the allocation of the instance.
But on the other hand, you have to be careful: The initialisation list does not care about the order in which you placed them - the are executed in the order the variables are allocated (declared). After all, initialisation lists are part of the allocation.
OTOH, a and b are of undefined value before they get assigned a value. (and they need an assignment operator able to cope whith the values they got assigned - initialisation lists do not.
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
Thank you!
|
|
|
|
|
Is there a way to increase the font size in a console application? A larger text would be nicer to read.
Thanks, Dave
VC++ 6.0
|
|
|
|