|
Thanks - that will help a great deal
|
|
|
|
|
I've searched with google a bit, but can't find any info. about this.
In the Project Application (which I wrote the test app. for), I made use of dynamic arrays, whose size is only decided at run time.
Fortunately, the previous solution showed how the volatile qualifier can be used to force a memory lookup for a specific variable when it is read -
however, I need a handful of dynamic arrays to be volatile - and the memory allocation tells me that I "cannot allocate 'const'/'volatile' objects".
Simply declaring : bool* volatile m_NewReadyFrameFlag;
and later allocating m_NewReadyFrameFlag = new bool[CurChs];
only means that the pointer to the array itself is volatile and not the individual elements...
which is the best way around this (ie. to create a dynamic volatile array)?
|
|
|
|
|
Hi All
I want to find the icon associated with all the file extensions and if no valid extension is there then find the generic icon provided by the system for unknown file extension.
Please help me to do this...
Thanks
|
|
|
|
|
Why you post three messages for a question?
|
|
|
|
|
For your question do you need to SHGetFileInfo ?
|
|
|
|
|
Hi
Thanks for your reply
Infact what I want is to find the icon of a file which is i am recieving from the remote system so I have ony file name (e.g. Test.txt, Test.pdf, etc)
So I need to find the icon associated with file extensions like .txt, .pdf, etc.
that means I dont have full path of the file...
So please help me for solving this problem....
Thanks & Regards
|
|
|
|
|
How did you get file name of remote?
|
|
|
|
|
Let some file name is coming through socket and I want to show these files in a list control on my system and here want to show the image associated with that extension in my PC...
PLease reply
Thanks & Regards
|
|
|
|
|
Hi All
I want to find the icon associated with all the file extensions and if no valid extension is there then find the generic icon provided by the system for unknown file extension.
Please help me to do this...
Thanks
|
|
|
|
|
|
Hi
Thanks for your reply
Infact what I want is to find the icon of a file which is i am recieving from the remote system so I have ony file name (e.g. Test.txt, Test.pdf, etc)
So I need to find the icon associated with file extensions like .txt, .pdf, etc.
that means I dont have full path of the file...
So please help me for solving this problem....
Thanks & Regards
|
|
|
|
|
I use the ExtractIcon() function, maybe it can help you...
This is just an example ...
BOOL foo_notifyIcon()
{
ZeroMemory(&niData,sizeof(NOTIFYICONDATA));
niData.uFlags = NIF_ICON|NIF_MESSAGE|NIF_TIP;
hModule = GetModuleHandle((LPCSTR)"executablename.extension");
ico = ExtractIcon(hModule, (LPCSTR)"C:\\windows\\system32\\shell32.dll",18);
niData.hIcon=ico;
BOOL rc = Shell_NotifyIcon(NIM_ADD,&niData);
return rc;
}
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
Hi,
Is there an easy way to create a number of "forms" containing controls and being able to show/hide them within a dialog? I want to be able to show/hide groups of controls programmatically and I dont want to have to call ShowWindow() for every control? If there is a way to group controls so that one ShowWindow() will show/hide the whole group that would be great!
Cheers ,
Tony
|
|
|
|
|
Yes if you have many controls for example 200 controls and you want to invisible these controls a way is use of 200 showwindow for hide or show them but if you have a set of numbers for you controls(ID) you can use of a showwindow for them see a short example:
for(int i=100;i<500;i++)
GetDlgItem(i)->ShowWindow(0);
GetDlgItem(i)->ShowWindow(1);
|
|
|
|
|
Yes - you create separate dialogs with the different forms, and then you create all of them at once, and then show/hide individual dialogs. This is basically a property sheet!
N.B - I just did an implementation for a prototype that does something like this by examining dialog resources at runtime and them adding/removing/moving/resizing the active view's controls as required. Makes for easy dynamic interfaces (just put the new DLL in) very easy! Too bad I cannot share the source for it now...
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
Thanks,
I have done it the way that you suggested - it was quite easy to do and it works great!
Thanks again
Tony
|
|
|
|
|
Check out this class.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hello,
i use CListCtrl with the Owner Draw property and virtual list, and every time when i want to update
the content of my CListCtrl this control flicker.
I add new items in a vector and then call pMyListCtrl->SetItemCount(vector.size()); to update all items, and here is that flicker!
Can i avoid this?
thanks for any help
termal
|
|
|
|
|
You can turn redrawing off, do your updates, turn redrawing back on and force a redraw. Something like:
m_lcMyVirtualList.SetRedraw( FALSE );
m_lcMyVirtualList.SetRedraw( TRUE );
m_lcMyVirtualList.RedrawWindow(); Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
Hello,
thanks for answer, but its the same, when i call
m_lcMyVirtualList.SetRedraw( TRUE );
m_lcMyVirtualList.RedrawWindow();
stay the same problem!
Now i take a timer to update my list control!
regards
termal
|
|
|
|
|
If you are seeing flicker at that point, it may be that the implementation of your data store may not be as fast as it should be. Since you are using a virtual list control, you need to provide data to the control as it asks for it.
If the data store you are using is too slow, you may see flicker because of that - the updates will be slowed down because of slowness.
May want to look into speeding up the handling of data.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
uups, i didn know that this can be a problem:
zitat:
If the data store you are using is too slow
thanks for information about!
regards
termal
|
|
|
|
|
Dear all
i need your help. in advance i thank u. my issue is as follows:
if i have a menuitem, after i click it, one dialog appears:ask users to enter parameters below: length=10 pixel, width=10pixel, height=10 pixel, then click ok.correspording to cube will show in window. how to program this point? who have any such snippet? so urgent. thanks very much.
regards
zhiyuan
Li Zhiyuan
5/10/2006
|
|
|
|
|
One way would be using MoveTo (int nXCoord, int nYCoord)/MoveTo (CPoint point) and LineTo (int nXCoord, int nYCoord)/LineTo (CPoint point) of the DeviceContext in cascade for every plane, and then once every one to connect the visible corners.
Use the OK to set a BOOL to true and in the OnPaint...
pDC->MoveTo (0, 0);
pDC->LineTo (width, 0);
pDC->LineTo (width, height);
pDC->LineTo (0, height);
pDC->LineTo (0, 0);
For the second square you should make the same but adding "length" in every coordinate to draw it "in front of the other one"
Then you have to connect every corner with
pDC->MoveTo (0, 0);
pDC->LineTo (length, length);
pDC->MoveTo (width, 0);
pDC->LineTo (widthlength, length);
and so on with the other pair of corners
Note:
I am using the CDC* pDC that is in the OnDraw message for VC++ in the CView derived class. In dialogs you should look at OnPaint and if the cube has to be drawn there, use the CreateCompatibleDC to and draw using it.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
Hello Guruji
I am making an application using modal dialog based application
my need is save .txt and word file in database
( file name saved in database and file save in folder )
i can fetch file name using some obj.GetPathName() function
but now how i saving this file to folder and also how i will be
feaching it.
Note : i used database as MySQL
Now one of another question how feach data from MS word file
Please told me
if possible with example
Regard's
Kaushik
|
|
|
|