oziel Posted January 26, 2011 Report Share Posted January 26, 2011 Caros... Comecei o trabalho para migar de 16->32 bits. O Primeiro programa foi uma agenda telefonica, quebrei a cabeça com xDev 0,70 mas felizmente após algumas dicas que vi no forum e consegui Lineditar e Compilar (xHarbour 0.99.71 e Bcc55) o prog está quase perfeito, abre a primeira janela de senha e depois a tela inicial, mais dá um problema qdo vou abrir a browse. Através do Workshop salvei a Agenda.dll como Agenda.rc e através do PellesC o arq. Agenda.res (32bits) Já revisei o arq AGENDA.RES e o browse usa a TCBROWSE (Class Name) Id 101 Vejam o erro - Logo abaixo os fontes. Application =========== Path and name: C:\Proj_FWH\agenda\Agend.EXE (32 bits) Size: 1,559,040 bytes Time from start: 0 hours 0 mins 4 secs Error occurred at: 26/01/11, 14:51:36 Error description: Error FiveWin/3 Cannot create Dialog Box: Resource: BROWSEAGENDA Stack Calls =========== Called from: => CREATEDLGERROR(0) Called from: DIALOG.PRG => TDIALOG:ACTIVATE(0) Called from: agenda.prg => AGENDA(101) Called from: agend.prg => (b)MAIN(69) Called from: BTNBMP.PRG => TBTNBMP:CLICK(0) Called from: BTNBMP.PRG => TBTNBMP:LBUTTONUP(0) Called from: WINDOW.PRG => TWINDOW:HANDLEEVENT(0) Called from: CONTROL.PRG => TBTNBMP:HANDLEEVENT(0) Called from: WINDOW.PRG => _FWH(0) Called from: => WINRUN(0) Called from: WINDOW.PRG => TMDIFRAME:ACTIVATE(0) Called from: agend.prg => MAIN(94) Inicio do Fonte Principal // -------------------------------------------------------- // Programa ....: Agend.PRG // Autor .......: Oziel Lopes da Silva // -------------------------------------------------------- #include "FiveWin.ch" #include "Tcbrowse.ch" ......... STATIC oWndMain // Janela Principal MDI FUNCTION Main() LOCAL oBar, oBtn LOCAL oBmp LOCAL oIcon ....... hBorland := LoadLib32("BWCC32.DLL") MsgRun("Abrindo a base de dados. Aguarde...","Um momento!",{||AbreDados()}) DEFINE ICON oIcon RESOURCE "FIVEWIN" DEFINE WINDOW oWndMain FROM 00,00 TO 30,60 ; TITLE OemToAnsi( "Agenda - Telefônica - OLS-Soft." ) ; MENU MenuMain() ; ICON oIcon ; MDI DEFINE BUTTONBAR oBar SIZE 80,41 _3DLOOK OF oWndMain DEFINE BUTTON OF oBar RESOURCE "BARAGENDA1" ACTION Agenda(.f.) ; TOOLTIP "Agenda Telefonica" ; NOBORDER ............ @ 00,00 BITMAP FILE "AGENDA.BMP" OF oWndMain:oWndClient SIZE 1200,670 ADJUST SET MESSAGE OF oWndMain TO OemToAnsi( " Agenda Telefonica - OLS-Soft - 2010 " ) ; CLOCK ; DATE ; KEYBOARD Acesso_ao_sistema() // Identificação do Usuario do Sistema. ACTIVATE WINDOW oWndMain MAXIMIZED RETURN NIL //------------------------------------------------------------------------ Segundo Programa. (ONDE DAR O ERRO) // ----------------------------------------------------------------------- // Programa ...: Agenda Telefonica - Agenda.prg // ----------------------------------------------------------------------- #include "FiveWin.ch" #include "Report.ch" #include "Tcbrowse.ch" .......... STATIC oReport // Para imprimir FUNCTION Agenda() LOCAL oDlg, oLbx // Objetos Caixa de Dialogo LOCAL oFnt,oG120 ............. DEFINE FONT oFnt NAME "Arial" SIZE 0, -10 CNome = Space(20) DEFINE DIALOG oDlg RESOURCE "BROWSEAGENDA" TITLE " Agenda - Agenda Telefonica. " CursorWait() REDEFINE LISTBOX oLbx FIELDS Agenda->NOME, ; Agenda->TEL, ; Agenda->TEL2, ; Agenda->TEL3, ; Agenda->CONT1, ; Agenda->CONT2, ; Agenda->CONT3 ; HEADERS "Nome","Telefone 1","Telefone 2","Telefone 3","Contato","Contato","Contato"; FIELDSIZES 200, 70, 70, 70, 70, 70, 70; COLOR CLR_BLACK, CLR_WHITE ; FONT oFnt ; ID 101 ; OF oDlg ; ON DBLCLICK(GetAgenda(.F.), oLbx:Refresh()) ........... ACTIVATE DIALOG oDlg CENTERED RELEASE oFnt RETURN NIL .... Fim do Programa Agenda .................................... OZIEL LOPES FW 22c - Clipper 5.3b - Workshop 4.0 FWH 6.12 Free - xHarbour 0.99.71 Simplex - BCC55 - Pelles C - xDev. Quote Link to comment Share on other sites More sharing options...
oziel Posted January 26, 2011 Author Report Share Posted January 26, 2011 Caros... Comecei o trabalho para migar de 16->32 bits. O Primeiro programa foi uma agenda telefonica, quebrei a cabeça com xDev 0,70 mas felizmente após algumas dicas que vi no forum e consegui Lineditar e Compilar (xHarbour 0.99.71 e Bcc55) o prog está quase perfeito, abre a primeira janela de senha e depois a tela inicial, mais dá um problema qdo vou abrir a browse. Através do Workshop salvei a Agenda.dll como Agenda.rc e através do PellesC o arq. Agenda.res (32bits) Já revisei o arq AGENDA.RES e o browse usa a TCBROWSE (Class Name) Id 101 Vejam o erro - Logo abaixo os fontes. Application =========== Path and name: C:\Proj_FWH\agenda\Agend.EXE (32 bits) Size: 1,559,040 bytes Time from start: 0 hours 0 mins 4 secs Error occurred at: 26/01/11, 14:51:36 Error description: Error FiveWin/3 Cannot create Dialog Box: Resource: BROWSEAGENDA Stack Calls =========== Called from: => CREATEDLGERROR(0) Called from: DIALOG.PRG => TDIALOG:ACTIVATE(0) Called from: agenda.prg => AGENDA(101) Called from: agend.prg => (b)MAIN(69) Called from: BTNBMP.PRG => TBTNBMP:CLICK(0) Called from: BTNBMP.PRG => TBTNBMP:LBUTTONUP(0) Called from: WINDOW.PRG => TWINDOW:HANDLEEVENT(0) Called from: CONTROL.PRG => TBTNBMP:HANDLEEVENT(0) Called from: WINDOW.PRG => _FWH(0) Called from: => WINRUN(0) Called from: WINDOW.PRG => TMDIFRAME:ACTIVATE(0) Called from: agend.prg => MAIN(94) Inicio do Fonte Principal // -------------------------------------------------------- // Programa ....: Agend.PRG // Autor .......: Oziel Lopes da Silva // -------------------------------------------------------- #include "FiveWin.ch" #include "Tcbrowse.ch" ......... STATIC oWndMain // Janela Principal MDI FUNCTION Main() LOCAL oBar, oBtn LOCAL oBmp LOCAL oIcon ....... hBorland := LoadLib32("BWCC32.DLL") MsgRun("Abrindo a base de dados. Aguarde...","Um momento!",{||AbreDados()}) DEFINE ICON oIcon RESOURCE "FIVEWIN" DEFINE WINDOW oWndMain FROM 00,00 TO 30,60 ; TITLE OemToAnsi( "Agenda - Telefônica - OLS-Soft." ) ; MENU MenuMain() ; ICON oIcon ; MDI DEFINE BUTTONBAR oBar SIZE 80,41 _3DLOOK OF oWndMain DEFINE BUTTON OF oBar RESOURCE "BARAGENDA1" ACTION Agenda(.f.) ; TOOLTIP "Agenda Telefonica" ; NOBORDER ............ @ 00,00 BITMAP FILE "AGENDA.BMP" OF oWndMain:oWndClient SIZE 1200,670 ADJUST SET MESSAGE OF oWndMain TO OemToAnsi( " Agenda Telefonica - OLS-Soft - 2010 " ) ; CLOCK ; DATE ; KEYBOARD Acesso_ao_sistema() // Identificação do Usuario do Sistema. ACTIVATE WINDOW oWndMain MAXIMIZED RETURN NIL //------------------------------------------------------------------------ Segundo Programa. (ONDE DAR O ERRO) // ----------------------------------------------------------------------- // Programa ...: Agenda Telefonica - Agenda.prg // ----------------------------------------------------------------------- #include "FiveWin.ch" #include "Report.ch" #include "Tcbrowse.ch" .......... STATIC oReport // Para imprimir FUNCTION Agenda() LOCAL oDlg, oLbx // Objetos Caixa de Dialogo LOCAL oFnt,oG120 ............. DEFINE FONT oFnt NAME "Arial" SIZE 0, -10 CNome = Space(20) DEFINE DIALOG oDlg RESOURCE "BROWSEAGENDA" TITLE " Agenda - Agenda Telefonica. " CursorWait() REDEFINE LISTBOX oLbx FIELDS Agenda->NOME, ; Agenda->TEL, ; Agenda->TEL2, ; Agenda->TEL3, ; Agenda->CONT1, ; Agenda->CONT2, ; Agenda->CONT3 ; HEADERS "Nome","Telefone 1","Telefone 2","Telefone 3","Contato","Contato","Contato"; FIELDSIZES 200, 70, 70, 70, 70, 70, 70; COLOR CLR_BLACK, CLR_WHITE ; FONT oFnt ; ID 101 ; OF oDlg ; ON DBLCLICK(GetAgenda(.F.), oLbx:Refresh()) ........... ACTIVATE DIALOG oDlg CENTERED RELEASE oFnt RETURN NIL .... Fim do Programa Agenda .................................... OZIEL LOPES FW 22c - Clipper 5.3b - Workshop 4.0 FWH 6.12 Free - xHarbour 0.99.71 Simplex - BCC55 - Pelles C - xDev. Quote Link to comment Share on other sites More sharing options...
rubensma Posted January 26, 2011 Report Share Posted January 26, 2011 Oziel, acrescente no seu prg principal //-> no inicio BWCCRegister( GetResources() ) DEFINE ICON oIcon RESOURCE "FIVEWIN" DEFINE WINDOW oWndMain FROM 00,00 TO 30,60 ; TITLE OemToAnsi( "Agenda - Telefônica - OLS-Soft." ) ; MENU MenuMain() ; ICON oIcon ; MDI ... return nil //-> ao final do menu principal, depois do RETURN NIL //----------------------------------------------------------------------------- DLL32 FUNCTION BWCCRegister( hInst AS LONG ) AS WORD PASCAL LIB "BWCC32.DLL" //----------------------------------------------------------------------------- veja se resolve Rubens Martins rumarti@gmail.com FWH 6.12 + xHARBOUR + Workshop Quote Link to comment Share on other sites More sharing options...
oziel Posted January 26, 2011 Author Report Share Posted January 26, 2011 Obrigado Vou testar, qq coisa q acontecer informo.. OZIEL LOPES FW 22c - Clipper 5.3b - Workshop 4.0 FWH 6.12 Free - xHarbour 0.99.71 Simplex - BCC55 - Pelles C - xDev. Quote Link to comment Share on other sites More sharing options...
oziel Posted January 27, 2011 Author Report Share Posted January 27, 2011 Cara. Não deu certo, a mensagem continua. Coloquei uma dll mais nova (BCC32.dll) compilada em 2002. Mais o prob continua e a mensagem de erro é a mesma descrita acima. OZIEL LOPES FW 22c - Clipper 5.3b - Workshop 4.0 FWH 6.12 Free - xHarbour 0.99.71 Simplex - BCC55 - Pelles C - xDev. Quote Link to comment Share on other sites More sharing options...
kapiaba Posted January 27, 2011 Report Share Posted January 27, 2011 Error description: Error FiveWin/3 Cannot create Dialog Box: TROQUE O RECURSO: DE TCBROWSE PARA TWBROWSE. VC. NÃO PODE USAR UMA TCBROWSE COM UMA WBROWSE OU TCBROWSE COM TSBROWSE, CADA LISTBOX COM A SUA CLASSE CORRESPONDENTE. VEJA NO WORKSHOP.EXE TEM TRES TIPOS DE LIXTBOX: TCBROWSE TWBROWSE -> ESTA É A CORRETA. TSBROWSE João Santos - São Paulo. kmt_karinha@pop.com.br joao@pleno.com.br Fone: (11) 3106-2832 / 8243-5632 - TIM FWH 2.7 - xHARBOUR WorkShop.Exe Editado por - kapiaba on 27/01/2011 11:25:20 Quote Link to comment Share on other sites More sharing options...
oziel Posted January 27, 2011 Author Report Share Posted January 27, 2011 BROWSE COM ERRO (RESOLVIDO) Cara. Obrigado Kapiaba e Rubens. Tudo beleza. Engraçado que antes estava a TWBrowse, mais estava faltando os parâmetros para ler a BCC32.dll ai não achei a TWBrowse.ch mudei tudo para TCBrwose. O importante q funcionou perfeitamente. Portanto: “Gracias a la vida que me ha dado tanto Me dio dos luceros que cuando los abro Perfecto distingo lo negro del blanco†..... “Graças à vida que me deu tanto Me deu dois olhos que quando os abro Distinguo perfeitamente o preto do branco†....... Dos versos de Violeta Parra, podemos acrescentar os amigos que não conhecemos mais que nos ajudam na vida. Att. OZIEL LOPES FW 22c - Clipper 5.3b - Workshop 4.0 FWH 6.12 Free - xHarbour 0.99.71 Simplex - BCC55 - Pelles C - xDev. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.