|
Hi,
In the Project workspace->ClassView,
Select the Dialog Class you want to resue
and right click and select 'Add to Gallery'
The whole Dialog's class and implementation classes
will be packaged into one single class and
you can insert them into what ever you want by
using
Projects->Add To Project->Components & Controls
And then in Components and Controls Gallery you can
you will find your Dialog as a single package.
Regards,
Prem
|
|
|
|
|
Thanks Prem,
All these years and I did everything by hand. I owe you one.
Darroll
|
|
|
|
|
I created an applicaion using a Listview control for Chinese Tradional Windows XP. The problem is the chinese characters are not displayed properly in the listview. Any ideas on how to fix this.
Thanks
|
|
|
|
|
If the control is in a dialog, edit the .RC file by hand and change the font from "MS Sans Serif" to "MS Shell Dlg". MS Sans Serif is a single-byte font only, and can't show characters.
--Mike--
Just released - RightClick-Encrypt - Adds fast & easy file encryption to Explorer
Like the Google toolbar? Then check out UltraBar, with more features & customizable search engines!
My really out-of-date homepage
Sonork-100.10414 AcidHelm
|
|
|
|
|
I have a document open, and my view is a split screen.. the user clicks a finish button..
i call CDocument::SetModifiedFlag(true);
i call CDocument::DoSave()
i call CDocument::ClearAllVariables()
i call ReplaceView() twice, setting the top and bottom views to a blank property page
the ReplaceView() calls DestroyWindow() which in turn serializes my document and saves a blank document!
so instead...
i call CDocument::SetModifiedFlag(true);
i call CDocument::DoSave()
i call CDocument::OnNewDocument()
i call CDocument::SetModifiedFlag(FALSE);
i call ReplaceView() twice, setting the top and bottom views to a blank property page
the ReplaceView() calls DestroyWindow() which in turn pops up a dialog box and asks for a file name to save as! I never want the user to ever see this stupid dialog!
so.. currently i..
i call CDocument::SetModifiedFlag(true);
i call CDocument::DoSave()
i call ReplaceView() twice, setting the top and bottom views to a blank property page
i call CDocument::OnNewDocument()
the problem with this is that when the ReplaceView() gets called now it saves the document again itself (so it just got saved 2 times back to back).. i really dont want this function to ever be able to save.. and it does it because of the DestroyWindow() call.. is there a way to have a call to OnNewDocument() and then later DestroyWindow() without having the 'Save As' dialog popup? i have it working for now, but i know there will always be a possibility of my ReplaceView() saving when i don't want it to.
thanks for any suggestions
-dz
|
|
|
|
|
I want to run Flash file (swf). To do this I insert ActiveX for Shochwave Flash Object and give the Movie URL. But I get some problems
1) I have to give complete path of the file C:\Projects\Flash\Debug\abc.swf, If I give only abc.swf, the flash file will not display (unable to find the flash file).
2) If I want to display a flash file on the View, then how I can create "CShockwaveFlash" class object. Actually I am unable to understand the parameters of create() function and then which function will call for the flash file name and so on . . .
3) I have one very strange problem, why I compile and run the program, it run and display flash file correctly (I display it on the dialog box). but when I copied EXE in the different location on the same system it will not run the flash (this is the not the problem of flash file location).
4) How I can determine that the Computer can run flash file that is Shockwave player is installed on the system.
5) Is this possible that Flash file can be added in the resource. If "YES" then how I can load this file from resource ID.
Thanks in advance.
Any example, any web resource, any help, any . . .
and looking for the reply . . .
|
|
|
|
|
hrm.. ive only used flash in a visual basic program.. haven't tried it in VC++ yet.. i had to type in the full path too.. but when it compiled it put it in the .exe..
http://www.dzgraphics.com/pw/dz_pw.exe
its a super sweet password generator feel free to get it, ive also written the whole thing in flash at http://www.dzgraphics.com/pw
wish i could help more.. as for how to tell if they have flash you should include the .ocx file as part of the installation.. i think its called swflash.ocx
as for documentation of how to use it i would contact macromedia, or search there site.. because i remember finding information about using it in programs was pretty hard to find..
-dz
|
|
|
|
|
My Word macro has grown HUGE, so I want to convert it to some C or C++ console application, or whathever, so that It can run i Background.
This macro simply makes some standard modifies to a TEXT file.
I tought about FSTREAM et soci.
The problem is that the Macro language i think VBA, has some advanced funcions to move the cursor in the text.
Whis C++ classes ofers the same functions?
Like Selection.
.MoveDown Unit:=wdLine, Count:=1, Extend:=wdExtend
.HomeKey
.TypeText Text:=hello
.TypeParagraph
.TypeBackspace
.Delete Unit:=wdCharacter, Count:=3
etc.
"Nelle cose del mondo non e' il sapere ma il volere che puo'."
|
|
|
|
|
I am not as familiar with VB or VBA for that matter as I used to be, so if you could give some details of what is actually being accomplished in that code block we may be able to help you.
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!
|
|
|
|
|
Hi,
Let say we have a List Box dialog (Visual C++ 6.0 MFC), with text on it (Tabs, spacing, linefeed ...)
Is there any way in programming (simple) that we can print out as it is (text & screen proportional) & easy to see?
a) If I use: m_listbox.GetClientRect(Rect);
m_listbox.Print(&printer, PRF_CLIENT);
*) I got what I see, but the text size is very tiny
b)If I use: m_listbox.GetItemText(i, j, str, 10);
k= strlen(str);
dc.TextOut(350*j, l+(75*i), str, k);
*) The text size is OK, but the printer printout Tabs as "square" symbols ang resulting the print out looks badly (not in-lines)
---> Any one can help? I thought that Visual C++ MFC is a very powerful application, this is supposed to be a simple task (print out as it is)!
*) If anyone wants that I send the whole (but very simple) program to see & modify to make it works better ... I am please to send my zip file to anyone!!!
It is a desperate request, thanks in-advance!
ATC
|
|
|
|
|
Hi,
I am trying to have a Timer in a non-window class(Generic Class). I need to call some non-static function in the class, from the Timer Procedure. As the Time Procedure is non-static I want to know what is the best to way to handle it? Is there an alternate way to create timers other than using "SetTimer" call?
Thanks
Arthi (Just a Begineer in VC++)
|
|
|
|
|
For normal timers, you need an HWND. I suggest that you create an invisible window to handle timer messages.
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Buy it, read it and admire me
|
|
|
|
|
Hi,
Thanks for your suggestion. Does this mean that I cannot create timers for non-window classes and have them call functions in the class?
Thanks.
Arthi
|
|
|
|
|
arthivjii wrote:
Does this mean that I cannot create timers for non-window classes and have them call functions in the class?
For normal timers you need a window.
But you can take a look at Multimedia timers if you really don't want a window, even a hidden one. Multimedia timers are higher precision timers, but their usage is not as simple as that of normal WM_TIMER based timers
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Buy it, read it and admire me
|
|
|
|
|
Is there a way to add a vertical scroll to a static Text box?
Thank-you
Sincerely,
RAH
|
|
|
|
|
SnapRick wrote:
Is there a way to add a vertical scroll to a static Text box?
No, you cannot! Not normally anyway. But you can use a read-only edit box with much the same effect!
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Buy it, read it and admire me
|
|
|
|
|
I have never tried it, but in theory, as CStatic inherits from CWnd, you should be able to add scrollbars by setting the WS_HSCROLL and the WS_VSCROLL styles and then showing the scrollbars.
Just a thought.
Roger Allen
Sonork 100.10016
If I had a quote, it would be a very good one.
|
|
|
|
|
Roger Allen wrote:
have never tried it, but in theory, as CStatic inherits from CWnd, you should be able to add scrollbars by setting the WS_HSCROLL and the WS_VSCROLL styles and then showing the scrollbars.
Just a thought.
Riga, I thought of that. But the static control seems to be a sort of disabled control in that it won't let ya select text and stuff I thought that also meant that even if we add scroll bars they'd also be disabled. Too lazy and tired to try it out now
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Buy it, read it and admire me
|
|
|
|
|
How can I make a toolbar that will exist inside the taskbar, such as the address toolbar or the maginifier tool from powertoys?
im trying to make a simple program. id appreciate the help. thx.
|
|
|
|
|
Can anyone supply hints on how to convert twips to screen coordinates?
I believe this is dependent on screen resolution, but don't know where to start.
Ron
|
|
|
|
|
BlackDogEngineering wrote:
Can anyone supply hints on how to convert twips to screen coordinates?
See Q94927 - How to Convert Twips to Pixels
Nish
p.s. I think the sample code is Access 97 but you can convert to C++ easily I guess
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Buy it, read it and admire me
|
|
|
|
|
I rembember when I was a baby and liked to play with the Visible Property in Visual Basic.
It was Button1.visible = TRUE, or FALSE.
I see that there is the same property in VC++ but how I can change it at runtime.
And how I can also change the enabled property, so that at some point in the program something is disabled, and after is enabled.
For example the Sign OUT button should be disabled, in I am not already logged in.
Thanks alot!
"Nelle cose del mondo non e' il sapere ma il volere che puo'."
|
|
|
|
|
In VC++ you don't have 'properties'. Instead you have to call ShowWindow or EnableWindow.
Tomasz Sowinski -- http://www.shooltz.com
- It's for protection - Protection from what? Zee Germans?
|
|
|
|
|
use m_Button1.ShowWindow(SW_HIDE) to hide it
use m_Button1.ShowWindow(SW_SHOW) to show it
|
|
|
|
|
hello (it's my first time here) <(:oD)!
i've implemented a server-app installed on machine01. afterwards i've implemented a client-app and installed it on machine02. usually the server-app is running on machine01, but if the app terminates i want to start it agein from machine02.
is this possible, without having installed any additional services to manipulate with rsh, rexec, at-dos-command aso...?
i would be very greateull fpr any hints!!!
thank you,
have a nice day,
ciao,
stefan
|
|
|
|