|
Thanks , Sorry about forgetting the ~ for the MAXIMIZEBOX
your solution kinda solves what I need , but is there a way where I can eliminate the Maximize and the Close buttons from being even shown . They seemed to be grayed right at the moment !
There ware people who are smart but cant get the job done , and there are people who arent smart but get the Job done. We dont need both types of people !
|
|
|
|
|
One solution is SC_CLOSE. Also, in your code, negate WS_MAXIMIZEBOX.
cs.style &= ~WS_MAXIMIZEBOX;
Kuphryn
|
|
|
|
|
Using stroul gives me a wrong result. I had an _int64 value which I put into a string as a hex value and now I want to get it back again. I did:
unsigned __int64 alg_mask = strtoul (alg_str, (char **) NULL, 0);
which is not giving me back the right value I suppose because its string-to-long. How can I get this value out?
thanks,
sb
I put it in as
alg_str 0xf00000000
and my stroul gives me:
alg_mask 4294967295 which is FFFFFFFF
when actually I should be getting 64424509440.
|
|
|
|
|
Try using _strtoi64 or _wcstoi64
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Thanks. Will check it out.
sb
|
|
|
|
|
I'm on win2k and I do have stdlib included but I get strtoi64 is undeclared identifier. Another odd thing is that it didnt come up in the help....instead I found it at the microsoft site. Its vc6.
thanks.
sb
|
|
|
|
|
ns wrote:
strtoul (alg_str, (char **) NULL, 0);
strtoul (alg_str, (char **) NULL, 16);
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Ah Thanks! I will try it!
sb
|
|
|
|
|
I wantto create a project to fill a text box of any given site Eg. Google's search text box. so tell me how can i create this, if possible please send a sample programm to me by mail.
Anurag
anu
|
|
|
|
|
Anurag Khare wrote:
I wantto create a project to fill a text box of any given site
I'm unclear as to what you want in the text box.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
( one of those friday "Duh" question ... )
I have a populated tree control, items are inserted in each sub-tree as they are read from the "dataset"; and are not sorted alphabetically.
I want to sort the items, so I use CTreeCtrl::SortChildren ( or the other one with the user defined sort callback ); which is working fine.
The question really, is, Can I "unsort" the items without reloading the tree ( or subtree ) ?
I would say no at first, but we never know ...
Thanks.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Is it possible to check if you are about to download something from the internet?
|
|
|
|
|
Check here, here, and here.
It's possible that no ones knows a solution to your problem (at least on this board).
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Is there an easy way to compare two unicode strings that isn't case sensative. That is "fIlEnAmE" and "FiLeNaMe" should be considered the same?
My program presents writes a level 3 ISO9660 file system. Windows is unable to deal with this correctly. (I seem to be the only one actually writing level 3 ISO9660) Thus I need to read it myself. This works just fine in normal ISO9660, but as soon as I add joliet extentions I have to change to unicode, and there I am case preserving. (as joliet requires) However windows is not case sensative, and there I'm not sure what to do.
The easy solution is to convert to ASCII, which is easy to convert to upper case, but that won't work for anything other than latin derived languages (I wouldn't be surprized if some of them had special case that didn't work), with unicode I'm already close to supporting other languages correctly, I'd like to go the rest of the way if I can.
Thus the question, can I access whatever function windows uses to convert case, in unicode?
|
|
|
|
|
I ran into something liek this for some code I had to write for my project, the VCF.
int Win32LocalePeer::collateCaseInsensitive( const UnicodeString& s1, const UnicodeString& s2 )
{
int result = 0;
if ( System::isUnicodeEnabled() ) {
result = ::CompareStringW( lcid_, NORM_IGNORECASE, s1.c_str(), s1.size(), s2.c_str(), s2.size() );
}
else {
AnsiString tmp1 = s1;
AnsiString tmp2 = s2;
result = ::CompareStringA( lcid_, NORM_IGNORECASE, tmp1.c_str(), tmp1.size(), tmp2.c_str(), tmp2.size() );
}
return result;
}
DOn't know if this is exactly what you want but here's hoping!
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
|
|
|
|
|
lcid_ is a member value that is a valid LCID for the locale you want.
UnicodeString is just a wrapper around std::basic_string<wchar_t>.
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
|
|
|
|
|
Thank you. I knew there had to be an easy way, but I didn't find it when I searched. (I didn't search the right places to find it)
I don't know that it works, but if it doesn't the bugs are mine now...
|
|
|
|
|
Hi
Just a quickie - how secure is sending a file over a named pipe? I'm not bothered that fussed about delivery guarantee, but want to be sure nobody else can intercept the message on the way, or modify it before it gets there.
Hope this makes sense.
Regards
Malc
The sooner you fall behind, the longer you have to catch up
|
|
|
|
|
I say no. Messages can be intercepted. For secure data transfer, check out socket using SSL.
Kuphryn
|
|
|
|
|
How can I empy all information that I have in my List controll?
This is what I have try to to.
i=m_List.GetCount();
for(int l=0; l
|
|
|
|
|
|
I've got quite weird problem. From the main dialog I create a modal dialog where I make some computations and display results using OpenGL. I set Timer and when I get WM_TIMER message I redraw this dialog's window using RedrawWindow(). The problem is one time I create this dialog it works fine from the begining to the end. But when I try to do it again it doesn't get visually redrawn at all. I've placed different checks in my code. They have shown that in this dialog's lifecycle OnPaint func succesfully gets entered numerous times where I perform all the drawing. But I don't see any result. The problem arises on Win9x only. In 2k/XP everything goes perfect. Note that I don't only test it on Win9x but compile it's own variant too. So I need your help.
|
|
|
|
|
Invalidate() (optionally followed by UpdateWindow() if you want the redraw to happen immediately) should cause a repaint.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
It still doesn't work. Here's a scheme:
// Main.cpp
void CMainDialog::On_Visualize() // Create a modal dialog
{
...
OpenGL_Dialog my_gl;
my_gl.DoModal();
...
}
// OpenGL_Dialog.cpp
BOOL OpenGL_Dialog::OnInitDialog() // Setting timer when creating dialog
{
CDialog::OnInitDialog();
...
draw_counter=0;
SetTimer(1,10,NULL);
}
void OpenGL_Dialog::OnDestroy() // Kill timer when destroying
{
...
KillTimer(1);
CDialog OnDestroy();
}
void OpenGL_Dialog::OnPaint()
{
draw_counter++; // check
CPaintDC dc(this);
DrawGLScene2D;
SwapBuffers(m_hgldc);
}
void OpenGL_Dialog::OnTimer(UINT nIDEvent)
{
switch(nIDEvent)
{
case 1:
RedrawWindow();
break;
...
}
CDialog::OnTimer(nIDEvent);
}
void OpenGL_Dialog::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
switch (nChar)
{
case 32:
char buf[10];
itoa(draw_counter,buf,10);
AfxMessageBox(buf);
break;
...
}
CDialog::OnKeyDown(nChar, nRepCnt, nFlags);
}
Something like this. I wouldn't actually have placed drawing handling on timer but I need to respond to user input and other stuff. So striking space during the dialog's lifecycle I get the number of redrawings and this number is growing all the time. But in most cases the screen stays blank and nothing is drawn.
|
|
|
|
|
Replace RedrawWindow() with Invalidate() . Add a TRACE() statement just before the call to Invalidate() to ensure the case is executing.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|