This should work, but I'm afraid that the swap of active pages will be visible to the user (as this has to take place during runtime, and I think this code was used before the creation of CPropertySheet). Why did they prevent that stupid window from creating during AddPage ? anyway thank you, I will be trying...
pmarki
Posts
-
CPropertyPage problems continue... -
CPropertyPage problems continue...OK I know why it happens... it's because MFC postpones creation of a window until it's tab is selected by a user... Is there any possiblity to overcome that ie. to force mfc to create that window earlier and not wait for user selection ?
-
CPropertyPage problems continue...How can I use the hWnd of a property page? I created a CPropertyPage object in a thread (using new) and then used PostMessage() in order to call AddPage(CPropertyPage) from the main app thread. But then, I couldn't make any use of hWnd of that CPropertyPage,IsWindow(CPropertyPage->m_hWnd) returns false. PostMessage(msg,CPropertyPage->m_hWnd) and even CPropertyPage->UpdateData() fails (debug assertions). I need to use it this way, because I just wanted to have a set of dialogs groupped in property pages. I need to access the hWnd to use with PostMessage and WSAASyncSelect (as it will receive network notification) How can I do that? Maybe I am doing something wrong ? :eek: thanks for any help
-
Threads & CPropertySheetThanks for the reply... ..but the thread in which CPropertySheet was created is the main user interface thread... and I don't know how to send it a ThreadMessage... Is there any other solution ?
-
Threads & CPropertySheetHello I have problems with adding a property page in a new thread. The problem is CPropertyPage::AddPage() always produces debug assertion failure, when running from a thread. it looks like this: UINT SomeThread(LPVOID p) { ... CMyPropertyPage* newpage; newpage=new CMyPropertyPage; pdlg->m_PropertySheet.AddPage(newpage); //debug asertion failed ... } pdlg in this example was restored from the FromHandle function. I know that this error is caused by the fact that AddPage() is run in separate thread. Anyone knows how to do it properly ? I will appreciate any suggestions... thanks
-
SetSockOpt, NO_DELAY and bufferingYeah, you were right... the problem was one else statement which somehow got commented out :omg: and I don't know why... :-D Thanks m8 I was almost ready to switch to w2k ...
-
SetSockOpt, NO_DELAY and bufferingYes, that's what I am trying to do... Do you know how to flush the data using windows sockets 1.1 ? I think I should switch to winsock version 2.2, there is a SIO_FLUSH command in WSAIoctl()... anyone used that with positive outcome ?
-
SetSockOpt, NO_DELAY and bufferingHello. I have a problem sending packets at the right time. My app sends a packet (16-100kbytes) each 10 seconds... but they are paired up and received as 2 packets each 20 seconds. I used setsockopt with no_delay set to 1 and it didn't help. My send buffer is 8192 bytes, I use win98 and winsock 1.1 How can I force winsock to send each packet separately ? Any help would be appreciated...:)
-
Printing - positioning problemHello. Printing again. The problem is how to position printer in order to get somehow precise output. For example: How to draw a frame which is equally distant from the edges of a page?, or how to draw division lines: vertical and horizontal in such a way that they divide an a4 page into two parts (more or less equal parts)? At this time beeing I obtained less precise results (still,something is wrong) while using GetDeviceCaps & PHYSICALWIDTH(HEIGHT), PHYSICALOFFSETX(Y), but it produces different outputs (more or less accurate), depending on a printer (hp 1220 and 690). PS. I have also used the pInfo->m_rectDraw rect but, it didn't print out the boundaries (the rectangle was to large to fit the printable area). PLEASE, anyone able to help ?
-
Changing the title in SDI appInside the CDocument constructor, I wanted to change the title bar, when the document changes in some way... and I call a function (which calls CMainFrame::SetWindowText() ) from CDocument's constructor, and if this constructor is called when the frame doesn't exist, that is the answer... hey, thank you, I hope that is the case :)
-
Changing the title in SDI appHow can I change the title of a sdi application? I used CDocument->SetTitle() - doesn't work (nothing changes) used CMainFrame->SetWindowText - but this crashes my app (Unhandled exception - memory violation - as It got a NULL pointer, when i debugged, inside the MFC function SetWindowText, there was an ASSERT(::IsWindow(m_hWnd)), but this(==m_hWnd) was equal to NULL, so that is why there was memory violation ... used m_pszAppName (changed it) and nothing changes ... heard about taking care of OnUpdateFrameTitle, but this method is not a member of frame, or document, but an ole class ... used many other strange ways, and did not succeed ...:mad: Anyone having an idea ?PLZ:rolleyes: