|
Hey all.
I use CreateWindowEx to create a Rich Edit Control. I use WS_EX_RIGHT | WS_EX_RTLREADING to make it right-aligned on a Hebrew OS.
It works well on Windows 2000, but on a clean installation of Win98 Heb-enabled, the content of the Rich Edit Control is left-aligned. On a not-so-clean installation of Win98 (which has Visual Studio, Office, etc.) - it displays correctly.
The problem is not with comctl32.dll - copying that file from the "good" win98 to the "bad" win98 doesn't solve it.
Any ideas??
|
|
|
|
|
|
I can't thank you enough!
That's the cause... Everything works great with Rich Edit Control 3, but not-so-great with version 2.
Do you have any idea WHY version 2 doesn't right-align correctly?
Thanks!
|
|
|
|
|
Hey,
Anybody know if it's possible to have two different "panes" in a console app. As in frames in a website... where you can have one frame with ceratin output [probably static] and the other frame will have different output.
Now taking suggestionsfor a new sig. please email me all suggestions.
|
|
|
|
|
I believe there is no direct support for console based panes. You'd have to simulate the whole thing with code and it may not be worth the effort.
Nish
The rumours that I am an AI bot are absolutely false. These rumours have been propogated by *them* to focus all the attention on to me, while *their* bots take over the planet. Thank y%%%% Divide by zero. Cannot proceed. Abort(y/y)?
|
|
|
|
|
Your probably right. It mightn't be worth the effort.. but it would have been nice for the program I'm doing.
Now taking suggestionsfor a new sig. please email me all suggestions.
|
|
|
|
|
The Curses library allows multiple panels or "windows" in text terminal or console applications. There are commercial implementations of Curses for windows, and I suppose there's a port of the free ncurses library somewhere.
|
|
|
|
|
I would like to save the printer info in some variables so that the user can just press any button and volla. I want to code this myself into one of my controls. I also want to avoid doing a DoModal on CPrintDialog because this would stop my thread while the dialog is open. Also, I do not believe the dialog can do Modeless.
Can I save the HDC to the printer and its DevMode stuff to a member variable in my control without any problems? Will it interfere if there is another app and its uses the printer or another printer driver etc?
Appreciate any responses.
|
|
|
|
|
I have a heavy calculating function that runs on a machine with twelve processors. I have divided the calculation in 12 similair pieces to improve calculation. The calculation runs in 12 threads. The main calculation function starts 12 threads, one for each processor. I wish to send som parameters to the threads via the main calculation function. But a threadprocedure takes a pointer to void as argument. I must therefore send a pointer to a struct. But how can I preserve const for some of the arguments? const members of the struct doesnt work since the values are parameters to the function that starts the threads.
|
|
|
|
|
In the thread function why can't you have:
const MyStruct* pMyStruct = static_cast<mystruct*>( lpVoid );
Neville Franks, Author of ED for Windows. www.getsoft.com
|
|
|
|
|
I'm not sure if this is what you're asking, but this example shows how you can define a struct with const references to some external variables:
struct calculation_parms
{
const int& parm;
calculation_parms(const int &parm):parm(parm){}
private:
calculation_parms(calculation_parms&);
calculation_parms& operator=(calculation_parms&);
}; Another issue having not to do with this is that, IMHO, Windows OSs do not distribute threads acrosss several CPUs (the distribution is done on a per-process basis). If I'm right, this scheme of yours won't help speed up the calculations (you'd have to launch 12 separate processes.)
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Wish: to have the paramter src to of the function threadedblurfilter const.
--START CODE EXAMPLE--
#include <stdio.h>
#define _REENTRANT
#include <pthread.h>
#include <math.h>
#include "blurfilter.h"
#include "ppmio.h"
typedef struct
{
int xsize;
int ysize;
pixel *src;
pixel *dst;
int radius;
double *weight;
int ystart;
int yend; /*blurfilter calculates including this coordinate.*/
} blurinfo_t;
void *blurfilter(void *);
void threadedblurfilter(const int xsize, const int ysize, pixel *src, pixel *dst
,
const int radius, double *weight, const int nthreads)
{
blurinfo_t *blurinfo = (blurinfo_t *)malloc(nthreads * sizeof(blurinfo_t));
pthread_t *threadId = (pthread_t *)malloc(nthreads * sizeof(pthread_t));
int i, j;
int npixelsperthread = ysize / nthreads;
int ypos = 0;
int breakreached = 0;
for (i = 0; i < nthreads; i++)
{
if ((double)(ysize - ypos) / (double)(nthreads - i) ==
(ysize - ypos) / (nthreads - i) &&
breakreached == 0)
{
breakreached = 1;
npixelsperthread++;
}
blurinfo[i].radius = radius;
blurinfo[i].weight = weight;
blurinfo[i].xsize = xsize;
blurinfo[i].ysize = ysize;
blurinfo[i].src = src;
blurinfo[i].dst = dst;
blurinfo[i].ystart = ypos;
blurinfo[i].yend = blurinfo[i].ystart + npixelsperthread - 1;
pthread_create(&threadId[i], NULL, blurfilter, &blurinfo[i]);
ypos += npixelsperthread;
}
for (j = 0; j < nthreads; j++)
{
pthread_join(threadId[j], NULL);
}
free(threadId);
}
void *blurfilter(void *p)
{
blurinfo_t *blurinfo = (blurinfo_t *)p;
//Lots of heavy calculations.
}
--END CODE EXAMPLE--
|
|
|
|
|
how can i change edit font color???
|
|
|
|
|
if u r using a DC to output u'r text, then u can change u'r font color by setting DC's SetTextColor property
Ashok Singh
<west end="" india="">
|
|
|
|
|
Use CDC::SetTextColor in CWnd::OnCtlColor . I think there are some good articles explaining this on CP.
Cheers
/moliate
|
|
|
|
|
//this is how i set the size and the ==== bold
//setting edit box yfont size
LogFont.lfHeight = 15;
LogFont.lfWeight = FW_BOLD;
newFont.CreateFontIndirect(&LogFont);
GetDlgItem(IDC_EDIT1)->SetFont(&newFont);
CEdit* smpEdit = (CEdit*)GetDlgItem(IDC_EDIT1);
smpEdit->SetWindowText(afileName);
|
|
|
|
|
Read Mike Dunn's FAQ. It will answer 50% of all commonly asked questions.
Nish
The rumours that I am an AI bot are absolutely false. These rumours have been propogated by *them* to focus all the attention on to me, while *their* bots take over the planet. Thank y%%%% Divide by zero. Cannot proceed. Abort(y/y)?
|
|
|
|
|
how to make a Item in CTreeCtrl invisible.
Thank you!
|
|
|
|
|
Delete it or create your own tree control.
|
|
|
|
|
since you know about ctreectrl let me please ask one question
do you know what is wrong in the following code? i mean.. i'm trying to sort the files by name, by type,by size, or by date (based on user choice). so i have to use SortChildrenCB() instead of SortChildren().
but the callback function is never got excuted.
do u know why?
|
|
|
|
|
since you are using ctreectrl let me please ask one question
do you know what is wrong in the following code? i mean.. i'm trying to sort the files by name, by type,by size, or by date (based on user choice). so i have to use SortChildrenCB() instead of SortChildren().
but the callback function is never got excuted.
do u know why?
|
|
|
|
|
ShowWindow( SW_HIDE ) should workk.
Neville Franks, Author of ED for Windows. www.getsoft.com
|
|
|
|
|
NO,i want invisible a one Item,no a whole Windows.
|
|
|
|
|
jieg wrote:
NO,i want invisible a one Item,no a whole Windows.
You could overide the on item draw notification and draw something to indicate the item isn't available.
Other than that I don't think this is possible. You either need to remove the item from the tree control or possibly write your own tree control.
Neville Franks, Author of ED for Windows. www.getsoft.com
|
|
|
|
|
i have a application that prints all kinds of files using shellexecuteex(). the program printed a:\one\k.jpg and a:\one\m.tif yesterday... but right now when i using my application to print same two files again, the following error message pops up.
" a:\one\k.jpg is not valid to win32 application"
and
" a:\one\m.tif is not valid to win32 application"
why both of them print before and not now.. i could not find the reason..
please answer me if you know the reason.. thanks
|
|
|
|