|
How to convert the COLOURREF into the String type.in order to display the selecting colour in the window useing pDC->TextOut();
ramanand
|
|
|
|
|
Use GetRValue(), GetGValue(), GetBValue() functions
-- modified at 6:39 Wednesday 23rd August, 2006
Regard's
Dhana
|
|
|
|
|
<br />
COLORREF color=RGB(255,120,200);<br />
CString Format;<br />
Format.Format("Red=%d, Green=%d, Blue=%d", GetRValue(color),GetGValue(color),GetBValue(color));<br />
|
|
|
|
|
How to find out whether a register key is present in the registry or not?
Thank you.
KIRAN PINJARLA
|
|
|
|
|
Just try opening it with RegOpenKey - this will fail if the key isn't present. If you need to check for a particular value, use RegQueryValueEx which will also fail if the value isn't present.
For more sophisticated applications you can recursively enumerate the registry using RegEnumKeyEx and RegEnumValue, but that shouldn't be necessary if you just want to check a single key.
|
|
|
|
|
Thank you very much matt.
KIRAN PINJARLA
|
|
|
|
|
|
Hi,
I have an MDI application with splitterwindows under VS 6.0 (one documenttype, but you can open different documents) . One splitter is fix, like an outlook bar and one will be replaced. When I click on Menue (load document) then my programm reads a specific file and open many other files and handle them.
Now I want to do something like this. In one view I insert a list of names and when I click on a button I want to split the list into groups and display them in differnet childframes. I also want the behaviour of that every childframe works in his own folder. When I click on the menue and do it manually it works. When I do it with my button, the childframes will be created correctly but when the files will be saved, they are all in the same folder.
When I click on the menue a function in the ProjectApp.cpp do the work. When I call this function from the view with theApp.Function() it works like I discribed. So my Idea is to send a Message from the view to the App, but it doesn't arrived. I tried it with GetParent() and AfxGetMainWnd()but nothing works.
Is here someone who has an idea how to solve my problem?
Thanks for help
yummi
PS: Sorry for my english but I hope you can understand what I mean.
|
|
|
|
|
Hello..
I need a function to windows like gettimeofday in linux.
Can you help me?
|
|
|
|
|
|
it was a possibility, but i want to get time in microseconds, and this functions only give me the time in miliseconds. Is there any function which return the microseconds?
thanks
|
|
|
|
|
You can get more bits by using GetSystemTimeAsFileTime and working with the result, which is in 100ns intervals.
However, you won't get any better results, because the system clock is only updated as often as the clock timer ticks, which on most Windows systems is approximately 15ms. To see what yours is, run ClockRes[^]. I'm sure this is true of Linux as well.
The system doesn't necessarily add 15ms every time the system timer ticks, it may add a slightly larger or smaller amount to allow for clock drift.
|
|
|
|
|
If you really need more accuracy then you'll need to use the QueryPerformanceCounter API: HighResolutionElapsedTimer and MS's KnowledgeBase has more details on this. It's not an actual 'time of day' though; just a high resolution timer you can use to time. If you need both time of day and very high precision timings, you'll need to combine the two methods (or even use an external hardware peripheral like a GPS receiver!)
|
|
|
|
|
Hi
i have created a bitmap and i want to load that to my dialog window.
how to load the bitmap into the dialog.
pls give me the sample code if possible
|
|
|
|
|
The Name itself implies the API.
::LoadBitMap(...).
Think Clever.
Uday kiran
|
|
|
|
|
reddy harish wrote: load the bitmap into the dialog.
Use BitBlt()/StretchBlt() API's
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
See LoadImage or LoadBitmap from resource or see CImage::Load and then CImage::BitBlt
|
|
|
|
|
Hi, i can capture frames with directshow but just with ICaptureGraphBuilder2 Interface so i capture an avi file,
i want to capture frames in my file (not avi), help please
thanks
Thanks
|
|
|
|
|
Use the SampleGrabber filter. I prefer the one that comes with the SDK since the source code is provided.
|
|
|
|
|
I split the window into 3 view.
some buttons in first view by clicking these buttons second view changed.
In the second view some buttons there by clciking these third view is changing
i attached the pictures to these button. in OnIntialUpdate() funtion . if i replace SOme X view with Y View, and again i repalcing Y with X view. the pictures are not showing..........
how i always get pictures to these buttons?
delete
|
|
|
|
|
kiranin wrote: if i replace SOme X view with Y View, and again i repalcing Y with X view. the pictures are not showing..........
Do you mean switch between views, is it?
Can you show some code?
|
|
|
|
|
Hi out there,
I use ShellExecute() to open a file with the default extension. Works well for Word-Documents, Excel, Powerpoint, PDF, JPG and so on.
My program calls ShellExecute() so that the user can read the or work on the file. When finished, the file should be closed or minimized again and my program is visible again. Works well.
Now I created a MessageBox() right after ShellExecute() whee I want the user to click Yes or No (I want to know if the file was of any Help for my user). Now something strange happens:
I call ShellExecute(), a PDF is started, my Messagebox appears and the PDF is displayed. I close my PDF and see my messagebox. Works well
On the other hand:
I call ShellExecute(), a Word-document is started, my messagebox appears, the word-document is brought in the background an my application with the messagebox is displayed as top-window. So my user is asked, if the document was of any help, but the document is in the background, behind my application. The user has to bring it in the foreground. The same happens for Excel-documents.
Is there any way to tell either Office to stay in the foreground or to tell my programm to remain behind the currently started shell-object?
thanks in advance
Juergen
|
|
|
|
|
I think that the "pdf" behaviour is sort of on exception and the "office" behaviour is the rule.
What you can do is rearrange the windows in the Z-Order and make your application second from the top before firing the message box (however, this seems to be what you already do).
Another solution would be to make a non modal message box, in which case it must be possible to activate it without having your application directly in the background.
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
|
|
|
|
|
Hm, I also thought of a nonmodal dialog.
But I have to wait in my application for the end of a nonmodal dialog.
So, I have to do the following:
ShellExecute()
Create Dialog
Show Dialog without activating it (how can I do this??)
Wait for End of Dialog (how can I do this?)
Continue with my program based on the results of my nonmodal dialog
I haven't done a lot with nonmodal dialogs, but I will learn...
Juergen
|
|
|
|