|
Hi together,
i have got a SDI porject with some Dialogs inside. One main Dialog, should set some global Flags so that other Dialogs can read it.
I have tryed at first the way i would do it in a C++.
<br />
Class{ privat: <br />
static int m_Flag <br />
Plublic: get....<br />
set..
but this can not work inside the Cpp. ?? Ok so i tryed in a direction of extern int m_Flag; i found some examples in the net. But not woring with me.
So next try is usage of Messags. But i never usesd them before so most attractive for me seems to be the Extern definition??
But maybe i am too and this the reason why its not working.
Can somebody pleaseee give me tip or an example
|
|
|
|
|
you could pass a pointer to the main class to each dialog.
in the main class, either make the variable public ( bad idea ) or have Get/Set methods for each of the values ( better idea ).
and don't forget to #include the main class header in each dialog.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Hello Everybody
I Designed a Mp3 player Using MCI functions
I wanted to add a Peakmeter to it ,but I was not able to get a snapshot of the audio stream playing right now! (I thought to my self that I must do such a work-taking a snapshot).
If any one has any idea or knowledge, Please help me!
ps. excuse me if my english is not good.
Iman Ghasrfakhri
|
|
|
|
|
Hi dudes,
I would like to know what is function for checking the given input is Integer or float or char or keys like backspace, space enter.
Thanks in Advance.
If you have faith in the cause and
the means and in God, the hot
Sun will be cool for you.
|
|
|
|
|
DELIVER THE PROMISE wrote:
input is Integer or float or char or keys like backspace
And how do you want check float by one symbol ?
|
|
|
|
|
I'm not sure exactly what you are asking, so I'll hypothesize and suggest functions like isdigit() , isalpha() and iswhite() . If I'm way off the mark, please rephrase what it is you are trying to do.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
How would I go about retrieving the default dialog background color?
|
|
|
|
|
Use GetPixel(...) function to get RGB value of Dialog box
If you have faith in the cause and
the means and in God, the hot
Sun will be cool for you.
|
|
|
|
|
See GetSysColor() . On non-XP and non-themed XP systems I think you can use COLOR_3DFACE .
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Exactly what i needed. Thanks =]
|
|
|
|
|
Hi
Could anyone please point to me a good tutorial and source code for C++ implementation for adaptive arithmetic encoding.
I have gone through Nelsons tutorial and few others. The implementation is bit difficult for me to understand.
Thanks in advance
The Best Relligion is Science.
Once you understand it, you will know God.
|
|
|
|
|
what is arithmetic encoding...?
TOXCCT >>> GEII power
|
|
|
|
|
Hi
Thanks for your interest.
You could go through this link to get a good start.
http://dogma.net/markn/articles/arith/part1.htm
Regards
The Best Relligion is Science.
Once you understand it, you will know God.
|
|
|
|
|
Does anyone know where to find the solution to the exercise presented in the book, besides the companion book C++ Solutions.
Thanks
Coward
|
|
|
|
|
Hi,
here it is,
http://www.research.att.com/~bs/3rd.html[^]
you can always post your solutions here,
for comments.
// Lord Byte has started to code
void swap(char **p, char **q)
{
char *tmp;
tmp = *p;
*p = *q;
*q = tmp;
}
|
|
|
|
|
I'm trying to use CBitmap to manipulate a bitmap, but there's no easy way for me to extract a color from a bitmap (like GetPixel(x, y) in CWnd-derived classes). Is there something I'm missing? Suggestions are well appreciated. Alternatively, is there a way to fill a bitmap with one color like FillRect() does with DCs?
thanks,
augy
|
|
|
|
|
Hey,
Try this.
CDC *pDC = this->GetDC();
CDC mDC;
mDC.CreateCompatibleDC(pDC);
mDC.LoadBitmap(IDB_BITMAP1);
Now you can used GetPixel() to extract color of bitmap.
mDC.GetPixel(...);
this->ReleaseDC(pDC);
Hope this will work.
If you have faith in the cause and
the means and in God, the hot
Sun will be cool for you.
|
|
|
|
|
To work with a bitmap, you need to select it into a DC. The other way is to use a DIBSEction, then you can access the bits directly. Get/SetPixel are incredibly slow.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
hi,
can any one provide me with an alogrithm to construct crossword puzzles similar to that is found in NYtimes.
|
|
|
|
|
hi all
I got the text from the popupmenu item using GetMenuString like so:
TCHAR itemText[MAX_PATH] = {0};
GetMenuString(m_hList,i,itemText,MAX_PATH,MF_BYPOSITION);
then i try to find if certain sequence is in the itemText like so:
TCHAR strTOSearch[2]="(";
if(_tcsstr(itemText,strToSearch)!=NULL)
{
....
}
now if the strToSearch does not contain any white space, it works fine, but then strToSearch[4]="h h";
then it won't find the string even though itemText does contain "h h",
what am I missing?
thx
koo9
|
|
|
|
|
I did not used TCHAR yet. I did a simple test with strstr() and it worked.
<br />
char tst[50];<br />
strcpy(tst,"Hello you!\nThis works!");
if (strstr(tst,"lo y"))
m_output="OK";<br />
<br />
UpdateData(FALSE);<br />
The str-functions are pretty old and are not very object orientated but they don't let you down. I like them.
|
|
|
|
|
strstr and _tcsstr both works fine in ur case, I guess it's just my itemText from teh GetMenuString call, it's supposed to be LPTSTR, but I use TCHAR, then _tcsstr or strstr will cast it to char * in fact, const unsigned short * in the function, I guess that's why it does work.
but not sure how get cast them correctly.
|
|
|
|
|
The best solution would be to use CString. It has many constructors. For LPCTSTR you can use CString::CString( LPCTSTR lpch, int nLength ) and for searching a substring or a character Value in another String use CString::CString::Find(...). Just check the CString class and you will see. If it still not work than look at the return value of GetMenuString. Maybe it redrives not the whole string (don't think so).
|
|
|
|
|
GetMenuString return the full text, I will give it a try. thx
|
|
|
|
|
OK, What's going on here.
I have a C++/MFC application, and happily starts consuming memory slowly. Then when I hit the minimize box on the application, *poof*, all the memory that the application is consuming goes way down. Bring it back up, and it starts munching again slowly, minimize it, and the memory utilization goes down!
What's going on when I minimize an application?
Marc
MyXaml
Advanced Unit Testing
|
|
|
|