|
How to populate MS flex grid with some recordset?
// This is the problem
m_cFlex.SetDataSource(LPDISPATCH(pRst));
Flex grid give me a message "Type mismatch". Anyone know why? What I need to write here?
pRst is variable ADOCG::_RecordsetPtr pRst;
|
|
|
|
|
Hello all,
I am working at a MFC application and I am using the STL containers also. The problem is that I am trying to use valarray and when I include
[pre]
#include <valarray>
[/pre]
I get all sorts of compiling errors
[pre]
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(104) : warning C4003: not enough actual parameters for macro 'min'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(110) : warning C4003: not enough actual parameters for macro 'max'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(104) : error C2059: syntax error : 'function-style cast'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(167) : see reference to class template instantiation 'std::valarray<_Ty>' being compiled
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(104) : error C2334: unexpected token(s) preceding ':'; skipping apparent function body
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(167) : see reference to class template instantiation 'std::valarray<_Ty>' being compiled
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(109) : error C2143: syntax error : missing ')' before '}'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(167) : see reference to class template instantiation 'std::valarray<_Ty>' being compiled
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(109) : error C2059: syntax error : ')'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(167) : see reference to class template instantiation 'std::valarray<_Ty>' being compiled
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(109) : error C2143: syntax error : missing ';' before '}'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(167) : see reference to class template instantiation 'std::valarray<_Ty>' being compiled
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(109) : error C2238: unexpected token(s) preceding ';'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(167) : see reference to class template instantiation 'std::valarray<_Ty>' being compiled
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(110) : error C2146: syntax error : missing ';' before identifier '_Ty'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(167) : see reference to class template instantiation 'std::valarray<_Ty>' being compiled
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(104) : error C2629: unexpected 'unsigned int ('
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(648) : see reference to class template instantiation 'std::valarray<unsigned int="">' being compiled
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(104) : error C2334: unexpected token(s) preceding ':'; skipping apparent function body
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(648) : see reference to class template instantiation 'std::valarray<unsigned int="">' being compiled
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(109) : error C2143: syntax error : missing ')' before '}'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(648) : see reference to class template instantiation 'std::valarray<unsigned int="">' being compiled
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(109) : error C2059: syntax error : ')'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(648) : see reference to class template instantiation 'std::valarray<unsigned int="">' being compiled
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(110) : error C2334: unexpected token(s) preceding ':'; skipping apparent function body
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(648) : see reference to class template instantiation 'std::valarray<unsigned int="">' being compiled
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(115) : error C2143: syntax error : missing ')' before '}'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(648) : see reference to class template instantiation 'std::valarray<unsigned int="">' being compiled
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(115) : error C2059: syntax error : ')'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(648) : see reference to class template instantiation 'std::valarray<unsigned int="">' being compiled
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(115) : error C2143: syntax error : missing ';' before '}'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(648) : see reference to class template instantiation 'std::valarray<unsigned int="">' being compiled
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(115) : error C2238: unexpected token(s) preceding ';'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(648) : see reference to class template instantiation 'std::valarray<unsigned int="">' being compiled
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(116) : error C2146: syntax error : missing ';' before identifier 'valarray'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(648) : see reference to class template instantiation 'std::valarray<unsigned int="">' being compiled
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(104) : error C2629: unexpected 'bool ('
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(754) : see reference to class template instantiation 'std::valarray<bool>' being compiled
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(756) : see reference to class template instantiation 'std::mask_array<_Ty>' being compiled
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(104) : error C2334: unexpected token(s) preceding ':'; skipping apparent function body
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(754) : see reference to class template instantiation 'std::valarray<bool>' being compiled
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(756) : see reference to class template instantiation 'std::mask_array<_Ty>' being compiled
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(109) : error C2143: syntax error : missing ')' before '}'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(754) : see reference to class template instantiation 'std::valarray<bool>' being compiled
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(756) : see reference to class template instantiation 'std::mask_array<_Ty>' being compiled
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(109) : error C2059: syntax error : ')'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(754) : see reference to class template instantiation 'std::valarray<bool>' being compiled
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(756) : see reference to class template instantiation 'std::mask_array<_Ty>' being compiled
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(109) : error C2143: syntax error : missing ';' before '}'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(754) : see reference to class template instantiation 'std::valarray<bool>' being compiled
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(756) : see reference to class template instantiation 'std::mask_array<_Ty>' being compiled
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(109) : error C2238: unexpected token(s) preceding ';'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(754) : see reference to class template instantiation 'std::valarray<bool>' being compiled
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(756) : see reference to class template instantiation 'std::mask_array<_Ty>' being compiled
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(110) : error C2146: syntax error : missing ';' before identifier '_Ty'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(754) : see reference to class template instantiation 'std::valarray<bool>' being compiled
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\valarray(756) : see reference to class template instantiation 'std::mask_array<_Ty>' being compiled
Error executing cl.exe.
[/pre]
However it compiles fine in a Console App.
Anybody have an idea?
Best regards,
Alexandru Savescu
|
|
|
|
|
Include valarray like this:
#undef min
#undef max
#include <valarray> The problem stems from some pesky min and max macros defined in windef.h that interfere with valarray::min and valarray::max .
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thank you Joaquin, apparently they fixed this in VC 7.0
Best regards,
Alexandru Savescu
|
|
|
|
|
Does anybody know how to access Ports in Windows NT?
|
|
|
|
|
What kind of ports? Message ports?
Now that we've taken care of the educational bit (be precise), I assume you want to access some I/O port (serial, parallel, ...).
You talk to (or even write yourself) a device driver. Try searching Google for something like "Windows NT direct I/O".
|
|
|
|
|
Anyone know how to disable the list control from automatically displaying a vertical scroll bar when there are too many items to display?
I tried the LVS_NOSCROLL style but this disables scrolling entirely. I just want to get rid of the visual scroll bars but still have the ability to scroll the list control (I am using another method to scroll it as the program is designed to run on a touch-screen PC and the default scroll bars are to small to use).
|
|
|
|
|
I don't have a sure-shot answer for you, but I took a look at the CWnd class and noticed that it has a couple of functions you might wanna try: ShowScrollBar and EnableScrollBarCtrl .
Regards,
Alvaro
Insanity: doing the same thing over and over again and expecting different results. - Albert Einstein
|
|
|
|
|
Hello, I'm a beginner programmer and I'd like some advice if possible.
I'm TRYING to make an application that displays a bitmap (a map) and then I want to put values on that map, values that I take from a file. This wasn't a problem till I knocked my head to screen resolution changes and screen-to-printer changes. Now this is where I want some advice. Can anyone please tell me some CDC methods to use for this ? I don't want the program made, just some advice to build upon.
How do I pDC->TextOut(100,100,"Value") without bothering about screen resolution changes and display-to-printer conversions. Do I have to take screen rect coord and then do smtg like this : pDC->TextOut(100*(screenreswidth/800),100*(screenresheight/600),"Value") after inputing the coords with the resolution of 800x600. Or, do I have to use SetMapMode(MM_....) and then the Device to Logical() method ? If that, can anyone explain the concept since i'm not english and It's a litte difficult to translate (conceptually) device to logical. An example perhaps ?
And then, the screen-to-printer conversion problem. Is it absolutely necessary to calculate the screen-to-printer scale and then x*scale and y*scale. If so, it's a lot of work to do cause I have to display values for over a hundred cities on the map.
What can I do ?
Thank you !
|
|
|
|
|
you wish to draw text on the bitmap right??? You can try CMemBm class in codeproject.
|
|
|
|
|
No, I dont't wanna draw on the bitmap, I wanna TextOut some values and I needed advice for coordinates transformation which I can't get so easy.
The CMemBm class, from what I've seen it's just for drawing, so it's not helpfull.
|
|
|
|
|
|
Open the Quick watch window and in the edit box enter the function name (i.e. myfunc (0) ). Most likely will not work.
Best regards,
Alexandru Savescu
|
|
|
|
|
This is my third post now, can't anyone help me? I would like to know how to close/open a DeskBand from another process. Also why does explorer hang on to your deskband when it is closed? Am I doing something wrong? When I close my deskband, I can't delete the dll because explorer keeps it open.
If you know anything about this please help.
Thanks
|
|
|
|
|
The reason why IE is holding on to your DLL is because you have not properly destroyed all of your COM objects. There is a reference count in the object server of your DLL that keeps track of how many objects that are still active. And there is a function call DLLCanUnloadNow that lets OLE know if it can unload your DLL. This function will not let the owner process unload the DLL as long as there are outstanding objects.
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!
|
|
|
|
|
Thanks, I knew this, but the other posts have confirmed my fears.
|
|
|
|
|
Explorer hangs onto the DLL whether the bar is actually open or not; you'll need to kill explorer.exe (or log off) to modify the DLL. I seem to remember hearing about a way to disable this, but can't bring it to mind right now... maybe TweakUI?
That's the extent of my knowlege; there are several articles on the subject here though; do a search for "explorer bar" and see what comes up.
---Shog9---
From now on we can call C# and MC++ "The square wheel languages" -- Jack Handy, The Lounge
|
|
|
|
|
IIRC it's the AlwaysUnloadDLL registry key.
|
|
|
|
|
I couldn't find this key I'll have to look further for the location. Although its a start, it's not the solution I want, I guess I can't change how they implemented it so I'll just have my install reboot the machine when updating.
|
|
|
|
|
Thank you for replying. I was afraid someone was going to tell me this. I don't understand why they do this other than as an optimization. It doesn't save that much time and they are just using more memory.
|
|
|
|
|
Does anyone have a list of CP web services - you know, the CP URLs ending in ".xml"? I could've sworn I saw at least one reference (the last "n" posted articles service), but it was 4am and I was fading. I didn't save the link and am now kicking myself.
Thanks,
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
|
Ah, that was it! Thanks, Rama!
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
By the way did you see my screen saver using your WebResourceProvider thru C#. Thanks for WRP.
|
|
|
|
|
Yes! You did a great job of wrapping it for C# use! As soon as Tom's book shows up at my doorstep, I'll start learning C#. I feel so... oh, what's the word I'm looking for... "STUPID"! that's it!
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|