|
Hi all,
I've written an ActiveX control that automates MS Word When I call the Method PrintPreview I get the print preview window up but instead of the document being shown I get the web page it resides in, minus the document contents.
I've gone right through the type library header and haven't found another route (it is huge though).
|
|
|
|
|
Automation is a hassle in any case. However, I have found it usefull to generate a word macro doing the things you want done, and then edit that macro to see what exactly happens. Usually you will have to call the same procedures from your automation with the same variables to get the job done.
Success.
William
|
|
|
|
|
Nice idea.
Thanks
Tom
|
|
|
|
|
Hi william,
I used your technique and unfortunately it agreed with what I was already trying. Which is comforting to know, as it means I wasn't on the wrong track. Moreover, it's made me think now that the PrintPreview call is going to IE's PrintPreview engine. Basically, it depicts everything on the page except the Word document, something the Word Print Preview engine would be very unlikely to do.
Looks like I may have to get my hands dirty.;)
Tom
|
|
|
|
|
How can i receive data on my pc from microcontroller using acessspoint.
My microcontroller has TCP/IP stack.
do i have to use TCP protocol as well for receiving the data.
thanks
|
|
|
|
|
yes
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
|
|
|
|
|
I want color to the controls and and also to the window.
How can i color to it?
|
|
|
|
|
Can you be more specific do you need to set color to controls
|
|
|
|
|
SetBkColor and SetTextColor??
If these do not do the job, you will have to subclass the relevant controls and override the OnPaint function.
William
|
|
|
|
|
To paint the control you can use the WM_CTLCOLOR message.
Then in the OnCtlColor method you can Identify the Control using pwnd.
Then use the SetTextColor and SetBkColor method using pDc(Device context reference).
Hope this will help you.
Bye.
The secret of life is not enjoyment
but education through experience.
- Swami Vivekananda.
|
|
|
|
|
I know we can replace the floating mini frame class for toolbars and other control bars with something like :
m_pFloatingFrameClass = RUNTIME_CLASS(MyFloatingBarFrame);
That changes all mini frames for the application; is there a way to replace the frame for only a few select frames ?
I need to do some customized handling for one controlbar ( when it closes ) that I don't want to do on the other toolbars.
Thanks.
M.
|
|
|
|
|
Hi,
I've just downloaded a delaunay triangulation program from internet and reading the source code. I stumble upon this code:
struct memorypool {
VOID **firstblock, **nowblock;
VOID *nextitem;
VOID *deaditemstack;
VOID **pathblock;
VOID *pathitem;
int alignbytes;
int itembytes;
int itemsperblock;
int itemsfirstblock;
long items, maxitems;
int unallocateditems;
int pathitemsleft;
};
it seems that the program is doing it's own memory management. I wonder why people want to do their own memory management, we have new/delete for C++ and malloc/free for C. What are the advantages/disadvantages of doing our own memory management?
Thanks.
regards,
tep
|
|
|
|
|
In short, knowledge of allocation usage patterns can lead to (significantly) optimized memory allocation/recovery routines.
In general though these optimized routines only shine when you are allocating/freeing many blocks (10's or 100's of thousands at least) repeatedly in a short period of time.
The current malloc/free use lookaside lists and are fairly performant compared with those of the past. There is little _need_ to go beyond these for most programs out there.
...cmk
Save the whales - collect the whole set
|
|
|
|
|
From personal experience in production code, managing your own memory pool can greatly reduce memory fragmentation - we had a process that was only using about 200mb of memory, yet constantly crashed due to running out of memory. We eventually tracked this down to major memory fragmentation - at one stage the largest free chunk of memory dropped to about 15mb!
Implementing memory pooling in the key areas that were constantly allocating and reallocating thousands of tiny objects pretty much eliminated this heavy fragmentation.
|
|
|
|
|
I have a problem using a combobox. I am using SDK, not MFC, but basically the combobox updates and I can use the data in it but the drop down functionality of the combobox does not work. I press the arrow at the right of the combobox and nothing happens - I have to use the arrow keys to select the item I want within the combobox data set.
Do I have to enable the drop down functionality?
Any help would be great
u6ik
|
|
|
|
|
in the resource editor, enlarge the dropdown list to a size bigger than 0
|
|
|
|
|
And even this is tricky ... I do not know how many people just falled in that trap.
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
|
|
|
|
|
microsoft joke
|
|
|
|
|
If your using CreateWindow(Ex) you have to set the hight to the hight you want your dropdown window to go because a ComboBox has it's integral hight so setting the hight just afects the dropdown not the ComboBox.
ex:
hComboBox=CreateWindow("ComboBox",NULL,dwStyle,0,0,400,200,hWnd,(HMENU)iIdCB,hInst,0);
else
if it is on a dialogbox just drag the middel point as far as you want the dropdown to go
i hope this helped
G_S
|
|
|
|
|
How do you use combobox did you create this control in your program
|
|
|
|
|
I created the box in the resource editor on a Dialog form.
u6ik
|
|
|
|
|
If it's a size problem, either increase the size of the drop-down portion in the resource editor, or see here.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Thanks for your replies. All is working peachy
u6ik
|
|
|
|
|
Hi all,
when some one enters a hex value in a edit box ,say for example 0xffff
,then is there any way by which the value can be retreived as integer itself (not as text)??
when i retreive the data as text and try to convert it using atoi or atof routines the output is always 0.It'd be great if someone through some light on this ......
Thanks in advance
rajeev
|
|
|
|
|
You can use strtol[^] to convert your hexa string into a long. With this function, you can supply the base (which is 16 in your case).
|
|
|
|