|
Add to your project settings, under 'Link->Object/Library modules' tab, Winmm.lib.
That's bout-it.
--BlackSmith--
/*The roof is on fire, we don't need no water, let the MF burn*/. BHG.
|
|
|
|
|
Thanks,
You wouldn't believe how long I've been trying to fix that for!!!
|
|
|
|
|
Alternatively, you can also put #pragma comment(linker, "winmm.lib") to the top of the source file. That's the way I do it whenever I need to link with a new lib file apart from the ones already set in the linker options
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
|
When i try to open a video decompressor used for drawing, it causes a user breakpoint. If i just try to open it for decompressing, it works fine! Here's how i do it:
hVideo = ICLocate(ICTYPE_VIDEO, VideoHeader.fccHandler, &VideoInfo.bmiHeader, NULL, ICMODE_DRAW);
If i do exactly the same except chane ICMODE_DRAW to ICMODE_DECOMPRESS everything works fine. What am i doing wrong?
Tanks all!
-Rune Svendsen
|
|
|
|
|
I recently switched from VS6 to VS.Net for writing unmanaged C++. I noticed they took away the Wizard to derive a class from a CRecordset and wrap it around a table. I only know how to access database using CDatabase and CRecordset (or a class derived from them). I am guessing that the idea is to get away from ODBC and to start using OLE or ADO. I found an article in a book describing a set of classes CADOConnection and CADORecordset. I cannot find neither of them mentioned on MSDN, so my first questions is does anyone heard of and used these classes and if so is there any documention on them. My Next question is what alternatives does anyone else like to use instead of CRecordset? I know that OLE is faster than ADO, but is that much faster and is ADO that much easier to use? One last question, for anyway using generic CRecordsets, what is the easiest way to tell if a field is null, I know i can do it from a class that is derived and has teh DDX calls, but what about just a CRecordset?
JD
|
|
|
|
|
Hi,
I personaly use ADO objects.
Have a look at the article "ADO at a glance" for an introduction to ADO.
Pyt
|
|
|
|
|
What unmanaged VC++ ADO objects are there, and what is there header file?
JD
|
|
|
|
|
I have done my fair share of DB programming during the last years and all I have to say is...
Stay away from ADO, it contains so many gotchas that it's plain silly. Also it really lacks the performance needed for heavy multi-user system.
My recomendation would be OLEDB by using the ATL supportclasses (CCommand, CRowset and so on). Use the wizard to get the hang of things then write your own code by hand since the wizard (IMHO) is a bit to stupid to be used in production code.
If you still REALLY want to use ADO get the MS Press book, Programming ADO (it's good), and read it cover-cover atleast 2 times then check out OLEDB again
|
|
|
|
|
How can I set these attributes to a CFont obj? How can I create a font which is bold/italic using CFontDialog?
10x. Bless you.
--BlackSmith--
/*The roof is on fire, we don't need no water, let the MF burn*/. BHG.
|
|
|
|
|
Implement a LOGFONT object to hold the attribute of the font.
Kuphryn
|
|
|
|
|
hi,
i have an mdi-program.
i would like to hide something in mainframe (e.g. 'File'), after a password input should it then be usable.
thanks,
Lucky
|
|
|
|
|
Make an OnUpdateCommandUI handler for it and enable only when your conditions are met.
I do not know if this works for the 'predefined' Menus too. Maybe your handler gets no chance to handle because it is after the 'builtin' one.
|
|
|
|
|
I want to create tabbed toolbar, i.e tabs present on toolbar and we can easily switch from one property page to another within same toolbar. Is there anything present here at CP?? Or please give me idea ??
|
|
|
|
|
How can I show a child dialog (in a dialog based app) in the taskbar when it is minimized ?
Thanks,
Cris.
|
|
|
|
|
You may add the WS_EX_APPWINDOW style to the child dialog on its WM_CREATE :
int CDlg::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CDialog::OnCreate(lpCreateStruct) == -1)
return -1;
ModifyStyleEx(0, WS_EX_APPWINDOW);
return 0;
}
rechi
|
|
|
|
|
Thanks for your help.
[]'s Cris ...
|
|
|
|
|
In a listCtrl I've created an editcontrol in order to allow the user to modify the fields that are inside the listctrl.
I need to allow that the same editctrl can enter only numbers, and strings depending on the thing that I'm editing in a ListCtrl.
How can I change those properties at runtime?
Thank you in advance.
|
|
|
|
|
You will need to filter out those keycommands before the Edit control gets a chance to process them. You can do this with the WM_KEYDOWN message. Or if you are using MFC, you can use PretranslateMessage to filter out any characters except the numbers.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Hello,
I need to know when the user moves the scrollbars of a listctrl, how should I do it?
thank you,
(I know that it is a very easy question...)
|
|
|
|
|
1. Create a class (CListCtrlExtra) derived from CListCtrl;
2. Map the WM_HSCROLL event. See int the 'nSBCode' variable the types of mouse click;
3. Send a mensagem to your Class, like 'GetOwner()->PostMessage (WM_MSG, 0)'. Define the WM_MSG as WM_USER + 1000;
4. In your class, map the message WM_MSG and take the event.
Hope to help you.
Cris.
|
|
|
|
|
Who can use MsTTS SDK 5.0 ????? Help me !
I don't know whether or not SDK 5.0 can deal with phonetic symbols ???????? I want to use SDK 5.0 to speak Vietnamese but don't know exactly how can !
|
|
|
|
|
How can I dynamically load the icon to use for my window? Say the icon is in the res folder and is called icon.ico. I have looked for this but everything seems to talk about loading resources from within the exe.
Thanks,
Steve
|
|
|
|
|
I use...
<br />
m_hIcon = (HICON)LoadImage(NULL, filename, IMAGE_ICON, 16, 16, LR_LOADFROMFILE);<br />
Blade[DMS]
|
|
|
|
|
Ok, that part makes sense. But....where would I implement this? I am using a MFC app created with the wizard. The window is based on the CHtmlView class. My first thought is in the main window's PreCreateWindow, is that right?
|
|
|
|