|
Hi,
The MSDN doc says the return code from EM_GETCHARFORMAT reflects the Value
of dwMask which says which values of the Charformat structure are valid
so...........
If the return code From the SendMessage is zero this means that none of the
Vlaues are Valid
If so do I at somepoint in time have to do a EM_SETFORMAT first ????
|
|
|
|
|
ForNow wrote:
If so do I at somepoint in time have to do a EM_SETFORMAT first ????
How about trying it and see? First send it EM_SETFORMAT , followed by EM_GETFORMAT .
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Ok
I have a related question but I'll start a new thread
|
|
|
|
|
I believe if you read carefully that the structure receives the formatting for the FIRST character in the selection, and the dwMask specifies which attributes are consistent througout the selection.
According to MSDN:
lParam
Pointer to a CHARFORMAT structure. If the selection formatting
is being retrieved, the structure receives the attributes of
the first character and the dwMask member specifies which
attributes are consistent throughout the entire selection.
Hope that helps.
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
hello
please help about adaptive niblack binarization algorithm , so thai i can write the c++ code according your algorithm.
Thnking you
|
|
|
|
|
re-re-re-re-REPOST[^]!!!! And particularly blatant, as your previous post is still on the first page of the forum.
Try doing some research for yourself - a little Googling and some use of Citeseer[^] (the best search engine for academic papers, in my experience) leads me to believe the reference you want is 'Wayne Niblack, An Introduction to Digital Image Processing, pp. 115–116, Prentice Hall, 1986.'
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
May be again you can paraphrase Einstein [^]
Regards,
Sandip.
|
|
|
|
|
I wouldn't want to be accused of reposting
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Stuart Dootson wrote: re-re-re-re-REPOST[^]!!!!
Nope: this time is adaptive.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
In my app I need to write something in some place on PC.
In my code I call 'std::ofstream' but first I have to make sure that file exist.
If file doesn't exist I need to make an empty file.
Now my question is, after I find out that file doesn't exist can I create it only by specifying full path-name not worrying if some of sub folders exist. It needs to recreate the whole path.
To be more specific the location is 'C:\....\Aplication Data\..".
How to achieve this?
Thanks
|
|
|
|
|
Use SHCreateDirectory to create the entire path before creating the file.
«_Superman_»
|
|
|
|
|
josip cagalj wrote: Now my question is, after I find out that file doesn't exist can I create it only by specifying full path-name not worrying if some of sub folders exist. It needs to recreate the whole path.
You'll have to do that separately from the file create.
And even the functions you could use to create a directory (_mkdir or CreateDirectory ) will only create a directory if its parent exists. So you're going to have to write something that recurses through a path, creating directories that don't exist in teh appropriate order.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
|
Stuart Dootson wrote: And even the functions you could use to create a directory (_mkdir or CreateDirectory) will only create a directory if its parent exists.
SHCreateDirectory will create the entire path for you.
«_Superman_»
|
|
|
|
|
Thanks - I found that just as I'd pressed the 'Post Message' button and was going to amend my post - but then found you'd beaten me to it!
I was looking in the shlwapi[^] docs for it. Silly me
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi All
Dialog based application not responding when function is call.Function is define in header file.Can any one give me advice how can i solve it?Plz help me
|
|
|
|
|
If your function is doing a lenghty operation, then it is normal that your GUI is frozen: your app is not able to process windows messages anymore (so that means not able to respond to events, not repainting itself, ...). You have to execute your function in a separate thread.
Here[^] is an excelent article that will help you understanding everything you need to know.
|
|
|
|
|
Thank for nice Article.But I need one more advice forum.Function is define in header file and all thing is doing there.So how can i use there worker thread?Plz help me
|
|
|
|
|
You have to create your thread in your dialog class, just before calling the function. You don't have to change your function at all. But I think things will be much clearer once you have read the full article.
|
|
|
|
|
Hello everybody,
i got a strange problem.
If i resize a frame (within a CFormView) all works great.
Till i replace the View with another one (the frame keeps)
All Size-Events are correctly send to the new active view.
But if I size the frame fast, the view will (sometimes) not get the newest Size-Event.
Then, a ugly mistake like this is provoked :
http://img5.imageshack.us/my.php?image=fehleruu2.jpg[^]
I tested this view already as a initial view (without changing the view into the frame ) in this
case it works also without mistakes.
Only if I replace the initial view with another one, then the second view resizes not correctly.
Also i tested if the initial view is also resized (so that wrongly 2 views are sized) but i use a Hidden-Flag to step out the OnSize-Function (but the Size-Event is send anyway to it )
Big thanks for help
|
|
|
|
|
How about handling WM_EXITSIZEMOVE[^] rather than/as well as WM_SIZE?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Yes, it's a last possibility to "resolve" it,
but if the user holds down the Mouse-Key (for example to continue the sizing) it
seems pretty ugly
But thanks for your answer
|
|
|
|
|
Hello all,
In my project I am creating a SDI application without Document/View architecture in MFC(Visaul C++ 2008).
Now in it, I am creating a child window using "Create()" method with window style "WS_CHILD" and i am calling this "Create()" method from "OnCreate()" of CMainFrame class.For this newly created child window I have created a new class.Now on this new child window I have added some controls like edit boxes, buttons and these controls are also created by "Create()" method and with "WS_CHILD" style.
Now my actual problem is that when I run the application, child window gets created and I can see the controls added on the child window also but I can not access these controls means these controls are disabled. Can anyone tell how to enable or access these controls on child window.
Thanks and Regards,
Abhijit
|
|
|
|
|
re-re-re-re-REPOST!!!!
If you didn't get any responses a week ago, how do you expect to get any this week when you have provided no extra information (for example - what classes were used to create your child windows - how about posting some code to illustrate what you're doing!
To paraphrase Einstein, "The definition of insanity is posting the same thing over and over again and expecting different results"
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
i want to setFont of a CStatic text control. i have GdiPlus::Font i want to use that.. or it will do if i will be able to convert it to same CFont.
any help
thanx
|
|
|
|